reflection-0.0.0: Functional Pearl: Implicit ConfigurationsSource codeContentsIndex
Data.Reflection
Portabilitynon-portable (scoped types, MPTCs, rank-n, FFI, kinds)
Stabilityexperimental
MaintainerEdward Kmett <ekmett@gmail.com>
Contents
Reflect Integrals
Reflect Lists of Integrals
Reflect Storables
Reflect Anything
Description

Implementation of the Functional Pearl: Implicit Configurations paper by Oleg Kiselyov and Chung-chieh Shan.

http://www.cs.rutgers.edu/~ccshan/prepose/prepose.pdf

Packaged and updated to work with the current implementation of scoped type variables by Edward Kmett.

Synopsis
class ReflectNum s where
reflectNum :: Num a => s -> a
reflectNum :: (ReflectNum s, Num a) => s -> a
reifyIntegral :: Integral a => a -> (forall s. ReflectNum s => s -> w) -> w
class ReflectNums ss
reifyIntegrals :: Integral a => [a] -> (forall ss. ReflectNums ss => ss -> w) -> w
class ReflectStorable s where
reflectStorable :: Storable a => s a -> a
reflectStorable :: (ReflectStorable s, Storable a) => s a -> a
reifyStorable :: Storable a => a -> (forall s. ReflectStorable s => s a -> w) -> w
class Reflect s a | s -> a where
reflect :: s -> a
reflect :: Reflect s a => s -> a
reify :: a -> (forall s. Reflect s a => s -> w) -> w
Reflect Integrals
class ReflectNum s whereSource
Methods
reflectNum :: Num a => s -> aSource
show/hide Instances
ReflectNum Zero
ReflectNum s => ReflectNum (Pred s)
ReflectNum s => ReflectNum (Succ s)
ReflectNum s => ReflectNum (Twice s)
reflectNum :: (ReflectNum s, Num a) => s -> aSource
reifyIntegral :: Integral a => a -> (forall s. ReflectNum s => s -> w) -> wSource
Reflect Lists of Integrals
class ReflectNums ss Source
show/hide Instances
ReflectNums Nil
(ReflectNum s, ReflectNums ss) => ReflectNums (Cons s ss)
reifyIntegrals :: Integral a => [a] -> (forall ss. ReflectNums ss => ss -> w) -> wSource
Reflect Storables
class ReflectStorable s whereSource
Methods
reflectStorable :: Storable a => s a -> aSource
show/hide Instances
reflectStorable :: (ReflectStorable s, Storable a) => s a -> aSource
reifyStorable :: Storable a => a -> (forall s. ReflectStorable s => s a -> w) -> wSource
Reflect Anything
class Reflect s a | s -> a whereSource
Methods
reflect :: s -> aSource
show/hide Instances
ReflectStorable s => Reflect (Stable s a) a
reflect :: Reflect s a => s -> aSource
reify :: a -> (forall s. Reflect s a => s -> w) -> wSource
Produced by Haddock version 2.4.1