Ah, yes. What I actually was thinking about was: is it allowed to parse it as stated? The reason is that the name 'y' is bound when executing f, so it takes that value and returns it.
My example can be minimized further:
f = y main = (\y -> f) 2
My program does not typecheck on beforehand, because that is not required...
per odlund
unread,
Mar 9, 2011, 6:06:23 PM3/9/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
f = y , is not valid if not y is defined as a constant, making f a constant. But in the scope I have seen I don't see a y in the global map.
if y is defined this is (might do some step wrong,kinda late) do it. y = 3
f = y main = (\y -> f) 2
main = (f) [y := 2] main = f [f := y] main = y [f := 3] main = 3
Even if f would take an y as an argument, that wouldn't change much, they are not the y and we should do a alpha-convertion to treat them differently. Even now we have 2 variables called y but they are not the same.
since f is a constant [y := 2] wont do much. I think you need to look over the rules one more time.