free-functors 1.2 → 1.2.1
raw patch · 3 files changed
+22/−8 lines, 3 filesdep ~basedep ~template-haskell
Dependency ranges changed: base, template-haskell
Files
- free-functors.cabal +4/−4
- src/Data/Functor/Cofree/Internal.hs +9/−2
- src/Data/Functor/Free/Internal.hs +9/−2
free-functors.cabal view
@@ -1,5 +1,5 @@ name: free-functors-version: 1.2+version: 1.2.1 synopsis: Free functors, adjoint to functors that forget class constraints. description: A free functor is a left adjoint to a forgetful functor. It used to be the case that the only category that was easy to work with in Haskell was Hask itself, so@@ -22,7 +22,7 @@ build-type: Simple cabal-version: >= 1.10-tested-with: GHC==9.0.0.20200925, GHC==8.10.2+tested-with: GHC==9.0.0.20200925, GHC==8.10.2, GHC==8.8.4 extra-source-files: examples/*.hs@@ -46,8 +46,8 @@ Haskell2010 build-depends:- base >= 4.14 && < 4.16,- template-haskell >= 2.16 && < 2.18,+ base >= 4.13 && < 4.16,+ template-haskell >= 2.15 && < 2.18, transformers == 0.5.*, comonad == 5.*, derive-lifted-instances >= 0.2.2 && < 0.3,
src/Data/Functor/Cofree/Internal.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE- GADTs+ CPP+ , GADTs , PolyKinds , RankNTypes , ViewPatterns@@ -15,8 +16,10 @@ , QuantifiedConstraints , MultiParamTypeClasses , UndecidableSuperClasses- , StandaloneKindSignatures #-}+#if __GLASGOW_HASKELL__ >= 810+{-# LANGUAGE StandaloneKindSignatures #-}+#endif module Data.Functor.Cofree.Internal where import Data.Monoid (Ap(..))@@ -45,5 +48,9 @@ = deriveInstance (cofreeDeriv ccofree) [t| forall a c. (c ~=> $clss, c ($cofree c a)) => $clss ($cofree c a) |] +#if __GLASGOW_HASKELL__ < 810+type a ~=> b = (forall x. (a :: (k -> Constraint)) x => (b :: (k -> Constraint)) x) :: Constraint+#else type (~=>) :: (k -> Constraint) -> (k -> Constraint) -> Constraint type a ~=> b = forall x. a x => b x+#endif
src/Data/Functor/Free/Internal.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE- GADTs+ CPP+ , GADTs , PolyKinds , RankNTypes , ViewPatterns@@ -15,8 +16,10 @@ , QuantifiedConstraints , MultiParamTypeClasses , UndecidableSuperClasses- , StandaloneKindSignatures #-}+#if __GLASGOW_HASKELL__ >= 810+{-# LANGUAGE StandaloneKindSignatures #-}+#endif module Data.Functor.Free.Internal where import Data.Monoid (Ap(..))@@ -52,5 +55,9 @@ , deriveInstance (apDeriv idDeriv) [t| forall f a c. (Applicative f, $clss a) => $clss (Ap f a) |] ] +#if __GLASGOW_HASKELL__ < 810+type a ~=> b = (forall x. (a :: (k -> Constraint)) x => (b :: (k -> Constraint)) x) :: Constraint+#else type (~=>) :: (k -> Constraint) -> (k -> Constraint) -> Constraint type a ~=> b = forall x. a x => b x+#endif