quickspec-0.9.2: Equational laws for free

Safe HaskellNone

Test.QuickSpec.Utils.Typed

Description

Functions for working with existentially-quantified types and similar.

Documentation

data Some f Source

Constructors

forall a . Typeable a => Some (f a) 

newtype O f g a Source

Constructors

O 

Fields

unO :: f (g a)
 

type List = []Source

type Several f = Some (List `O` f)Source

newtype Witnessed a Source

Constructors

Witness 

Fields

witness :: a
 

data Tagged a Source

Constructors

Tagged 

Fields

tag :: Witness
 
erase :: a
 

tagged :: Typeable a => (f a -> b) -> f a -> Tagged bSource

some :: (forall a. Typeable a => f a -> b) -> Some f -> bSource

several :: (forall a. Typeable a => [f a] -> b) -> Several f -> bSource

some2 :: (forall a. Typeable a => f (g a) -> b) -> Some (f `O` g) -> bSource

mapSome :: (forall a. Typeable a => f a -> g a) -> Some f -> Some gSource

mapSome2 :: (forall a. Typeable a => f (g a) -> h (i a)) -> Some (f `O` g) -> Some (h `O` i)Source

mapSomeM :: Monad m => (forall a. Typeable a => f a -> m (g a)) -> Some f -> m (Some g)Source