[Yhc] single element tuple
tomahawkins at gmail.com
Fri Mar 14 10:28:52 EDT 2008
Printing the core one of my programs I see:
data Prelude;1() a =
What is this? A single element tuple? I didn't think Haskell had
these. My program has a monad similar to IO. It appears these
Prelude;1() things are created in the lambda lifted version of f1.
Perhaps is it the parenthesis around (System m)?
data Return a = Return a World
data System a = System (World -> Return a)
data World = World
instance Monad System where
(System m) >>= k = System f1
f1 w = f2 w'
Return r w' = m w
System f2 = k r
return a = System (\ w -> Return a w)
It's a bit difficult to correlate arguments of lifted lambdas to the
original source. Is there a convention YHC uses for adding the extra
arguments to lifted lambdas?
More information about the Yhc