packages feed

type-tree 0.2.0.0 → 0.2.0.1

raw patch · 3 files changed

+10/−9 lines, 3 files

Files

ChangeLog.md view
@@ -1,5 +1,10 @@ # Revision history for type-tree +## 0.2.0.1 -- 2018-04-07++* `liftName` no longer produces invalid code if passed a NameU (i.e. the result of+  `newName`).+ ## 0.2.0.0 -- 2018-04-07  * Moved from Tree to Forest representation of types
src/Language/Haskell/TypeTree/CheatingLift.hs view
@@ -53,18 +53,14 @@ liftFlv (NameG x (PkgName s) (ModName y)) =     [|NameG $(liftNS x) (PkgName $(stringE s)) (ModName $(stringE y))|] liftFlv (NameQ (ModName x)) = [|NameQ (ModName $(stringE x))|]-liftFlv (NameU i) = [|NameU $(litE $ intPrimL i')|]-    where-        i' = intPrimToInt i-liftFlv (NameL i) = [|NameL $(litE $ intPrimL i')|]-    where-        i' = intPrimToInt i+liftFlv (NameU i) = [|NameU $(intPrimToInt i)|]+liftFlv (NameL i) = [|NameL $(intPrimToInt i)|]  #if MIN_VERSION_template_haskell(2,10,0)-intPrimToInt = fromIntegral+intPrimToInt i = litE (integerL (fromIntegral i)) #else -- GHC <7.10 doesn't have kind-polymorphic `lift'-intPrimToInt i = fromIntegral (I# i)+intPrimToInt i = litE (intPrimL (fromIntegral (I# i))) #endif  liftNS VarName = [|VarName|]
type-tree.cabal view
@@ -1,5 +1,5 @@ name:               type-tree-version:            0.2.0.0+version:            0.2.0.1 synopsis:           Tree representations of datatypes description:        @type-tree@ provides TH splices for generating tree representations of                     the types contained in datatypes. This is useful for, for example,