[commit: ghc] wip/generalized-arrow: Special case Constraint (9c9fa7f)

git at git.haskell.org git at git.haskell.org
Fri Mar 25 12:13:36 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/generalized-arrow
Link       : http://ghc.haskell.org/trac/ghc/changeset/9c9fa7f97a91cbf673ab6214b9fb3a3a08adcc11/ghc

>---------------------------------------------------------------

commit 9c9fa7f97a91cbf673ab6214b9fb3a3a08adcc11
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Fri Mar 25 13:13:23 2016 +0100

    Special case Constraint


>---------------------------------------------------------------

9c9fa7f97a91cbf673ab6214b9fb3a3a08adcc11
 compiler/types/Type.hs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/compiler/types/Type.hs b/compiler/types/Type.hs
index c516664..bab28b7 100644
--- a/compiler/types/Type.hs
+++ b/compiler/types/Type.hs
@@ -211,7 +211,8 @@ import Class
 import TyCon
 import TysPrim
 import {-# SOURCE #-} TysWiredIn ( listTyCon, typeNatKind
-                                 , typeSymbolKind, runtimeRepTy, liftedTypeKind )
+                                 , typeSymbolKind, runtimeRepTy, ptrRepLiftedTy
+                                 , liftedTypeKind )
 import PrelNames
 import CoAxiom
 import {-# SOURCE #-} Coercion
@@ -1018,6 +1019,8 @@ tyConAppArgN n ty
 -- | If given a type @TYPE (rr :: RuntimeRep)@ then returns @Just rr@
 -- otherwise @Nothing at .
 tyRuntimeRep_maybe :: Type -> Maybe Type
+tyRuntimeRep_maybe ty
+  | isConstraintKind ty   = Just ptrRepLiftedTy -- FIXME This is a hack
 tyRuntimeRep_maybe (TyConApp tc [rr])
   | tc == tYPETyCon       = ASSERT(typeKind rr `eqType` runtimeRepTy)
                             Just rr



More information about the ghc-commits mailing list