1
Fork 0
solar-conflux/purescript/free/src/Exists.purs
Matei Adriel 05d04490e8 Add free
2023-10-29 02:17:37 +02:00

15 lines
348 B
Plaintext

module Existsential where
import Prelude
import Unsafe.Coerce (unsafeCoerce)
foreign import data Test :: forall k. (k -> Type) -> Type
foreign import data Exists :: forall a b. (a -> b) -> b
mkExists :: forall f a. f a -> Exists f
mkExists = unsafeCoerce
runExists :: forall f r. (forall a. f a -> r) -> Exists f -> r
runExists = unsafeCoerce