mirror of
https://github.com/coot/free-category.git
synced 2024-11-23 00:56:58 +03:00
Consistently add inline pragmas to AlgebraFree2 instances
It's not required in some of them, but in others (e.g. C) the rewrite rules fire only when they are present. Also since we intend to inline the definitions, it's better to be explicit.
This commit is contained in:
parent
131fd47651
commit
2bfe243cdf
@ -345,11 +345,14 @@ type instance AlgebraType Cat c = Category c
|
||||
--
|
||||
instance FreeAlgebra2 Cat where
|
||||
liftFree2 = liftCat
|
||||
{-# INLINE liftFree2 #-}
|
||||
foldNatFree2 = foldNatCat
|
||||
{-# INLINE foldNatFree2 #-}
|
||||
|
||||
codom2 = proof
|
||||
forget2 = proof
|
||||
|
||||
|
||||
--
|
||||
-- CPS style free categories
|
||||
--
|
||||
@ -446,6 +449,7 @@ instance FreeAlgebra2 C where
|
||||
liftFree2 = liftC
|
||||
{-# INLINE liftFree2 #-}
|
||||
foldNatFree2 = foldNatC
|
||||
{-# INLINE foldNatFree2 #-}
|
||||
|
||||
codom2 = proof
|
||||
forget2 = proof
|
||||
|
@ -178,7 +178,9 @@ type instance AlgebraType ListTr c = Category c
|
||||
|
||||
instance FreeAlgebra2 ListTr where
|
||||
liftFree2 = liftL
|
||||
{-# INLINE liftFree2 #-}
|
||||
foldNatFree2 = foldNatL
|
||||
{-# INLINE foldNatFree2 #-}
|
||||
|
||||
codom2 = proof
|
||||
forget2 = proof
|
||||
@ -441,7 +443,9 @@ type instance AlgebraType Queue c = Category c
|
||||
|
||||
instance FreeAlgebra2 Queue where
|
||||
liftFree2 = liftQ
|
||||
{-# INLINE liftFree2 #-}
|
||||
foldNatFree2 = foldNatQ
|
||||
{-# INLINE foldNatFree2 #-}
|
||||
|
||||
codom2 = proof
|
||||
forget2 = proof
|
||||
|
Loading…
Reference in New Issue
Block a user