[Haskell-beginners] ghci access to .hs functions
prad
prad at towardsfreedom.com
Wed Aug 11 16:17:09 EDT 2010
in an effort to figure out type declarations i thought i'd let ghci do
the work.
so i wrote a program:
import ...
main = do
...
func1
func2
now when i load this into ghci i can't to :t func1 etc and get a not in
scope error
however, if i put a return () onto the end of main:
import ...
main = do
...
return ()
func1
func2
the functions are in scope of ghci and i can find out the types.
so what is happening here? i understand that return is different in
haskell than in other languages, but i don't understand just what it is
doing. :(
--
In friendship,
prad
... with you on your journey
Towards Freedom
http://www.towardsfreedom.com (website)
Information, Inspiration, Imagination - truly a site for soaring I's
More information about the Beginners
mailing list