mirror of
https://github.com/coot/free-category.git
synced 2024-09-11 14:17:30 +03:00
Use free-algebras 0.0.8.0
This commit is contained in:
parent
15f8c5b0dd
commit
daa4113228
@ -36,7 +36,7 @@ library
|
||||
src
|
||||
build-depends:
|
||||
base >= 4.9 && <5
|
||||
, free-algebras >= 0.0.7.0
|
||||
, free-algebras >= 0.0.8.0
|
||||
ghc-options:
|
||||
-Wall
|
||||
-fwarn-incomplete-record-updates
|
||||
|
@ -41,7 +41,7 @@ import Control.Algebra.Free2
|
||||
( AlgebraType0
|
||||
, AlgebraType
|
||||
, FreeAlgebra2 (..)
|
||||
, proof
|
||||
, Proof (..)
|
||||
, wrapFree2
|
||||
, foldFree2
|
||||
, hoistFree2
|
||||
@ -109,8 +109,8 @@ instance FreeAlgebra2 Arr where
|
||||
foldNatFree2 = foldArr
|
||||
{-# INLINE foldNatFree2 #-}
|
||||
|
||||
codom2 = proof
|
||||
forget2 = proof
|
||||
codom2 = Proof
|
||||
forget2 = Proof
|
||||
|
||||
--
|
||||
-- Free arrows using CSP style
|
||||
@ -166,5 +166,5 @@ instance FreeAlgebra2 A where
|
||||
foldNatFree2 fun (A f) = f fun
|
||||
{-# INLINE foldNatFree2 #-}
|
||||
|
||||
codom2 = proof
|
||||
forget2 = proof
|
||||
codom2 = Proof
|
||||
forget2 = Proof
|
||||
|
@ -71,7 +71,7 @@ import Control.Algebra.Free2
|
||||
( AlgebraType0
|
||||
, AlgebraType
|
||||
, FreeAlgebra2 (..)
|
||||
, proof
|
||||
, Proof (..)
|
||||
, wrapFree2
|
||||
, foldFree2
|
||||
, hoistFree2
|
||||
@ -347,8 +347,8 @@ instance FreeAlgebra2 Cat where
|
||||
foldNatFree2 = foldNatCat
|
||||
{-# INLINE foldNatFree2 #-}
|
||||
|
||||
codom2 = proof
|
||||
forget2 = proof
|
||||
codom2 = Proof
|
||||
forget2 = Proof
|
||||
|
||||
|
||||
--
|
||||
@ -449,8 +449,8 @@ instance FreeAlgebra2 C where
|
||||
foldNatFree2 = foldNatC
|
||||
{-# INLINE foldNatFree2 #-}
|
||||
|
||||
codom2 = proof
|
||||
forget2 = proof
|
||||
codom2 = Proof
|
||||
forget2 = Proof
|
||||
|
||||
instance Arrow f => Arrow (C f) where
|
||||
arr ab = C $ \k -> k (arr ab)
|
||||
|
@ -59,7 +59,7 @@ import Data.Semigroup (Semigroup (..))
|
||||
import Control.Algebra.Free2 ( AlgebraType0
|
||||
, AlgebraType
|
||||
, FreeAlgebra2 (..)
|
||||
, proof
|
||||
, Proof (..)
|
||||
)
|
||||
|
||||
-- | Oposite categoy in which arrows from @a@ to @b@ are represented by arrows
|
||||
@ -188,8 +188,8 @@ instance FreeAlgebra2 ListTr where
|
||||
foldNatFree2 = foldNatL
|
||||
{-# INLINE foldNatFree2 #-}
|
||||
|
||||
codom2 = proof
|
||||
forget2 = proof
|
||||
codom2 = Proof
|
||||
forget2 = Proof
|
||||
|
||||
instance Semigroup (ListTr f o o) where
|
||||
f <> g = g . f
|
||||
@ -453,8 +453,8 @@ instance FreeAlgebra2 Queue where
|
||||
foldNatFree2 = foldNatQ
|
||||
{-# INLINE foldNatFree2 #-}
|
||||
|
||||
codom2 = proof
|
||||
forget2 = proof
|
||||
codom2 = Proof
|
||||
forget2 = Proof
|
||||
|
||||
instance Semigroup (Queue f o o) where
|
||||
f <> g = g `composeQ` f
|
||||
|
@ -22,7 +22,7 @@ import Control.Category (Category (..))
|
||||
import Data.Functor.Identity (Identity (..))
|
||||
|
||||
import Control.Algebra.Free2 (FreeAlgebra2 (..))
|
||||
import Data.Algebra.Free (AlgebraType, AlgebraType0, proof)
|
||||
import Data.Algebra.Free (AlgebraType, AlgebraType0, Proof (..))
|
||||
|
||||
|
||||
-- | Categories which can lift monadic actions, i.e. effectful categories.
|
||||
@ -59,8 +59,8 @@ instance Monad m => FreeAlgebra2 (EffCat m) where
|
||||
foldNatFree2 nat (Base cab) = nat cab
|
||||
foldNatFree2 nat (Effect mcab) = effect $ foldNatFree2 nat <$> mcab
|
||||
|
||||
codom2 = proof
|
||||
forget2 = proof
|
||||
codom2 = Proof
|
||||
forget2 = Proof
|
||||
|
||||
-- | Wrap a transition into @'EffCat' cat@ for any free category 'cat' (e.g.
|
||||
-- 'Cat').
|
||||
|
Loading…
Reference in New Issue
Block a user