uni-util-2.3.0.1: Utilities for the uniform workbench

Safe HaskellNone

Util.Dynamics

Description

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

Documentation

class Typeable a where

The class Typeable allows a concrete representation of a type to be calculated.

Methods

typeOf :: a -> TypeRep

Takes a value of type a and returns a concrete representation of that type. The value of the argument should be ignored by any instance of Typeable, so that it is safe to pass undefined as the argument.

Instances

Typeable Bool 
Typeable Char 
Typeable Double 
Typeable Float 
Typeable Int 
Typeable Int8 
Typeable Int16 
Typeable Int32 
Typeable Int64 
Typeable Integer 
Typeable Ordering 
Typeable RealWorld 
Typeable Word 
Typeable Word8 
Typeable Word16 
Typeable Word32 
Typeable Word64 
Typeable () 
Typeable Handle 
Typeable Handle__ 
Typeable PatternMatchFail 
Typeable RecSelError 
Typeable RecConError 
Typeable RecUpdError 
Typeable NoMethodError 
Typeable NonTermination 
Typeable NestedAtomically 
Typeable ThreadId 
Typeable BlockedIndefinitelyOnMVar 
Typeable BlockedIndefinitelyOnSTM 
Typeable Deadlock 
Typeable AssertionFailed 
Typeable AsyncException 
Typeable ArrayException 
Typeable ExitCode 
Typeable WordPtr 
Typeable IntPtr 
Typeable Dynamic 
Typeable CChar 
Typeable CSChar 
Typeable CUChar 
Typeable CShort 
Typeable CUShort 
Typeable CInt 
Typeable CUInt 
Typeable CLong 
Typeable CULong 
Typeable CLLong 
Typeable CULLong 
Typeable CFloat 
Typeable CDouble 
Typeable CPtrdiff 
Typeable CSize 
Typeable CWchar 
Typeable CSigAtomic 
Typeable CClock 
Typeable CTime 
Typeable CUSeconds 
Typeable CSUSeconds 
Typeable CIntPtr 
Typeable CUIntPtr 
Typeable CIntMax 
Typeable CUIntMax 
Typeable IOException 
Typeable SomeException 
Typeable ErrorCall 
Typeable ArithException 
Typeable TypeRep 
Typeable TyCon 
Typeable ByteString 
Typeable ServiceEntry 
Typeable ProtocolEntry 
Typeable HostEntry 
Typeable NetworkEntry 
Typeable SocketOption 
Typeable ShutdownCmd 
Typeable AddrInfoFlag 
Typeable AddrInfo 
Typeable NameInfoFlag 
Typeable Socket 
Typeable SocketStatus 
Typeable SocketType 
Typeable PortNumber 
Typeable SockAddr 
Typeable SourcePos 
Typeable LocalTime 
Typeable ZonedTime 
Typeable AtomString 
Typeable UniqueStringSource 
Typeable ICStringLen 
(Typeable1 s, Typeable a) => Typeable (s a)

One Typeable instance for all Typeable1 instances

data TypeRep

A concrete representation of a (monomorphic) type. TypeRep supports reasonably efficient equality.

toDyn :: Typeable a => a -> DynSource

fromDynamicWE :: Typeable a => Dyn -> WithError aSource

Like fromDynamic but provides an error message indicating what types are getting confused.

dynCast :: (Typeable a, Typeable b) => String -> a -> bSource