Idris2-boot/libs/base/Language/Reflection.idr

29 lines
520 B
Idris
Raw Normal View History

2019-08-24 19:41:11 +03:00
module Language.Reflection
2019-11-30 16:23:03 +03:00
import public Language.Reflection.TT
import public Language.Reflection.TTImp
2019-08-24 19:41:11 +03:00
public export
data Elab : Type -> Type where
Pure : a -> Elab a
Bind : Elab a -> (a -> Elab b) -> Elab b
Check : TTImp -> Elab a
mutual
export
Functor Elab where
map f e = do e' <- e
pure (f e')
export
Applicative Elab where
pure = Pure
f <*> a = do f' <- f
a' <- a
pure (f' a')
export
Monad Elab where
(>>=) = Bind