mirror of
https://github.com/Lysxia/first-class-families.git
synced 2024-09-11 19:47:12 +03:00
lifted list catenation
This commit is contained in:
parent
2a4bbea694
commit
5d96b1919e
@ -11,6 +11,7 @@
|
||||
module Fcf.Data.List
|
||||
( -- * Basic functions
|
||||
type (++)
|
||||
, type (^++^)
|
||||
, Head
|
||||
, Last
|
||||
, Tail
|
||||
@ -105,6 +106,9 @@ import Fcf.Utils (If, TyEq)
|
||||
data (++) :: [a] -> [a] -> Exp [a]
|
||||
type instance Eval ((++) xs ys) = xs <> ys
|
||||
|
||||
infixr 5 ^++^
|
||||
data (^++^) :: Exp [a] -> Exp [a] -> Exp [a]
|
||||
type instance Eval ((^++^) xs ys) = Eval (LiftM2 (++) xs ys)
|
||||
|
||||
data Head :: [a] -> Exp (Maybe a)
|
||||
type instance Eval (Head '[]) = 'Nothing
|
||||
|
Loading…
Reference in New Issue
Block a user