copilot-core-3.2: An intermediate representation for Copilot.
Safe HaskellSafe
LanguageHaskell2010

Copilot.Core.Type.Dynamic

Description

An implementation of dynamic types using Copilot.Core.Type.Equality. The theory behind this technique is described the following paper:

  • Baars, Arthur I. and Swierstra, S. Doaitse, "Typing dynamic typing", ACM SIGPLAN Notices vol. 37, p. 157-166, 2002

Documentation

data Dynamic :: (* -> *) -> * where Source #

Constructors

Dynamic :: a -> t a -> Dynamic t 

data DynamicF :: (* -> *) -> (* -> *) -> * where Source #

Constructors

DynamicF :: f a -> t a -> DynamicF f t 

toDyn :: t a -> a -> Dynamic t Source #

fromDyn :: EqualType t => t a -> Dynamic t -> Maybe a Source #

toDynF :: t a -> f a -> DynamicF f t Source #

fromDynF :: EqualType t => t a -> DynamicF f t -> Maybe (f a) Source #