Safe Haskell | None |
---|---|
Language | Haskell2010 |
A wrapper for the new GHC (and Hugs) Dynamic module. The main improvement over the original Dynamic module is that we provide flavours of TypeableXXXX for kinds with arguments other than *, a feature used by DisplayView.
Synopsis
- class Typeable (a :: k)
- type TypeRep = SomeTypeRep
- type Dyn = Dynamic
- toDyn :: Typeable a => a -> Dyn
- fromDynamic :: Typeable a => Dyn -> Maybe a
- fromDynamicWE :: Typeable a => Dyn -> WithError a
- coerce :: Typeable a => Dyn -> a
- coerceIO :: Typeable a => Dyn -> IO a
- typeMismatch :: IOError
- dynCast :: (Typeable a, Typeable b) => String -> a -> b
- dynCastOpt :: (Typeable a, Typeable b) => a -> Maybe b
Documentation
The class Typeable
allows a concrete representation of a type to
be calculated.
typeRep#
type TypeRep = SomeTypeRep #
A quantified type representation.
fromDynamicWE :: Typeable a => Dyn -> WithError a Source #
Like fromDynamic
but provides an error message indicating what
types are getting confused.