packages feed

haskell-src-exts 1.0.0 → 1.0.1

raw patch · 6 files changed

+16/−11 lines, 6 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Language.Haskell.Exts.Fixity: applyFixities :: (AppFixity ast) => [Fixity] -> ast -> ast
+ Language.Haskell.Exts.Fixity: applyFixities :: AppFixity ast => [Fixity] -> ast -> ast
- Language.Haskell.Exts.Parser: parse :: (Parseable ast) => String -> ParseResult ast
+ Language.Haskell.Exts.Parser: parse :: Parseable ast => String -> ParseResult ast
- Language.Haskell.Exts.Parser: parseWithMode :: (Parseable ast) => ParseMode -> String -> ParseResult ast
+ Language.Haskell.Exts.Parser: parseWithMode :: Parseable ast => ParseMode -> String -> ParseResult ast
- Language.Haskell.Exts.Pretty: prettyPrint :: (Pretty a) => a -> String
+ Language.Haskell.Exts.Pretty: prettyPrint :: Pretty a => a -> String
- Language.Haskell.Exts.Pretty: prettyPrintStyleMode :: (Pretty a) => Style -> PPHsMode -> a -> String
+ Language.Haskell.Exts.Pretty: prettyPrintStyleMode :: Pretty a => Style -> PPHsMode -> a -> String
- Language.Haskell.Exts.Pretty: prettyPrintWithMode :: (Pretty a) => PPHsMode -> a -> String
+ Language.Haskell.Exts.Pretty: prettyPrintWithMode :: Pretty a => PPHsMode -> a -> String

Files

dist/build/Language/Haskell/Exts/Parser.hs view
@@ -7102,7 +7102,7 @@ happyReturn1 :: () => a -> P a
 happyReturn1 = happyReturn
 happyError' :: () => (Token) -> P a
-happyError' tk = (\token -> happyError) tk
+happyError' tk = parseError tk
 
 mparseModule = happySomeParser where
   happySomeParser = happyThen (happyParse 0#) (\x -> happyReturn (happyOut9 x))
@@ -7125,8 +7125,8 @@ happySeq = happyDontSeq
 
 
-happyError :: P a
-happyError = fail "Parse error"
+parseError :: Token -> P a
+parseError t = fail $ "Parse error: " ++ show t
 
 -- | Class to reuse the parse function at many different types.
 class Parseable ast where
haskell-src-exts.cabal view
@@ -1,5 +1,5 @@ Name:                   haskell-src-exts-Version:                1.0.0+Version:                1.0.1 License:                BSD3 License-File:           LICENSE Author:                 Niklas Broberg
src/Language/Haskell/Exts/Lexer.hs view
@@ -215,7 +215,7 @@ special_varops :: [(String,(Token, Maybe ExtScheme))] special_varops = [  -- the dot is only a special symbol together with forall, but can still be used as function composition- ( ".",  (Dot,          Just (Any [Rank2Types, RankNTypes,+ ( ".",  (Dot,          Just (Any [Rank2Types, RankNTypes, ScopedTypeVariables,                                     PolymorphicComponents, LiberalTypeSynonyms,                                     ExistentialQuantification])) ),  ( "-",  (Minus,        Nothing) ),@@ -234,7 +234,7 @@  ( "do",        (KW_Do,         Nothing) ),  ( "else",      (KW_Else,       Nothing) ),  ( "family",    (KW_Family,     Just (Any [TypeFamilies])) ),        -- indexed type families- ( "forall",    (KW_Forall,     Just (Any [Rank2Types, RankNTypes,+ ( "forall",    (KW_Forall,     Just (Any [Rank2Types, RankNTypes, ScopedTypeVariables,                                                PolymorphicComponents, LiberalTypeSynonyms,                                                ExistentialQuantification])) ),    -- universal/existential quantification  ( "group",     (KW_Group,      Just (Any [TransformListComp])) ),
src/Language/Haskell/Exts/ParseUtils.hs view
@@ -250,6 +250,7 @@     checkEnabled TypeOperators     ts <- checkTypes [a,b]     return (op,ts)+checkInsts (TyParen t) [] = checkInsts t [] checkInsts _ _ = fail "Illegal instance declaration"  checkDeriving :: [PType] -> P [Deriving]@@ -816,11 +817,11 @@ checkT :: PType -> Bool -> P S.Type checkT t simple = case t of     TyForall tvs@Nothing cs pt    -> do-            when (simple) $ checkEnabled (Any [Rank2Types, RankNTypes, PolymorphicComponents, LiberalTypeSynonyms])+            when (simple) $ checkEnabled (Any [Rank2Types, RankNTypes, PolymorphicComponents, LiberalTypeSynonyms, ScopedTypeVariables])             ctxt <- checkContext cs             check1Type pt (S.TyForall Nothing ctxt)     TyForall tvs cs pt -> do-            checkEnabled (Any [Rank2Types, RankNTypes, PolymorphicComponents, LiberalTypeSynonyms])+            checkEnabled (Any [Rank2Types, RankNTypes, PolymorphicComponents, LiberalTypeSynonyms, ScopedTypeVariables])             ctxt <- checkContext cs             check1Type pt (S.TyForall tvs ctxt)     TyFun   at rt   -> check2Types at rt S.TyFun
src/Language/Haskell/Exts/Parser.ly view
@@ -257,6 +257,7 @@  > %monad { P } > %lexer { lexer } { EOF }+> %error { parseError } > %name mparseModule page > %name mparseExp trueexp > %name mparsePat pat@@ -1609,8 +1610,11 @@ -----------------------------------------------------------------------------  > {-> happyError :: P a-> happyError = fail "Parse error"+ happyError :: P a+ happyError = fail "Parse error"++> parseError :: Token -> P a+> parseError t = fail $ "Parse error: " ++ show t  > -- | Class to reuse the parse function at many different types. > class Parseable ast where
src/Language/Haskell/Exts/Pretty.hs view
@@ -601,7 +601,7 @@  instance Pretty OptionPragma where     pretty (LanguagePragma _ ns) =-        myFsep $ text "{-# LANGUAGE" : map pretty ns ++ [text "#-}"]+        myFsep $ text "{-# LANGUAGE" : punctuate (char ',') (map pretty ns) ++ [text "#-}"]     pretty (IncludePragma _ s) =         myFsep $ [text "{-# INCLUDE", text s, text "#-}"]     pretty (CFilesPragma _ s) =