blob: b90fafe36cbb393d5a7e4dfff3ff96eb4c9b19ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
%
% (c) AQUA Project, Glasgow University, 1998
%
The Dynamic type is used in the Exception type, so we have to have
Dynamic visible here. The rest of the operations on Dynamics are
available in exts/Dynamic.lhs.
\begin{code}
{-# OPTIONS -fno-implicit-prelude #-}
#ifndef __HUGS__
module PrelDynamic where
import PrelBase
#endif
data Dynamic = Dynamic TypeRep Obj
data Obj = Obj
-- dummy type to hold the dynamically typed value.
data TypeRep
= App TyCon [TypeRep]
| Fun TypeRep TypeRep
deriving ( Eq )
-- type constructors are
data TyCon = TyCon Int String
instance Eq TyCon where
(TyCon t1 _) == (TyCon t2 _) = t1 == t2
\end{code}
|