From cfa6717850d7b7f2417917a736fbdc5fb2dfc816 Mon Sep 17 00:00:00 2001 From: Ryan Westlund Date: Wed, 8 Apr 2020 09:16:57 -0400 Subject: [PATCH] Improve haskell.nanorc --- haskell.nanorc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/haskell.nanorc b/haskell.nanorc index f42ba06..bb2a290 100644 --- a/haskell.nanorc +++ b/haskell.nanorc @@ -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 "(\||@|!|:|_|~|=|\\|;|\(\)|,|\[|\]|\{|\})" @@ -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 "--.*"