packages feed

haskell-src-exts-simple 1.21.1.0 → 1.22.0.0

raw patch · 5 files changed

+22/−83 lines, 5 filesdep ~haskell-src-extsPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: haskell-src-exts

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,30 +1,36 @@ # Revision history for haskell-src-exts-simple -## 1.21.0.1    -- 2019-09-13+## 1.22.0.0    — 2019-11-05 +* support haskell-src-exts 1.22.0+* clean up mentions of ghc < 8++## 1.21.1.0    — 2019-09-13+ * support haskell-src-exts 1.21.1+* require base >= 4.9 (and, consequently, ghc >= 8) -## 1.21.0.0    -- 2019-04-27+## 1.21.0.0    — 2019-04-27  * support haskell-src-exts 1.21.0 -## 1.20.0.0    -- 2017-12-??+## 1.20.0.0    — 2017-12-26  * support haskell-src-exts 1.20.0 -## 1.19.0.0    -- 2016-11-20+## 1.19.0.0    — 2016-11-20  * support haskell-src-exts 1.19.0 * implement `Language.Haskell.Exts.Simple.Syntax.ImportDecl` as a record pattern synonym for ghc-8.0 -## 1.18.0.1.1  -- 2016-08-05+## 1.18.0.1.1  — 2016-08-05  * package description should now look fine on hackage -## 1.18.0.1  -- 2016-08-02+## 1.18.0.1    — 2016-08-02  * ghc-7.8 compatibility (see COMPATIBILITY.md for caveats) -## 1.18.0  -- 2016-07-31+## 1.18.0      — 2016-07-31  * Initial release.
README.md view
@@ -46,14 +46,4 @@  ### ghc compatibility -* haskell-src-exts-simple requires ghc-7.8 or later-* Note that with ghc-7.8, the constructors of the-  `Language.Haskell.Exts.Simple.Syntax.Literal` type are only-  available for pattern matching, because construction relies on-  explicitly bidirectional pattern synonyms for literals. For ghc-7.8-  compatibility, you should use the `*L` (`intL` etc.) functions for-  constructing `Literal` values.-* Support for record pattern synonyms was added in ghc-8.0. Therefore,-  with ghc-7.10 and earlier, the constructor of the-  `Language.Haskell.Exts.Simple.Syntax.ImportDecl` type is exported as-  a plain constructor, and the selectors as functions.+* haskell-src-exts-simple requires ghc-8.0 or later
haskell-src-exts-simple.cabal view
@@ -1,5 +1,5 @@ name:                haskell-src-exts-simple-version:             1.21.1.0+version:             1.22.0.0 synopsis:            A simplified view on the haskell-src-exts AST description:     This package provides a shim for haskell-src-exts (HSE), exposing the@@ -38,7 +38,7 @@         PatternSynonyms,         ScopedTypeVariables     build-depends:-        base >= 4.7 && < 5,-        haskell-src-exts >= 1.21 && < 1.22+        base >= 4.9 && < 5,+        haskell-src-exts >= 1.22 && < 1.23     hs-source-dirs:      src     default-language:    Haskell2010
src/Language/Haskell/Exts/Simple/Parser.hs view
@@ -3,9 +3,6 @@ {-# LANGUAGE ScopedTypeVariables #-} -- | -- This module partially reexports "Language.Haskell.Exts.Parser" with adaptations.------ __IMPORTANT__: if you require compatiblity with ghc 7.8, you should use the--- function `listOf` for constructing `ListOf` values!  module Language.Haskell.Exts.Simple.Parser (     module Language.Haskell.Exts.Simple.Parser,@@ -31,18 +28,9 @@ -- * Datatypes and Constructors  -- ** `H.ListOf`--- | Beware that the `ListOf` constructor only works in a pattern context--- in ghc-7.8, because that version does not support explicitly bidirectional--- pattern synonyms.------ For code that needs to work with ghc-7.8, we provide the `listOf` function--- constructing `ListOf` values.- type ListOf = H.ListOf pattern ListOf a <- H.ListOf _ a-#if __GLASGOW_HASKELL__ > 708    where ListOf a = listOf a-#endif listOf :: [a] -> ListOf a listOf a = H.ListOf H.noSrcSpan a 
src/Language/Haskell/Exts/Simple/Syntax.hs view
@@ -12,20 +12,6 @@ -- > type Name = H.Name () -- > pattern Ident a = H.Ident () a -- > pattern Symbol a = H.Symbol () a------ This works nicely for all datatypes with two exception:------ * `ImportDecl` has a record constructor. Record type synonyms are only---   supported ghc-8.0 and later, so for ghc-7.10 and earlier, the---   constructor is exported as a plain constructor, and the record fields---   as function.--- * `Literal` has constructors with an extra `String` argument that is not---   used by `Language.Haskell.Exts.Simple.Pretty`. This module uses explicitly---   bidirectional pattern synonyms to support this type, but support for that---   is only available in ghc-7.10 and later.------ __IMPORTANT__: if you require compatiblity with ghc 7.8, you should use the--- functions `charL`, `stringL` etc. for constructing `Literal` values!  module Language.Haskell.Exts.Simple.Syntax (     module Language.Haskell.Exts.Simple.Syntax,@@ -119,27 +105,8 @@  -- ** `H.ImportDecl` type ImportDecl = H.ImportDecl ()--- | Note, this is originally a record constructor, and we use a pattern record synonym for ghc-8.0. But for earlier ghc versions, `ImportDecl` is a plain pattern synonym, and the selectors are exported as functions.-#if __GLASGOW_HASKELL__ < 800-pattern ImportDecl a b c d e f g = H.ImportDecl () (a :: ModuleName) (b :: Bool) (c :: Bool) (d :: Bool) (e :: Maybe String) (f :: Maybe ModuleName) (g :: Maybe ImportSpecList) :: ImportDecl-importModule :: ImportDecl -> ModuleName-importModule = H.importModule-importQualified :: ImportDecl -> Bool-importQualified = H.importQualified-importSrc :: ImportDecl -> Bool-importSrc = H.importSrc-importSafe :: ImportDecl -> Bool-importSafe = H.importSafe-importPkg :: ImportDecl -> Maybe String-importPkg = H.importPkg-importAs :: ImportDecl -> Maybe ModuleName-importAs = H.importAs-importSpecs :: ImportDecl -> Maybe ImportSpecList-importSpecs = H.importSpecs-#else pattern ImportDecl { importModule, importQualified, importSrc, importSafe, importPkg, importAs, importSpecs } =     H.ImportDecl () importModule importQualified importSrc importSafe importPkg importAs importSpecs :: ImportDecl-#endif  -- ** `H.ImportSpecList` type ImportSpecList = H.ImportSpecList ()@@ -175,6 +142,7 @@ pattern InfixDecl a b c = H.InfixDecl () (a :: Assoc) (b :: (Maybe Int)) (c :: [Op]) :: Decl pattern DefaultDecl a = H.DefaultDecl () (a :: [Type]) :: Decl pattern SpliceDecl a = H.SpliceDecl () (a :: Exp) :: Decl+pattern TSpliceDecl a = H.TSpliceDecl () (a :: Exp) :: Decl pattern TypeSig a b = H.TypeSig () (a :: [Name]) (b :: Type) :: Decl pattern PatSynSig a b c d e f = H.PatSynSig () (a :: [Name]) (b :: (Maybe [TyVarBind])) (c :: (Maybe Context)) (d :: (Maybe [TyVarBind])) (e :: (Maybe Context)) (f :: Type) :: Decl pattern FunBind a = H.FunBind () (a :: [Match]) :: Decl@@ -397,29 +365,13 @@  -- ** `H.Asst` type Asst = H.Asst ()-pattern ClassA a b = H.ClassA () (a :: QName) (b :: [Type]) :: Asst-pattern AppA a b = H.AppA () (a :: Name) (b :: [Type]) :: Asst-pattern InfixA a b c = H.InfixA () (a :: Type) (b :: QName) (c :: Type) :: Asst+pattern TypeA a = H.TypeA () (a :: Type) :: Asst pattern IParam a b = H.IParam () (a :: IPName) (b :: Type) :: Asst-pattern EqualP a b = H.EqualP () (a :: Type) (b :: Type) :: Asst pattern ParenA a = H.ParenA () (a :: Asst) :: Asst-pattern WildCardA a = H.WildCardA () (a :: (Maybe Name)) :: Asst  -- ** `H.Literal`---- | Beware that the constructors only work in a pattern context in ghc-7.8,--- because that version does not support explicitly bidirectional pattern--- synonyms.------ For code that needs to work with ghc-7.8, we provide functions `charL`,--- `stringL`, `intL`, `fracL`, etc. for constructing `Literal` values.- type Literal = H.Literal () -#if __GLASGOW_HASKELL__ <= 708-#define where ---#endif- pattern Char a <- H.Char () (a :: Char) _ :: Literal     where Char a = H.Char () a [a] charL :: Char -> Literal@@ -547,6 +499,7 @@ -- ** `H.Bracket` type Bracket = H.Bracket () pattern ExpBracket a = H.ExpBracket () (a :: Exp) :: Bracket+pattern TExpBracket a = H.TExpBracket () (a :: Exp) :: Bracket pattern PatBracket a = H.PatBracket () (a :: Pat) :: Bracket pattern TypeBracket a = H.TypeBracket () (a :: Type) :: Bracket pattern DeclBracket a = H.DeclBracket () (a :: [Decl]) :: Bracket@@ -554,7 +507,9 @@ -- ** `H.Splice` type Splice = H.Splice () pattern IdSplice a = H.IdSplice () (a :: String) :: Splice+pattern TIdSplice a = H.TIdSplice () (a :: String) :: Splice pattern ParenSplice a = H.ParenSplice () (a :: Exp) :: Splice+pattern TParenSplice a = H.TParenSplice () (a :: Exp) :: Splice  -- ** `H.Safety` type Safety = H.Safety ()