copilot-core-0.2.3: An intermediate representation for Copilot.

Safe HaskellSafe-Infered

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 DynamicF whereSource

Constructors

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

toDyn :: EqualType t => t a -> a -> Dynamic tSource

fromDyn :: EqualType t => t a -> Dynamic t -> Maybe aSource

toDynF :: EqualType t => t a -> f a -> DynamicF f tSource

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