From: Pepe Iborra Date: Wed, 8 Nov 2006 15:59:38 +0000 (+0000) Subject: Added Unknowns for higher kinds X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=c96135409f18fa1b2efd5fa04a4709b27d1e8774;p=ghc-base.git Added Unknowns for higher kinds --- diff --git a/GHC/Base.lhs b/GHC/Base.lhs index 2b79b78..4fc09a6 100644 --- a/GHC/Base.lhs +++ b/GHC/Base.lhs @@ -732,6 +732,12 @@ breakpointCond :: Bool -> a -> a breakpointCond _ r = r data Unknown +data Unknown1 a +data Unknown2 a b +data Unknown3 a b c +data Unknown4 a b c d + +data Opaque = forall a. O a -- | Constant function. const :: a -> b -> a diff --git a/GHC/Exts.hs b/GHC/Exts.hs index 7b850d4..20f43ef 100644 --- a/GHC/Exts.hs +++ b/GHC/Exts.hs @@ -29,7 +29,7 @@ module GHC.Exts Splittable(..), -- * Debugging - breakpoint, breakpointCond, Unknown, + breakpoint, breakpointCond, Unknown, Unknown2, Unknown3, Unknown4, -- * Ids with special behaviour lazy, inline, diff --git a/GHC/Show.lhs b/GHC/Show.lhs index 06fddd8..85d4c7d 100644 --- a/GHC/Show.lhs +++ b/GHC/Show.lhs @@ -423,4 +423,21 @@ itos n# cs instance Show Unknown where show _ = "This is an untyped, unevaluated computation. You can use seq to force its evaluation and then :print to recover its type" showList _ = ("This is an untyped, unevaluated computation. You can use seq to force its evaluation and then :print to recover its type" ++) + +instance Show (Unknown1 a) where + show _ = "This is an untyped, unevaluated computation. You can use seq to force its evaluation and then :print to recover its type" + showList _ = ("This is an untyped, unevaluated computation. You can use seq to force its evaluation and then :print to recover its type" ++) + +instance Show (Unknown2 a b) where + show _ = "This is an untyped, unevaluated computation. You can use seq to force its evaluation and then :print to recover its type" + showList _ = ("This is an untyped, unevaluated computation. You can use seq to force its evaluation and then :print to recover its type" ++) + +instance Show (Unknown3 a b c) where + show _ = "This is an untyped, unevaluated computation. You can use seq to force its evaluation and then :print to recover its type" + showList _ = ("This is an untyped, unevaluated computation. You can use seq to force its evaluation and then :print to recover its type" ++) + +instance Show (Unknown4 a b c d) where + show _ = "This is an untyped, unevaluated computation. You can use seq to force its evaluation and then :print to recover its type" + showList _ = ("This is an untyped, unevaluated computation. You can use seq to force its evaluation and then :print to recover its type" ++) + \end{code} \ No newline at end of file