Another question about subkinds in Core

Simon Peyton-Jones simonpj at microsoft.com
Tue Apr 22 04:10:18 EDT 2008


| For the ghc-prim:PrimopWrappers module, GHC generates some External
| Core bindings that look like:
|
| ghc-prim:GHC.PrimopWrappers.touch#
|   :: %forall t . t -> (State# RealWorld)
|                    -> (State# RealWorld) =
|      ghc-prim:GHC.Prim.touch#;
|
| But this doesn't look right, because GHC.Prim.touch# has type:
| %forall (t::?) . t -> (State# RealWorld) -> (State# RealWorld)
|
| Or at least it's declared that way in primops.txt.

Really?  compiler/prelude/primops.txt.pp says this:

primop TouchOp "touch#" GenPrimOp
   o -> State# RealWorld -> State# RealWorld
   with
   has_side_effects = True

Is that the bit you meant?


The whole sub-kinding thing is a thin-ice part of GHC.  It's used in very limited ways and I'm not sure I got it all right!

S



More information about the Cvs-ghc mailing list