[Yhc] coreFunc has extra argument
Jeremy Shaw
jeremy at n-heptane.com
Tue Mar 4 02:41:33 EST 2008
At Mon, 3 Mar 2008 21:38:51 -0600,
Tom Hawkins wrote:
> What am I missing here? Am I to interpret this as meaning:
>
> b -> YHC.Primitive;_E a == IO a ?
Yes. From src/packages/yhc-base-1.0/YHC/Internal.hs:
data World = World
newtype IO a = IO (World -> _E a)
Remember that the 'newtype' is coverted to a type alias after type
checking.
So:
main :: IO ()
is really,
main :: World -> _E ()
and when the 'compiler' calls main it actually passes in a World
value. (Or at least, in my yca2swf compiler I believe I do). I believe
'tackling the awkward squad' explains the World parameter.
http://research.microsoft.com/~simonpj/papers/marktoberdorf/
hth,
j.
More information about the Yhc
mailing list