
Hi! This must be a bug (and one that should be fixed ASAP), not only because it's not how we define bindings (a name can only be bound once), but also because if we separate the two definitions of "temp" we do get a compile error "duplicate variable": import POSIX root :: RootType root w = do temp = "12" env = new posix w temp = "abc" env.stdout.write (show temp) I hope that Johan can fix it soon. Regards, Andrey On May 2, 2010, at 23:41, Per Lindgren wrote:
Hi
Consider: ------------- module Err1 where
import POSIX
root :: RootType root w = do env = new posix w temp = "12" temp = "abc" env.stdout.write (show temp)
What is the defined behavior?
(The result using timberc is no compiler error and the output "12" when executed. If that is what's intended, then we might be in for some confused programmers. )
/Per
_______________________________________________ Timber mailing list Timber@haskell.org http://www.haskell.org/mailman/listinfo/timber
------------------------------------------------------------------------ Andrey Kruglyak PhD student http://www.andreykruglyak.com Dept. of Computer Science and Electrical Engineering Lulea University of Technology, Lulea, Sweden T +46 920 49 23 57 (office) T +46 706 16 76 03 (mobile) Office A2314 (A-huset)