haskell-src-exts 0.3.11 → 0.3.12
raw patch · 3 files changed
+18/−10 lines, 3 files
Files
- Language/Haskell/Exts/Lexer.hs +15/−2
- Language/Haskell/Exts/Syntax.hs +0/−5
- haskell-src-exts.cabal +3/−3
Language/Haskell/Exts/Lexer.hs view
@@ -586,6 +586,9 @@ discard 1 idents <- lexIdents return $ ident : idents+ '#':_ -> do+ discard 1+ return [ident ++ "#"] _ -> return [ident] @@ -642,10 +645,14 @@ | isLower c || c == '_' -> do -- qualified varid? discard 1 ident <- lexWhile isIdent- case lookup ident reserved_ids of+ s <- getInput+ ident' <- case s of+ '#':_ -> discard 1 >> return (ident ++ "#")+ _ -> return ident+ case lookup ident' reserved_ids of -- cannot qualify a reserved word Just _ -> just_a_conid- Nothing -> return (QVarId (qual', ident))+ Nothing -> return (QVarId (qual', ident')) | isUpper c -> do -- qualified conid? discard 1@@ -661,6 +668,12 @@ ':' -> QConSym (qual', sym) _ -> QVarSym (qual', sym) + '#':c:_ + | isSpace c -> do+ discard 1+ case conid of+ ConId con -> return $ ConId $ con ++ "#"+ QConId (q,con) -> return $ QConId (q,con ++ "#") _ -> return conid -- not a qualified thing lexCharacter :: Lex a Token
Language/Haskell/Exts/Syntax.hs view
@@ -98,12 +98,7 @@ #ifdef __GLASGOW_HASKELL__-#if __GLASGOW_HASKELL__ >= 610 import Data.Data-#else-import Data.Generics.Basics-import Data.Generics.Instances-#endif #endif -- | A position in the source.
haskell-src-exts.cabal view
@@ -1,5 +1,5 @@ Name: haskell-src-exts-Version: 0.3.11+Version: 0.3.12 License: BSD3 License-File: LICENSE Author: Niklas Broberg@@ -18,9 +18,9 @@ . * GADTs .- * Implicit parameters (ghc and hugs style)+ * Implicit parameters .- * Template Haskell (now works with GHC 6.4+ syntax)+ * Template Haskell . and a few more. Apart from these standard extensions, it also handles regular patterns as per the HaRP extension