-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Functional Pearl: Implicit Configurations -- -- Implementation of the ideas presented in the paper Functional -- Pearl: Implicit Configurations by Oleg Kiselyov and Chung-chieh -- Shan. Modified to avoid the use of scoped type variables, and to use a -- phantom type wrapper rather than dummy arguments. @package reflection @version 0.3.0 -- | Based on the Functional Pearl: Implicit Configurations paper by Oleg -- Kiselyov and Chung-chieh Shan. -- -- http://www.cs.rutgers.edu/~ccshan/prepose/prepose.pdf -- -- Modified to minimize extensions and work with Data.Tagged rather than -- explicit scoped type variables by Edward Kmett. module Data.Reflection class ReifiesNum s reflectNum :: (ReifiesNum s, Num a) => Tagged s a reifyIntegral :: (Integral a) => a -> (forall s. (ReifiesNum s) => Tagged s w) -> w class ReifiesNums ss reifyIntegrals :: (Integral a) => [a] -> (forall ss. (ReifiesNums ss) => Tagged ss w) -> w class ReifiesStorable s reflectStorable :: (ReifiesStorable s, Storable a) => Tagged (s a) a reifyStorable :: (Storable a) => a -> (forall s. (ReifiesStorable s) => Tagged (s a) w) -> w class Reifies s a | s -> a reflect :: (Reifies s a) => Tagged s a reify :: a -> (forall s. (Reifies s a) => Tagged s w) -> w instance Show (Pred s) instance Show (Succ s) instance Show (Twice s) instance Show Zero instance (ReifiesStorable s) => Reifies (Stable s a) a instance Unused (Stable s a) instance (ReifiesNums s) => ReifiesStorable (Store s) instance Unused (Store s a) instance (ReifiesNum s, ReifiesNums ss) => ReifiesNums (Cons s ss) instance ReifiesNums Nil instance Unused (Cons s ss) instance Unused Nil instance (ReifiesNum s) => ReifiesNum (Pred s) instance (ReifiesNum s) => ReifiesNum (Succ s) instance (ReifiesNum s) => ReifiesNum (Twice s) instance ReifiesNum Zero instance Unused (Pred s) instance Unused (Succ s) instance Unused (Twice s) instance Unused Zero