packages feed

codet 0.1 → 0.1.0.1

raw patch · 4 files changed

+26/−7 lines, 4 filesdep ~basedep ~containersdep ~filepathPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, containers, filepath, template-haskell, time

API changes (from Hackage documentation)

Files

codet.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               codet-version:            0.1+version:            0.1.0.1 license:            BSD-3-Clause license-file:       LICENSE author:             Oleg Grenrus <oleg.grenrus@iki.fi>@@ -9,7 +9,9 @@ category:           Data build-type:         Simple extra-doc-files:    CHANGELOG.md-tested-with:        GHC ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1+tested-with:+  GHC ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.5 || ==9.8.2 || ==9.10.1+ synopsis:           CodeT description:        CodeT. extra-source-files: tests/*.txt@@ -31,10 +33,10 @@    -- 4.16.4.0 to allow ghc-9.2.3 used by Hackage docbuilder 2023-12   build-depends:-    , base              ^>=4.15.1.0 || ^>=4.16.3.0 || ^>=4.17.2.1 || ^>=4.18.1.0 || ^>=4.19.0.0+    , base              ^>=4.15.1.0 || ^>=4.16.3.0 || ^>=4.17.2.1 || ^>=4.18.1.0 || ^>=4.19.0.0 || ^>=4.20.0.0     , bytestring        ^>=0.10.2.1 || ^>=0.11.4.0 || ^>=0.12.0.2-    , containers        ^>=0.6.4.1-    , template-haskell  ^>=2.17.0.0 || ^>=2.18.0.0 || ^>=2.19.0.0 || ^>=2.20.0.0 || ^>=2.21.0.0+    , containers        ^>=0.6.4.1  || ^>=0.7+    , template-haskell  ^>=2.17.0.0 || ^>=2.18.0.0 || ^>=2.19.0.0 || ^>=2.20.0.0 || ^>=2.21.0.0 || ^>=2.22.0.0     , text              ^>=1.2.5.0  || ^>=2.0.2    || ^>=2.1     , time              ^>=1.9.3    || ^>=1.11.1   || ^>=1.12.2 @@ -51,7 +53,7 @@   -- test dependencies   build-depends:     , directory     ^>=1.3.6.2-    , filepath      ^>=1.4.2.1+    , filepath      ^>=1.4.2.1 || ^>=1.5.2.0     , syb           ^>=0.7.2.4     , tasty         ^>=1.5     , tasty-golden  ^>=2.3.5
src/Language/Haskell/TH/CodeT/Unsafe.hs view
@@ -112,7 +112,7 @@ -- -- >>> let ty = appCodeT (codeT @Maybe) (codeT @Char) -- >>> unTypeCodeT ty >>= print . ppr--- GHC.Maybe.Maybe GHC.Types.Char+-- GHC...Maybe GHC.Types.Char -- appCodeT :: Quote m => CodeT m f -> CodeT m x -> CodeT m (f x) appCodeT (UnsafeCodeT f) (UnsafeCodeT x) = UnsafeCodeT (appT f x)
+ tests/codet-tests-910.txt view
@@ -0,0 +1,16 @@+GHC.Types.Int+(ConT (Name (OccName "Int") (NameG (TcClsName) (PkgName "ghc-prim") (ModName "GHC.Types"))))+GHC.Types.List GHC.Types.Int+(AppT (ConT (Name (OccName "List") (NameG (TcClsName) (PkgName "ghc-prim") (ModName "GHC.Types")))) (ConT (Name (OccName "Int") (NameG (TcClsName) (PkgName "ghc-prim") (ModName "GHC.Types")))))+1+(LitT (NumTyLit (1)))+"string"+(LitT (StrTyLit "string"))+'c'+(LitT (CharTyLit ('c')))+GHC.Types.Int+(ConT (Name (OccName "Int") (NameG (TcClsName) (PkgName "ghc-prim") (ModName "GHC.Types"))))+(GHC.Types.->)+(ConT (Name (OccName "->") (NameG (TcClsName) (PkgName "ghc-prim") (ModName "GHC.Types"))))+GHC.Prim.TYPE (GHC.Types.BoxedRep GHC.Types.Lifted)+(AppT (ConT (Name (OccName "TYPE") (NameG (TcClsName) (PkgName "ghc-prim") (ModName "GHC.Prim")))) (AppT (ConT (Name (OccName "BoxedRep") (NameG (DataName) (PkgName "ghc-prim") (ModName "GHC.Types")))) (ConT (Name (OccName "Lifted") (NameG (DataName) (PkgName "ghc-prim") (ModName "GHC.Types"))))))
tests/codet-tests.hs view
@@ -36,6 +36,7 @@  ghcVer :: Int -> Int ghcVer v+    | v >= 910  = 910 -- 9.10+ has stuff defined in GHC.Internal.*     | v >= 906  = 906 -- 9.6+ prints GHC.Types.List, not []     | v >= 902  = 902 -- 9.2+ has Char kind     | otherwise = 900