Another question about subkinds in Core
Tim Chevalier
catamorphism at gmail.com
Tue Apr 22 12:30:23 EDT 2008
On 4/22/08, Simon Peyton-Jones <simonpj at microsoft.com> wrote:
>
> | 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?
>
Right, and by convention, "o" stands for an open ty var (grep for
openAlphaTyVar in the code...) But it's all quite obscure.
Cheers,
Tim
--
Tim Chevalier * http://cs.pdx.edu/~tjc * Often in error, never in doubt
"No one in the world ever gets what they want and that is beautiful /
Everybody dies frustrated and sad and that is beautiful."--TMBG
More information about the Cvs-ghc
mailing list