Skip to content

Commit

Permalink
Improve haskell.nanorc
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Westlund committed Apr 8, 2020
1 parent 3fb2783 commit cfa6717
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions haskell.nanorc
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
syntax "Haskell" "\.hs$"
syntax "haskell" "\.hs$"
comment "--"

## Keywords
color red "[ ](as|case|of|class|data|default|deriving|do|forall|foreign|hiding|if|then|else|import|infix|infixl|infixr|instance|let|in|mdo|module|newtype|qualified|type|where)[ ]"
color red "(^data|^foreign|^import|^infix|^infixl|^infixr|^instance|^module|^newtype|^type)[ ]"
color red "[ ](as$|case$|of$|class$|data$|default$|deriving$|do$|forall$|foreign$|hiding$|if$|then$|else$|import$|infix$|infixl$|infixr$|instance$|let$|in$|mdo$|module$|newtype$|qualified$|type$|where$)"
color red "\<(as|case|of|class|data|default|deriving|do|forall|foreign|hiding|if|then|else|import|infix|infixl|infixr|instance|let|in|mdo|module|newtype|qualified|type|where)\>"

## Various symbols
color cyan "(\||@|!|:|_|~|=|\\|;|\(\)|,|\[|\]|\{|\})"
Expand All @@ -16,13 +15,15 @@ color cyan "(->|<-|=>)"
color magenta "\.|\$"

## Data constructors
color magenta "(True|False|Nothing|Just|Left|Right|LT|EQ|GT)"
color magenta "\<(True|False|Nothing|Just|Left|Right|LT|EQ|GT)\>"

## Data classes
color magenta "[ ](Read|Show|Enum|Eq|Ord|Data|Bounded|Typeable|Num|Real|Fractional|Integral|RealFrac|Floating|RealFloat|Monad|MonadPlus|Functor)"
color magenta "\<(Read|Show|Enum|Eq|Ord|Data|Bounded|Typeable|Num|Real|Fractional|Integral|RealFrac|Floating|RealFloat|Monad|MonadPlus|Functor)\>"

## Strings
color yellow ""[^\"]*""
color yellow ""([^\"]|\\.)*""
## Chars
color brightyellow "'([^\']|\\.)'"

## Comments
color green "--.*"
Expand Down

0 comments on commit cfa6717

Please sign in to comment.