haskell-src 1.0.3.1 → 1.0.3.2
raw patch · 9 files changed
+237/−171 lines, 9 filesdep +faildep +semigroupsdep ~arraydep ~basedep ~prettynew-uploaderPVP ok
version bump matches the API change (PVP)
Dependencies added: fail, semigroups
Dependency ranges changed: array, base, pretty, syb
API changes (from Hackage documentation)
Files
- LICENSE +4/−4
- Language/Haskell/Lexer.hs +3/−3
- Language/Haskell/ParseMonad.hs +19/−3
- Language/Haskell/ParseUtils.hs +3/−3
- Language/Haskell/Parser.ly +1/−1
- Language/Haskell/Pretty.hs +24/−22
- Language/Haskell/Syntax.hs +112/−113
- changelog.md +40/−9
- haskell-src.cabal +31/−13
LICENSE view
@@ -1,6 +1,6 @@ The Glasgow Haskell Compiler License -Copyright 2004, The University Court of the University of Glasgow. +Copyright 2004, The University Court of the University of Glasgow. All rights reserved. Redistribution and use in source and binary forms, with or without@@ -8,14 +8,14 @@ - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.- + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.- + - Neither name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without-specific prior written permission. +specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
Language/Haskell/Lexer.hs view
@@ -2,10 +2,10 @@ -- | -- Module : Language.Haskell.Lexer -- Copyright : (c) The GHC Team, 1997-2000--- License : BSD-style (see the file libraries/base/LICENSE)+-- License : BSD-3-Clause ----- Maintainer : libraries@haskell.org--- Stability : experimental+-- Maintainer : Andreas Abel+-- Stability : stable -- Portability : portable -- -- Lexer for Haskell.
Language/Haskell/ParseMonad.hs view
@@ -2,16 +2,22 @@ -- | -- Module : Language.Haskell.ParseMonad -- Copyright : (c) The GHC Team, 1997-2000--- License : BSD-style (see the file libraries/base/LICENSE)+-- License : BSD-3-Clause ----- Maintainer : libraries@haskell.org--- Stability : experimental+-- Maintainer : Andreas Abel+-- Stability : stable -- Portability : portable -- -- Monads for the Haskell parser and lexer. -- ----------------------------------------------------------------------------- +{-# LANGUAGE CPP #-}++#if __GLASGOW_HASKELL__ >= 902+{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-}+#endif+ module Language.Haskell.ParseMonad( -- * Parsing P, ParseResult(..), atSrcLoc, LexContext(..),@@ -48,6 +54,7 @@ ParseFailed loc msg <*> _ = ParseFailed loc msg instance Monad ParseResult where+ return = pure ParseOk x >>= f = f x ParseFailed loc msg >>= _ = ParseFailed loc msg @@ -62,6 +69,7 @@ instance Monoid m => Monoid (ParseResult m) where mempty = ParseOk mempty+ mappend = (<>) -- internal version data ParseStatus a = Ok ParseState a | Failed SrcLoc String@@ -127,10 +135,14 @@ (<*>) = ap instance Monad P where+ return = pure P m >>= k = P $ \i x y l s mode -> case m i x y l s mode of Failed loc msg -> Failed loc msg Ok s' a -> runP (k a) i x y l s' mode+#if !(MIN_VERSION_base(4,13,0))+ fail = Fail.fail+#endif -- | @since 1.0.3.0 instance Fail.MonadFail P where@@ -184,8 +196,12 @@ Lex v *> Lex w = Lex $ \k -> v (\_ -> w k) instance Monad (Lex r) where+ return = pure Lex v >>= f = Lex $ \k -> v (\a -> runL (f a) k) (>>) = (*>)+#if !(MIN_VERSION_base(4,13,0))+ fail = Fail.fail+#endif -- | @since 1.0.3.0 instance Fail.MonadFail (Lex r) where
Language/Haskell/ParseUtils.hs view
@@ -2,10 +2,10 @@ -- | -- Module : Language.Haskell.ParseUtils -- Copyright : (c) The GHC Team, 1997-2000--- License : BSD-style (see the file libraries/base/LICENSE)+-- License : BSD-3-Clause ----- Maintainer : libraries@haskell.org--- Stability : experimental+-- Maintainer : Andreas Abel+-- Stability : stable -- Portability : portable -- -- Utilities for the Haskell parser.
Language/Haskell/Parser.ly view
@@ -6,7 +6,7 @@ > -- License : BSD-style (see the file libraries/base/LICENSE) > -- > -- Maintainer : libraries@haskell.org-> -- Stability : experimental+> -- Stability : stable > -- Portability : portable > -- > -- Haskell parser.
Language/Haskell/Pretty.hs view
@@ -2,10 +2,10 @@ -- | -- Module : Language.Haskell.Pretty -- Copyright : (c) The GHC Team, Noel Winstanley 1997-2000--- License : BSD-style (see the file libraries/base/LICENSE)+-- License : BSD-3-Clause ----- Maintainer : libraries@haskell.org--- Stability : experimental+-- Maintainer : Andreas Abel+-- Stability : stable -- Portability : portable -- -- Pretty printer for Haskell.@@ -33,6 +33,7 @@ import Language.Haskell.Syntax +import Control.Applicative as App (Applicative (..)) import Control.Monad (ap) import qualified Text.PrettyPrint as P@@ -42,10 +43,10 @@ ----------------------------------------------------------------------------- -- | Varieties of layout we can use.-data PPLayout = PPOffsideRule -- ^ classical layout- | PPSemiColon -- ^ classical layout made explicit- | PPInLine -- ^ inline decls, with newlines between them- | PPNoLayout -- ^ everything on a single line+data PPLayout = PPOffsideRule -- ^ Classical layout.+ | PPSemiColon -- ^ Classical layout made explicit.+ | PPInLine -- ^ Inline decls, with newlines between them.+ | PPNoLayout -- ^ Everything on a single line. deriving Eq type Indent = Int@@ -54,29 +55,29 @@ -- -- /Note:/ the 'onsideIndent' must be positive and less than all other indents. data PPHsMode = PPHsMode {- -- | indentation of a class or instance+ -- | Indentation of a class or instance. classIndent :: Indent,- -- | indentation of a @do@-expression+ -- | Indentation of a @do@-expression. doIndent :: Indent,- -- | indentation of the body of a- -- @case@ expression+ -- | Indentation of the body of a+ -- @case@ expression. caseIndent :: Indent,- -- | indentation of the declarations in a- -- @let@ expression+ -- | Indentation of the declarations in a+ -- @let@ expression. letIndent :: Indent,- -- | indentation of the declarations in a- -- @where@ clause+ -- | Indentation of the declarations in a+ -- @where@ clause. whereIndent :: Indent,- -- | indentation added for continuation- -- lines that would otherwise be offside+ -- | Indentation added for continuation+ -- lines that would otherwise be offside. onsideIndent :: Indent,- -- | blank lines between statements?+ -- | Blank lines between statements? spacing :: Bool,- -- | Pretty-printing style to use+ -- | Pretty-printing style to use. layout :: PPLayout,- -- | add GHC-style @LINE@ pragmas to output?+ -- | Add GHC-style @LINE@ pragmas to output? linePragmas :: Bool,- -- | not implemented yet+ -- | (not implemented yet) comments :: Bool } @@ -103,7 +104,7 @@ fmap f xs = do x <- xs; return (f x) -- | @since 1.0.2.0-instance Applicative (DocM s) where+instance App.Applicative (DocM s) where pure = retDocM (<*>) = ap (*>) = then_DocM@@ -111,6 +112,7 @@ instance Monad (DocM s) where (>>=) = thenDocM (>>) = (*>)+ return = pure {-# INLINE thenDocM #-} {-# INLINE then_DocM #-}
Language/Haskell/Syntax.hs view
@@ -5,10 +5,10 @@ -- | -- Module : Language.Haskell.Syntax -- Copyright : (c) The GHC Team, 1997-2000--- License : BSD-style (see the file libraries/base/LICENSE)+-- License : BSD-3-Clause ----- Maintainer : libraries@haskell.org--- Stability : experimental+-- Maintainer : Andreas Abel+-- Stability : stable -- Portability : portable -- -- A suite of datatypes describing the abstract syntax of@@ -18,8 +18,7 @@ -- -- * parameters of type class assertions are unrestricted ----- This module has been changed so that show is a real show.--- For GHC, we also derive Typeable and Data for all types.+-- For GHC, we also derive 'Typeable' and 'Data' for all types. ----------------------------------------------------------------------------- @@ -94,12 +93,12 @@ -- data constructors. data HsSpecialCon- = HsUnitCon -- ^ unit type and data constructor @()@- | HsListCon -- ^ list type constructor @[]@- | HsFunCon -- ^ function type constructor @->@+ = HsUnitCon -- ^ Unit type and data constructor @()@.+ | HsListCon -- ^ List type constructor @[]@.+ | HsFunCon -- ^ Function type constructor @->@. | HsTupleCon Int -- ^ /n/-ary tuple type and data- -- constructors @(,)@ etc- | HsCons -- ^ list data constructor @(:)@+ -- constructors @(,)@ etc.+ | HsCons -- ^ List data constructor @(:)@. #ifdef __GLASGOW_HASKELL__ deriving (Eq,Ord,Show,Typeable,Data) #else@@ -109,9 +108,9 @@ -- | This type is used to represent qualified variables, and also -- qualified constructors. data HsQName- = Qual Module HsName -- ^ name qualified with a module name- | UnQual HsName -- ^ unqualified name- | Special HsSpecialCon -- ^ built-in constructor with special syntax+ = Qual Module HsName -- ^ Name qualified with a module name.+ | UnQual HsName -- ^ Unqualified name.+ | Special HsSpecialCon -- ^ Built-in constructor with special syntax. #ifdef __GLASGOW_HASKELL__ deriving (Eq,Ord,Show,Typeable,Data) #else@@ -120,8 +119,8 @@ -- | This type is used to represent variables, and also constructors. data HsName- = HsIdent String -- ^ /varid/ or /conid/- | HsSymbol String -- ^ /varsym/ or /consym/+ = HsIdent String -- ^ /varid/ or /conid/.+ | HsSymbol String -- ^ /varsym/ or /consym/. #ifdef __GLASGOW_HASKELL__ deriving (Eq,Ord,Show,Typeable,Data) #else@@ -130,8 +129,8 @@ -- | Possibly qualified infix operators (/qop/), appearing in expressions. data HsQOp- = HsQVarOp HsQName -- ^ variable operator (/qvarop/)- | HsQConOp HsQName -- ^ constructor operator (/qconop/)+ = HsQVarOp HsQName -- ^ Variable operator (/qvarop/).+ | HsQConOp HsQName -- ^ Constructor operator (/qconop/). #ifdef __GLASGOW_HASKELL__ deriving (Eq,Ord,Show,Typeable,Data) #else@@ -140,8 +139,8 @@ -- | Operators, appearing in @infix@ declarations. data HsOp- = HsVarOp HsName -- ^ variable operator (/varop/)- | HsConOp HsName -- ^ constructor operator (/conop/)+ = HsVarOp HsName -- ^ Variable operator (/varop/).+ | HsConOp HsName -- ^ Constructor operator (/conop/). #ifdef __GLASGOW_HASKELL__ deriving (Eq,Ord,Show,Typeable,Data) #else@@ -151,8 +150,8 @@ -- | A name (/cname/) of a component of a class or data type in an @import@ -- or export specification. data HsCName- = HsVarName HsName -- ^ name of a method or field- | HsConName HsName -- ^ name of a data constructor+ = HsVarName HsName -- ^ Name of a method or field.+ | HsConName HsName -- ^ Name of a data constructor. #ifdef __GLASGOW_HASKELL__ deriving (Eq,Ord,Show,Typeable,Data) #else@@ -170,18 +169,18 @@ -- | Export specification. data HsExportSpec- = HsEVar HsQName -- ^ variable+ = HsEVar HsQName -- ^ Variable. | HsEAbs HsQName -- ^ @T@:- -- a class or datatype exported abstractly,+ -- A class or datatype exported abstractly, -- or a type synonym. | HsEThingAll HsQName -- ^ @T(..)@:- -- a class exported with all of its methods, or+ -- A class exported with all of its methods, or -- a datatype exported with all of its constructors. | HsEThingWith HsQName [HsCName] -- ^ @T(C_1,...,C_n)@:- -- a class exported with some of its methods, or+ -- A class exported with some of its methods, or -- a datatype exported with some of its constructors. | HsEModuleContents Module -- ^ @module M@:- -- re-export a module.+ -- Re-export a module. #ifdef __GLASGOW_HASKELL__ deriving (Eq,Show,Typeable,Data) #else@@ -190,13 +189,13 @@ -- | Import declaration. data HsImportDecl = HsImportDecl- { importLoc :: SrcLoc -- ^ position of the @import@ keyword.- , importModule :: Module -- ^ name of the module imported.- , importQualified :: Bool -- ^ imported @qualified@?- , importAs :: Maybe Module -- ^ optional alias name in an- -- @as@ clause.+ { importLoc :: SrcLoc -- ^ Position of the @import@ keyword.+ , importModule :: Module -- ^ Name of the module imported.+ , importQualified :: Bool -- ^ Imported @qualified@?+ , importAs :: Maybe Module+ -- ^ Optional alias name in an @as@ clause. , importSpecs :: Maybe (Bool,[HsImportSpec])- -- ^ optional list of import specifications.+ -- ^ Optional list of import specifications. -- The 'Bool' is 'True' if the names are excluded -- by @hiding@. }@@ -208,14 +207,14 @@ -- | Import specification. data HsImportSpec- = HsIVar HsName -- ^ variable+ = HsIVar HsName -- ^ Variable. | HsIAbs HsName -- ^ @T@:- -- the name of a class, datatype or type synonym.+ -- The name of a class, datatype or type synonym. | HsIThingAll HsName -- ^ @T(..)@:- -- a class imported with all of its methods, or+ -- A class imported with all of its methods, or -- a datatype imported with all of its constructors. | HsIThingWith HsName [HsCName] -- ^ @T(C_1,...,C_n)@:- -- a class imported with some of its methods, or+ -- A class imported with some of its methods, or -- a datatype imported with some of its constructors. #ifdef __GLASGOW_HASKELL__ deriving (Eq,Show,Typeable,Data)@@ -225,9 +224,9 @@ -- | Associativity of an operator. data HsAssoc- = HsAssocNone -- ^ non-associative operator (declared with @infix@)- | HsAssocLeft -- ^ left-associative operator (declared with @infixl@).- | HsAssocRight -- ^ right-associative operator (declared with @infixr@)+ = HsAssocNone -- ^ Non-associative operator (declared with @infix@).+ | HsAssocLeft -- ^ Left-associative operator (declared with @infixl@).+ | HsAssocRight -- ^ Right-associative operator (declared with @infixr@). #ifdef __GLASGOW_HASKELL__ deriving (Eq,Show,Typeable,Data) #else@@ -265,9 +264,9 @@ -- | Declaration of a data constructor. data HsConDecl = HsConDecl SrcLoc HsName [HsBangType]- -- ^ ordinary data constructor+ -- ^ Ordinary data constructor. | HsRecDecl SrcLoc HsName [([HsName],HsBangType)]- -- ^ record constructor+ -- ^ Record constructor. #ifdef __GLASGOW_HASKELL__ deriving (Eq,Show,Typeable,Data) #else@@ -277,8 +276,8 @@ -- | The type of a constructor argument or field, optionally including -- a strictness annotation. data HsBangType- = HsBangedTy HsType -- ^ strict component, marked with \"@!@\"- | HsUnBangedTy HsType -- ^ non-strict component+ = HsBangedTy HsType -- ^ Strict component, marked with \"@!@\".+ | HsUnBangedTy HsType -- ^ Non-strict component. #ifdef __GLASGOW_HASKELL__ deriving (Eq,Show,Typeable,Data) #else@@ -287,9 +286,9 @@ -- | The right hand side of a function or pattern binding. data HsRhs- = HsUnGuardedRhs HsExp -- ^ unguarded right hand side (/exp/)+ = HsUnGuardedRhs HsExp -- ^ Unguarded right hand side (/exp/). | HsGuardedRhss [HsGuardedRhs]- -- ^ guarded right hand side (/gdrhs/)+ -- ^ Guarded right hand side (/gdrhs/). #ifdef __GLASGOW_HASKELL__ deriving (Eq,Show,Typeable,Data) #else@@ -306,10 +305,10 @@ deriving (Eq,Show) #endif --- | Safety level for invoking a foreign entity+-- | Safety level for invoking a foreign entity. data HsSafety- = HsSafe -- ^ call may generate callbacks- | HsUnsafe -- ^ call will not generate callbacks+ = HsSafe -- ^ Call may generate callbacks.+ | HsUnsafe -- ^ Call will not generate callbacks. #ifdef __GLASGOW_HASKELL__ deriving (Eq,Ord,Show,Typeable,Data) #else@@ -328,11 +327,11 @@ -- | Haskell types and type constructors. data HsType- = HsTyFun HsType HsType -- ^ function type- | HsTyTuple [HsType] -- ^ tuple type- | HsTyApp HsType HsType -- ^ application of a type constructor- | HsTyVar HsName -- ^ type variable- | HsTyCon HsQName -- ^ named type or type constructor+ = HsTyFun HsType HsType -- ^ Function type.+ | HsTyTuple [HsType] -- ^ Tuple type.+ | HsTyApp HsType HsType -- ^ Application of a type constructor.+ | HsTyVar HsName -- ^ Type variable.+ | HsTyCon HsQName -- ^ Named type or type constructor. #ifdef __GLASGOW_HASKELL__ deriving (Eq,Show,Typeable,Data) #else@@ -351,15 +350,15 @@ -- precise string representation used. For example, @10@, @0o12@ and @0xa@ -- have the same representation. data HsLiteral- = HsChar Char -- ^ character literal- | HsString String -- ^ string literal- | HsInt Integer -- ^ integer literal- | HsFrac Rational -- ^ floating point literal- | HsCharPrim Char -- ^ GHC unboxed character literal- | HsStringPrim String -- ^ GHC unboxed string literal- | HsIntPrim Integer -- ^ GHC unboxed integer literal- | HsFloatPrim Rational -- ^ GHC unboxed float literal- | HsDoublePrim Rational -- ^ GHC unboxed double literal+ = HsChar Char -- ^ Character literal.+ | HsString String -- ^ String literal.+ | HsInt Integer -- ^ Integer literal.+ | HsFrac Rational -- ^ Floating point literal.+ | HsCharPrim Char -- ^ GHC unboxed character literal.+ | HsStringPrim String -- ^ GHC unboxed string literal.+ | HsIntPrim Integer -- ^ GHC unboxed integer literal.+ | HsFloatPrim Rational -- ^ GHC unboxed float literal.+ | HsDoublePrim Rational -- ^ GHC unboxed double literal. #ifdef __GLASGOW_HASKELL__ deriving (Eq,Show,Typeable,Data) #else@@ -383,43 +382,43 @@ -- add parentheses in printing. data HsExp- = HsVar HsQName -- ^ variable- | HsCon HsQName -- ^ data constructor- | HsLit HsLiteral -- ^ literal constant- | HsInfixApp HsExp HsQOp HsExp -- ^ infix application- | HsApp HsExp HsExp -- ^ ordinary application- | HsNegApp HsExp -- ^ negation expression @-@ /exp/- | HsLambda SrcLoc [HsPat] HsExp -- ^ lambda expression- | HsLet [HsDecl] HsExp -- ^ local declarations with @let@- | HsIf HsExp HsExp HsExp -- ^ @if@ /exp/ @then@ /exp/ @else@ /exp/- | HsCase HsExp [HsAlt] -- ^ @case@ /exp/ @of@ /alts/- | HsDo [HsStmt] -- ^ @do@-expression:- -- the last statement in the list+ = HsVar HsQName -- ^ Variable.+ | HsCon HsQName -- ^ Data constructor.+ | HsLit HsLiteral -- ^ Literal constant.+ | HsInfixApp HsExp HsQOp HsExp -- ^ Infix application.+ | HsApp HsExp HsExp -- ^ Ordinary application.+ | HsNegApp HsExp -- ^ Negation expression @-@ /exp/.+ | HsLambda SrcLoc [HsPat] HsExp -- ^ Lambda expression.+ | HsLet [HsDecl] HsExp -- ^ Local declarations with @let@.+ | HsIf HsExp HsExp HsExp -- ^ @If@ /exp/ @then@ /exp/ @else@ /exp/.+ | HsCase HsExp [HsAlt] -- ^ @Case@ /exp/ @of@ /alts/.+ | HsDo [HsStmt] -- ^ @Do@-expression:+ -- The last statement in the list -- should be an expression.- | HsTuple [HsExp] -- ^ tuple expression- | HsList [HsExp] -- ^ list expression- | HsParen HsExp -- ^ parenthesized expression- | HsLeftSection HsExp HsQOp -- ^ left section @(@/exp/ /qop/@)@- | HsRightSection HsQOp HsExp -- ^ right section @(@/qop/ /exp/@)@+ | HsTuple [HsExp] -- ^ Tuple expression.+ | HsList [HsExp] -- ^ List expression.+ | HsParen HsExp -- ^ Parenthesized expression.+ | HsLeftSection HsExp HsQOp -- ^ Left section @(@/exp/ /qop/@)@.+ | HsRightSection HsQOp HsExp -- ^ Right section @(@/qop/ /exp/@)@. | HsRecConstr HsQName [HsFieldUpdate]- -- ^ record construction expression+ -- ^ Record construction expression. | HsRecUpdate HsExp [HsFieldUpdate]- -- ^ record update expression- | HsEnumFrom HsExp -- ^ unbounded arithmetic sequence,- -- incrementing by 1- | HsEnumFromTo HsExp HsExp -- ^ bounded arithmetic sequence,- -- incrementing by 1- | HsEnumFromThen HsExp HsExp -- ^ unbounded arithmetic sequence,- -- with first two elements given+ -- ^ Record update expression.+ | HsEnumFrom HsExp -- ^ Unbounded arithmetic sequence,+ -- incrementing by 1.+ | HsEnumFromTo HsExp HsExp -- ^ Bounded arithmetic sequence,+ -- incrementing by 1.+ | HsEnumFromThen HsExp HsExp -- ^ Unbounded arithmetic sequence,+ -- with first two elements given. | HsEnumFromThenTo HsExp HsExp HsExp- -- ^ bounded arithmetic sequence,- -- with first two elements given- | HsListComp HsExp [HsStmt] -- ^ list comprehension+ -- ^ Bounded arithmetic sequence,+ -- with first two elements given.+ | HsListComp HsExp [HsStmt] -- ^ List comprehension. | HsExpTypeSig SrcLoc HsExp HsQualType- -- ^ expression type signature- | HsAsPat HsName HsExp -- ^ patterns only- | HsWildCard -- ^ patterns only- | HsIrrPat HsExp -- ^ patterns only+ -- ^ Expression type signature.+ | HsAsPat HsName HsExp -- ^ (patterns only)+ | HsWildCard -- ^ (patterns only)+ | HsIrrPat HsExp -- ^ (patterns only) #ifdef __GLASGOW_HASKELL__ deriving (Eq,Show,Typeable,Data) #else@@ -428,20 +427,20 @@ -- | A pattern, to be matched against a value. data HsPat- = HsPVar HsName -- ^ variable- | HsPLit HsLiteral -- ^ literal constant- | HsPNeg HsPat -- ^ negated pattern+ = HsPVar HsName -- ^ Variable.+ | HsPLit HsLiteral -- ^ Literal constant.+ | HsPNeg HsPat -- ^ Negated pattern. | HsPInfixApp HsPat HsQName HsPat- -- ^ pattern with infix data constructor- | HsPApp HsQName [HsPat] -- ^ data constructor and argument- -- patterns- | HsPTuple [HsPat] -- ^ tuple pattern- | HsPList [HsPat] -- ^ list pattern- | HsPParen HsPat -- ^ parenthesized pattern- | HsPRec HsQName [HsPatField] -- ^ labelled pattern- | HsPAsPat HsName HsPat -- ^ @\@@-pattern- | HsPWildCard -- ^ wildcard pattern (@_@)- | HsPIrrPat HsPat -- ^ irrefutable pattern (@~@)+ -- ^ Pattern with infix data constructor.+ | HsPApp HsQName [HsPat] -- ^ Data constructor and argument+ -- patterns.+ | HsPTuple [HsPat] -- ^ Tuple pattern.+ | HsPList [HsPat] -- ^ List pattern.+ | HsPParen HsPat -- ^ Parenthesized pattern.+ | HsPRec HsQName [HsPatField] -- ^ Labelled pattern.+ | HsPAsPat HsName HsPat -- ^ @\@@-Pattern.+ | HsPWildCard -- ^ Wildcard pattern (@_@).+ | HsPIrrPat HsPat -- ^ Irrefutable pattern (@~@). #ifdef __GLASGOW_HASKELL__ deriving (Eq,Show,Typeable,Data) #else@@ -461,11 +460,11 @@ -- and /qual/ in a list comprehension. data HsStmt = HsGenerator SrcLoc HsPat HsExp- -- ^ a generator /pat/ @<-@ /exp/- | HsQualifier HsExp -- ^ an /exp/ by itself: in a @do@-expression,+ -- ^ A generator /pat/ @<-@ /exp/.+ | HsQualifier HsExp -- ^ An /exp/ by itself: in a @do@-expression, -- an action whose result is discarded;- -- in a list comprehension, a guard expression- | HsLetStmt [HsDecl] -- ^ local bindings+ -- in a list comprehension, a guard expression.+ | HsLetStmt [HsDecl] -- ^ Local bindings. #ifdef __GLASGOW_HASKELL__ deriving (Eq,Show,Typeable,Data) #else@@ -491,8 +490,8 @@ #endif data HsGuardedAlts- = HsUnGuardedAlt HsExp -- ^ @->@ /exp/- | HsGuardedAlts [HsGuardedAlt] -- ^ /gdpat/+ = HsUnGuardedAlt HsExp -- ^ @->@ /exp/.+ | HsGuardedAlts [HsGuardedAlt] -- ^ /gdpat/. #ifdef __GLASGOW_HASKELL__ deriving (Eq,Show,Typeable,Data) #else
changelog.md view
@@ -1,19 +1,50 @@-### 1.0.3.1+## 1.0.3.2 - - GHC 8.8.1/base-4.13 only compatibility release to support `MonadFail`+_Andreas Abel, 2022-02-07_ + - Version tested with GHC 7.0 - 9.2.+ - Silence warning `incomplete-uni-patterns` in module `ParseMonad` for GHC >= 9.2.+ - Cosmetic documentation changes.++## 1.0.3.1 Revision 5++ - Support happy-1.21.++## 1.0.3.1 Revision 4++ - Support GHC 9.2 & base-4.16.++## 1.0.3.1 Revision 3++ - Support GHC 9.0 & base-4.15.++## 1.0.3.0/1 Revision 2++ - Support happy-1.20.++## 1.0.3.1++_Herbert Valerio Riedel, 2019-11-09_++ - Version for GHC 8.8 and 8.10.+ ## 1.0.3.0 - - Add support for `MonadFail` & `Semigroup` proposals by- adding respective instances for `P` and `Lex`.+_Herbert Valerio Riedel, 2018-03-13_ - - Drop support for GHC versions prior to GHC 7.0.+ - Version for GHC 7.10 - 8.6.+ (Dropped support for GHC versions prior to GHC 7.0.) - - Remove `-O2` from `ghc-options`.+ - Add support for `MonadFail` & `Semigroup` proposals by+ adding respective instances for `P` and `Lex`. + - Remove `-O2` from `ghc-options`.+ ## 1.0.2.0 - - Add support for GHC 7.10 & base-4.8)+_Herbert Valerio Riedel, 2015-01-24_ - - Add missing `Functor` & `Applicative` instances for `P` and `Lex`- monads needed for AMP compatibility.+ - Add support for GHC 7.10 & base-4.8.++ - Add missing `Functor` & `Applicative` instances for `P` and `Lex`+ monads needed for AMP compatibility.
haskell-src.cabal view
@@ -1,14 +1,15 @@-cabal-version: 2.4+cabal-version: >=1.10 name: haskell-src -- don't forget to update the changelog.md!-version: 1.0.3.1+version: 1.0.3.2+build-type: Simple -license: BSD-3-Clause+license: BSD3 license-file: LICENSE author: Simon Marlow, Sven Panne and Noel Winstanley--- Maintained through https://github.com/haskell-pkg-janitors. Join us!-maintainer: Herbert Valerio Riedel <hvr@gnu.org>+maintainer: Andreas Abel bug-reports: https://github.com/haskell-pkg-janitors/haskell-src/issues+stability: stable category: Language synopsis: Support for manipulating Haskell source code description:@@ -16,9 +17,23 @@ source code. The package provides a lexer, parser and pretty-printer, and a definition of a Haskell abstract syntax tree (AST). Common uses of this package are to parse or generate- <http://www.haskell.org/onlinereport/ Haskell 98> code+ <http://www.haskell.org/onlinereport/ Haskell 98> code. -tested-with: GHC==8.4.1, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2, GHC==7.0.4+tested-with:+ GHC == 9.2.1+ GHC == 9.0.2+ GHC == 8.10.7+ GHC == 8.8.4+ GHC == 8.6.5+ GHC == 8.4.4+ GHC == 8.2.2+ GHC == 8.0.2+ GHC == 7.10.3+ GHC == 7.8.4+ GHC == 7.6.3+ GHC == 7.4.2+ GHC == 7.2.2+ GHC == 7.0.4 extra-source-files: changelog.md @@ -35,14 +50,17 @@ Language.Haskell.Syntax, Language.Haskell.ParseUtils - build-depends: base ^>= 4.13.0.0- , syb ^>= 0.7- , pretty ^>= 1.1.3.6- , array ^>= 0.5.4.0+ build-depends: base >= 4.3 && < 4.17+ , syb >= 0.1 && < 0.8+ , pretty >= 1.0.1.2 && < 1.2+ , array >= 0.3 && < 0.6 - ghc-options: -Wcompat -Wnoncanonical-monad-instances+ if !impl(ghc >= 8.0)+ build-depends: semigroups == 0.18.*, fail == 4.9.*+ else+ ghc-options: -Wcompat -Wnoncanonical-monad-instances - build-tool-depends: happy:happy == 1.19.*+ build-tools: happy >= 1.19 && < 1.22 default-language: Haskell98