-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Functional Pearl: Implicit Configurations -- -- Implementation of the code in Functional Pearl: Implicit -- Configurations by Oleg Kiselyov and Chung-chieh Shan @package reflection @version 0.1.0 -- | 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. module Data.Reflection class ReflectedNum s reflectNum :: (ReflectedNum s, Num a) => s -> a reflectNum :: (ReflectedNum s, Num a) => s -> a reifyIntegral :: (Integral a) => a -> (forall s. (ReflectedNum s) => s -> w) -> w class ReflectedNums ss reifyIntegrals :: (Integral a) => [a] -> (forall ss. (ReflectedNums ss) => ss -> w) -> w class ReflectedStorable s reflectStorable :: (ReflectedStorable s, Storable a) => s a -> a reflectStorable :: (ReflectedStorable s, Storable a) => s a -> a reifyStorable :: (Storable a) => a -> (forall s. (ReflectedStorable s) => s a -> w) -> w class Reflects s a | s -> a reflect :: (Reflects s a) => s -> a reflect :: (Reflects s a) => s -> a reify :: a -> (forall s. (Reflects s a) => s -> w) -> w instance (ReflectedStorable s) => Reflects (Stable s a) a instance (ReflectedNums s) => ReflectedStorable (Store s) instance (ReflectedNum s, ReflectedNums ss) => ReflectedNums (Cons s ss) instance ReflectedNums Nil instance (ReflectedNum s) => ReflectedNum (Pred s) instance (ReflectedNum s) => ReflectedNum (Succ s) instance (ReflectedNum s) => ReflectedNum (Twice s) instance ReflectedNum Zero