#endif
#ifdef __HUGS__
+import Hugs.Prelude
import Hugs.IO
import Hugs.IORef
import Hugs.IOExts
'Show'ing a value of type 'Dynamic' returns a pretty-printed representation
of the object\'s type; useful for debugging.
-}
+#ifndef __HUGS__
data Dynamic = Dynamic TypeRep Obj
+#endif
instance Show Dynamic where
-- the instance just prints the type representation.
-- the other hand, if we use a polymorphic type, GHC will use
-- a fallback convention for evaluating it that works for all types.
-- (using a function type here would also work).
-#else
+#elif !defined(__HUGS__)
data Obj = Obj
#endif
-- | A concrete representation of a (monomorphic) type. 'TypeRep'
-- supports reasonably efficient equality.
+#ifndef __HUGS__
data TypeRep
= App TyCon [TypeRep]
| Fun TypeRep TypeRep
deriving ( Eq )
+#endif
instance Show TypeRep where
showsPrec p (App tycon tys) =
-- | An abstract representation of a type constructor. 'TyCon' objects can
-- be built using 'mkTyCon'.
+#ifndef __HUGS__
data TyCon = TyCon Int String
instance Eq TyCon where
(TyCon t1 _) == (TyCon t2 _) = t1 == t2
+#endif
instance Show TyCon where
showsPrec _ (TyCon _ s) = showString s