derive 2.6.1 → 2.6.2
raw patch · 3 files changed
+7/−5 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGES.txt +3/−1
- derive.cabal +1/−1
- src/Language/Haskell/Convert.hs +3/−3
CHANGES.txt view
@@ -1,7 +1,9 @@ Changelog for Derive +2.6.2+ #19, more upgrade bug fixes 2.6.1- Allow haskell-src-exts-1.19+ #19, allow haskell-src-exts-1.19 2.6 Remove lots of derivations that didn't seem useful (Eq, Show etc) Change to use annotated Haskell syntax trees
derive.cabal view
@@ -1,7 +1,7 @@ cabal-version: >= 1.18 build-type: Default name: derive-version: 2.6.1+version: 2.6.2 build-type: Simple copyright: Neil Mitchell 2006-2017 author: Neil Mitchell <ndmitchell@gmail.com>
src/Language/Haskell/Convert.hs view
@@ -5,6 +5,7 @@ import Language.Haskell as HS import qualified Language.Haskell.Exts as HSE(FieldDecl(..))+import Language.Haskell.TH.Compat import Language.Haskell.TH.Syntax as TH import Control.Exception import Data.Typeable@@ -117,10 +118,9 @@ conv (AppT x y) = case c x of ClassA _ a b -> ClassA () a (b ++ [c y]) -- instance Convert (HS.Decl ()) TH.Dec where--- NEIL conv (InstDecl _ _ _ cxt nam typ ds) = instanceD (c cxt) (c $ tyApp (TyCon nam) typ) [c d | InsDecl d <- ds]+ conv (InstDecl _ _ (fromIParen -> IRule _ _ cxt (fromInstHead -> (nam,typ))) ds) =+ instanceD (c cxt) (c $ tyApp (TyCon () nam) typ) [c d | InsDecl _ d <- fromMaybe [] ds] conv (FunBind _ ms@(HS.Match _ nam _ _ _:_)) = FunD (c nam) (c ms) conv (PatBind _ p bod ds) = ValD (c p) (c bod) (c ds) conv (TypeSig _ [nam] typ) = SigD (c nam) (c $ foralls typ)