packages feed

haskell-src-meta 0.6.0.12 → 0.6.0.13

raw patch · 3 files changed

+29/−16 lines, 3 filesdep ~basedep ~haskell-src-extsPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base, haskell-src-exts

API changes (from Hackage documentation)

- Language.Haskell.Meta.Syntax.Translate: hsBindsToDecs :: Binds -> [Dec]
+ Language.Haskell.Meta.Syntax.Translate: instance Language.Haskell.Meta.Syntax.Translate.ToDecs (GHC.Base.Maybe Language.Haskell.Exts.Syntax.Binds)

Files

haskell-src-meta.cabal view
@@ -1,5 +1,5 @@ name:               haskell-src-meta-version:            0.6.0.12+version:            0.6.0.13 cabal-version:      >= 1.6 build-type:         Simple license:            BSD3@@ -18,13 +18,20 @@ extra-source-files: ChangeLog README examples/*.hs  library-  build-depends:   base >= 4.5 && < 4.9,-                   haskell-src-exts == 1.16.*,+  build-depends:   base >= 4.5 && < 4.10,                    pretty >= 1.0 && < 1.2,                    syb >= 0.1 && < 0.7,+                   template-haskell >= 2.7 && < 2.12,                    th-orphans >= 0.9.1 && < 0.14 -  Build-depends: template-haskell >= 2.7 && < 2.11+  -- haskell-src-exts 1.17 is not compatible with versions of GHC prior to 7.8,+  -- but we still maintain compatibility back to GHC 7.4.+  if impl(ghc >= 7.8)+    build-depends:+      haskell-src-exts >= 1.16 && < 1.18+  else               +    build-depends:+      haskell-src-exts == 1.16.*    extensions:      CPP,                    RankNTypes,
src/Language/Haskell/Meta/Parse.hs view
@@ -62,7 +62,11 @@   ,extensions = map EnableExtension myDefaultExtensions   ,ignoreLinePragmas = False   ,ignoreLanguagePragmas = False-  ,fixities = Nothing}+  ,fixities = Nothing+#if MIN_VERSION_haskell_src_exts(1,17,0)+  ,ignoreFunctionArity = False+#endif+  }  myDefaultExtensions :: [KnownExtension] myDefaultExtensions = [PostfixOperators
src/Language/Haskell/Meta/Syntax/Translate.hs view
@@ -226,7 +226,7 @@   toExp (Hs.App e f)               = AppE (toExp e) (toExp f)   toExp (Hs.NegApp e)              = AppE (VarE 'negate) (toExp e)   toExp (Hs.Lambda _ ps e)         = LamE (fmap toPat ps) (toExp e)-  toExp (Hs.Let bs e)              = LetE (hsBindsToDecs bs) (toExp e)+  toExp (Hs.Let bs e)              = LetE (toDecs bs) (toExp e)   toExp (Hs.If a b c)              = CondE (toExp a) (toExp b) (toExp c) #if MIN_VERSION_template_haskell(2,8,0)   toExp (Hs.MultiIf ifs)           = MultiIfE (map toGuard ifs)@@ -300,7 +300,9 @@   toType Hs.KindStar = StarT   toType (Hs.KindFn k1 k2) = toType k1 .->. toType k2   toType (Hs.KindParen kp) = toType kp+#if !MIN_VERSION_haskell_src_exts(1,17,0)   toType k@Hs.KindBang = noTH "toKind" k+#endif                            toType (Hs.KindVar n) = VarT (toName n)  toKind :: Hs.Kind -> Kind@@ -377,7 +379,7 @@ instance ToStmt Hs.Stmt where   toStmt (Hs.Generator _ p e)  = BindS (toPat p) (toExp e)   toStmt (Hs.Qualifier e)      = NoBindS (toExp e)-  toStmt a@(Hs.LetStmt bnds)   = LetS (hsBindsToDecs bnds)+  toStmt a@(Hs.LetStmt bnds)   = LetS (toDecs bnds)   toStmt s@Hs.RecStmt{}        = noTH "toStmt" s  @@ -385,11 +387,6 @@  -- * ToDec HsDecl -hsBindsToDecs :: Hs.Binds -> [Dec]-hsBindsToDecs (Hs.BDecls ds) = fmap toDec ds-hsBindsToDecs a@Hs.IPBinds{} = noTH "hsBindsToDecs" a-- instance ToDec Hs.Decl where   toDec (Hs.TypeDecl _ n ns t)     = TySynD (toName n) (fmap toTyVar ns) (toType t)@@ -446,7 +443,7 @@   toDec a@(Hs.FunBind mtchs)                           = hsMatchesToFunD mtchs   toDec (Hs.PatBind _ p rhs bnds)                      = ValD (toPat p)                                                               (hsRhsToBody rhs)-                                                              (hsBindsToDecs bnds)+                                                              (toDecs bnds)    toDec i@(Hs.InstDecl _ (Just overlap) _ _ _ _ _) =     noTH "toDec" (overlap, i)@@ -511,7 +508,7 @@ hsMatchToClause (Hs.Match _ _ ps _ rhs bnds) = Clause                                                 (fmap toPat ps)                                                 (hsRhsToBody rhs)-                                                (hsBindsToDecs bnds)+                                                (toDecs bnds)   @@ -540,7 +537,7 @@ hsStmtToGuard :: Hs.Stmt -> Guard hsStmtToGuard (Hs.Generator _ p e) = PatG [BindS (toPat p) (toExp e)] hsStmtToGuard (Hs.Qualifier e)     = NormalG (toExp e)-hsStmtToGuard (Hs.LetStmt bs)      = PatG [LetS (hsBindsToDecs bs)]+hsStmtToGuard (Hs.LetStmt bs)      = PatG [LetS (toDecs bs)]   -----------------------------------------------------------------------------@@ -584,7 +581,12 @@   toDecs a = concatMap toDecs a  instance ToDecs Hs.Binds where-  toDecs (Hs.BDecls ds) = toDecs ds+  toDecs (Hs.BDecls ds)   = toDecs ds+  toDecs a@(Hs.IPBinds {}) = noTH "ToDecs Hs.Binds" a++instance ToDecs (Maybe Hs.Binds) where+  toDecs Nothing               = []+  toDecs (Just (Hs.BDecls ds)) = toDecs ds   -----------------------------------------------------------------------------