fused-effects-th 0.1.0.0 → 0.1.0.1
raw patch · 4 files changed
+14/−6 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−1
- fused-effects-th.cabal +2/−2
- src/Control/Effect/TH.hs +1/−1
- test/Spec.hs +5/−2
CHANGELOG.md view
@@ -3,7 +3,12 @@ `fused-effects-th` uses [PVP Versioning][1]. The changelog is available [on GitHub][2]. -## 0.0.0.0+## 0.1.0.1++* Fix a bug where explicit kind signatures around a monad type variable+ were causing incorrect name generation. Thanks to @AlistairB for the report.++## 0.1.0.0 * Initially created.
fused-effects-th.cabal view
@@ -1,8 +1,8 @@ cabal-version: 2.4 name: fused-effects-th-version: 0.1.0.0+version: 0.1.0.1 synopsis: Template Haskell helpers for fused-effects.-description: Template Haskell helpers for fused-effects.+description: This package provides Template Haskell splices that wrap the smart constructors needed for declaring new effects when using the fused-effects effect system. homepage: https://github.com/patrickt/fused-effects-th bug-reports: https://github.com/patrickt/fused-effects-th/issues license: BSD-3-Clause
src/Control/Effect/TH.hs view
@@ -124,4 +124,4 @@ invocation = foldl' appT (conT typeName) (fmap (varT . getTyVar) rest) hasConstraint = [t|Has $(parensT invocation) $(varT (mkName "sig")) $(monadName)|] folded = foldr (\a b -> arrowT `appT` pure a `appT` b) (monadName `appT` pure returnType) ctorArgs- in TH.sigD functionName (TH.forallT (extraTyVars ++ [sigVar]) (TH.cxt [hasConstraint]) folded)+ in TH.sigD functionName (TH.forallT (rest ++ [monadTypeVar, sigVar]) (TH.cxt [hasConstraint]) folded)
test/Spec.hs view
@@ -22,10 +22,13 @@ import System.IO import Test.Tasty import Test.Tasty.HUnit+import Data.Kind (Type) +data Go (m :: Type -> Type) k where+ App :: String -> Go m ()++makeSmartConstructors ''Go makeSmartConstructors ''State-makeSmartConstructors ''Reader-makeSmartConstructors ''Writer -- Need to ensure that if a constructor introduces a new type variable, -- that it is introduced in the corresponding invocation. The question is