0 | module Control.Cont.Void
2 | import Control.EffectAlgebra
3 | import Control.HigherOrder
5 | import Control.Monad.Free
8 | data VoidC1 : Type -> Type where
11 | VoidC : (Type -> Type) -> (Type -> Type)
15 | VoidE : (Type -> Type) -> (Type -> Type)
19 | Uninhabited (VoidC1 a) where
20 | uninhabited x impossible
23 | Functor VoidC1 where
27 | runVoidC : Free VoidC a -> a
28 | runVoidC (Return x) = x
29 | runVoidC (Op (MkLift x)) = absurd x
33 | [Void] (mon : Monad m) => Algebra VoidE m where
34 | alg ctx hdl (MkLift x) = absurd x
38 | AlgebraVoid : (mon : Monad m) => Algebra VoidE m
39 | AlgebraVoid = Algebra.Void