[commit: ghc-prim] no-pred-ty: Boxes for implicit parameters and equality evidence (3d21465)
Max Bolingbroke
batterseapower at hotmail.com
Mon Aug 15 11:37:59 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/ghc-prim
On branch : no-pred-ty
http://hackage.haskell.org/trac/ghc/changeset/3d2146521b7c13303b53901d92478e65069ebf79
>---------------------------------------------------------------
commit 3d2146521b7c13303b53901d92478e65069ebf79
Author: Max Bolingbroke <batterseapower at hotmail.com>
Date: Mon Aug 15 10:37:49 2011 +0100
Boxes for implicit parameters and equality evidence
>---------------------------------------------------------------
GHC/Types.hs | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/GHC/Types.hs b/GHC/Types.hs
index 005a588..ed241a2 100644
--- a/GHC/Types.hs
+++ b/GHC/Types.hs
@@ -17,7 +17,8 @@
module GHC.Types (
Bool(..), Char(..), Int(..),
- Float(..), Double(..), IO(..)
+ Float(..), Double(..), IO(..),
+ IPBox(..)
) where
import GHC.Prim
@@ -74,6 +75,20 @@ or the '>>' and '>>=' operations from the 'Monad' class.
newtype IO a = IO (State# RealWorld -> (# State# RealWorld, a #))
+-- | A data constructor used to box up all implicit parameter arguments
+--
+-- This is very special in that we never use the IPBox TyCon directly.
+-- Instead, internally GHC attributes many different TyCons (one for
+-- each implicit parameter name) to the IPBox data constructor
+data IPBox a = IPBox a
+
+-- | A data constructor used to box up all unlifted equalities
+--
+-- The type constructor is special in that GHC pretends that it
+-- has kind (? -> ? -> Fact) rather than (* -> * -> *)
+data (~) a b = EqBox (Eq# a b)
+
+
--------------------------------------------------------------------------------
-- Generic representations
--------------------------------------------------------------------------------
More information about the Cvs-libraries
mailing list