derive 2.3.0 → 2.3.0.1
raw patch · 10 files changed
+26/−12 lines, 10 filesdep ~haskell-src-extsPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
Dependency ranges changed: haskell-src-exts
API changes (from Hackage documentation)
+ Language.Haskell.Convert: instance Convert ([Name], BangType) [VarStrictType]
+ Language.Haskell.Convert: instance Convert BangType StrictType
+ Language.Haskell.Convert: instance Convert ConDecl Con
+ Language.Haskell.Convert: instance Convert QualConDecl Con
Files
- Data/Derive/Arbitrary.hs +0/−1
- Data/Derive/DSL/HSE.hs +0/−1
- Data/Derive/Internal/Traversal.hs +2/−2
- Data/Derive/Read.hs +0/−1
- Data/Derive/Ref.hs +0/−2
- Data/Derive/UniplateDirect.hs +1/−1
- Derive/Test.hs +0/−1
- Derive/Utils.hs +0/−1
- Language/Haskell/Convert.hs +21/−0
- derive.cabal +2/−2
Data/Derive/Arbitrary.hs view
@@ -23,7 +23,6 @@ -} import Data.Derive.DSL.HSE-import qualified Language.Haskell as H import Data.List import Data.Generics.Uniplate.DataOnly
Data/Derive/DSL/HSE.hs view
@@ -3,7 +3,6 @@ module Data.Derive.DSL.HSE(module Data.Derive.DSL.HSE, module Language.Haskell) where import Language.Haskell hiding (List, App, String, Int)-import qualified Language.Haskell.Exts as H import Data.Data import Data.Generics.Uniplate.DataOnly import Data.Maybe
Data/Derive/Internal/Traversal.hs view
@@ -71,8 +71,8 @@ } data RequiredInstance = RequiredInstance- { requiredDataArg :: String -- ^ What argument of the current data type?- , requiredPosition :: Int -- ^ What argument position of that type?+ { _requiredDataArg :: String -- ^ What argument of the current data type?+ , _requiredPosition :: Int -- ^ What argument position of that type? } deriving (Eq, Ord)
Data/Derive/Read.hs view
@@ -71,7 +71,6 @@ , (x2, r3) <- readsPrec 11 r2]) r -}-import Data.List import Data.Derive.DSL.HSE import qualified Language.Haskell as H
Data/Derive/Ref.hs view
@@ -23,8 +23,6 @@ import Language.Haskell import Data.Derive.Internal.Derivation-import Data.List-import Data.Char makeRef :: Derivation
Data/Derive/UniplateDirect.hs view
@@ -99,7 +99,7 @@ make :: Bool -> (String -> DataDecl) -> Type -> Type -> Either String [Decl] make uni grab from to = Right [InstDecl sl [] (UnQual $ Ident $ if uni then "Uniplate" else "Biplate") (from : [to | not uni])- [InsInline sl True AlwaysActive (qname $ if uni then "uniplate" else "biplate"), InsDecl ms]]+ [InsDecl $ InlineSig sl True AlwaysActive (qname $ if uni then "uniplate" else "biplate"), InsDecl ms]] where ty = grab $ tyRoot from match pat bod = Match sl (Ident $ if uni then "uniplate" else "biplate") [pat] Nothing (UnGuardedRhs bod) (BDecls [])
Derive/Test.hs view
@@ -10,7 +10,6 @@ import System.Cmd import System.Exit import Control.Arrow-import Data.Char import Data.Derive.All import Data.Derive.Internal.Derivation
Derive/Utils.hs view
@@ -8,7 +8,6 @@ import System.IO import System.FilePath import Control.Monad-import Data.Char import Data.Maybe
Language/Haskell/Convert.hs view
@@ -88,6 +88,27 @@ 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)+ conv (DataDecl _ DataType ctx nam typ cs ds) =+ DataD (c ctx) (c nam) (c typ) (c cs) (c (map fst ds))+ conv (DataDecl _ NewType ctx nam typ [con] ds) =+ NewtypeD (c ctx) (c nam) (c typ) (c con) (c (map fst ds))++instance Convert HS.QualConDecl TH.Con where+ conv (QualConDecl _ [] [] con) = c con+ conv (QualConDecl _ vs cx con) = ForallC (c vs) (c cx) (c con)++instance Convert HS.ConDecl TH.Con where+ conv (ConDecl nam typ) = NormalC (c nam) (c typ)+ conv (InfixConDecl l nam r) = InfixC (c l) (c nam) (c r)+ conv (RecDecl nam fs) = RecC (c nam) (concatMap c fs)++instance Convert HS.BangType TH.StrictType where+ conv (BangedTy t) = (IsStrict,c t)+ conv (UnBangedTy t) = (NotStrict,c t)++instance Convert ([HS.Name],HS.BangType) [TH.VarStrictType] where+ conv (names,bt) = [(c name,s,t) | name <- names]+ where (s,t) = c bt instance Convert HS.Asst TH.Type where conv (InfixA x y z) = c $ ClassA y [x,z]
derive.cabal view
@@ -1,7 +1,7 @@ Cabal-Version: >= 1.6 Build-Type: Default Name: derive-Version: 2.3.0+Version: 2.3.0.1 build-type: Simple Copyright: 2006-2010, Neil Mitchell Maintainer: ndmitchell@gmail.com@@ -35,7 +35,7 @@ Library Build-Depends:- haskell-src-exts == 1.6.*, filepath, mtl,+ haskell-src-exts == 1.8.*, filepath, mtl, base == 4.*, syb, template-haskell, uniplate == 1.4.*, containers, pretty