:r myfile.hs does nothing
25 Oct
2007
25 Oct
'07
11:14 a.m.
Hi While teaching beginners I noticed that about 5 of them made the same mistake. They were typing ":r filename.hs" to load a file, which doesn't load a file, but reloads the currently active module (the Prelude in this case). It was made worse by the fact that their file was sum.hs and contained an implementation of sum which they had to test - and the Prelude version hid their error. Is there anything that can be typed after ":r" which gives the command any effect? If not, perhaps ":r anything" should be reported to the user as a warning or an error. To compare to GHC's behaviour: GHCi Prelude> :r Ok, modules loaded: none. Prelude> :r foo.hs module does not exist Prelude> Thanks Neil
6901
Age (days ago)
6901
Last active (days ago)
0 comments
1 participants
participants (1)
-
Neil Mitchell