[Haskell-beginners] ghci access to .hs functions
Brent Yorgey
byorgey at seas.upenn.edu
Thu Aug 12 04:01:42 EDT 2010
It's hard to tell just looking at what you have given. Can you show
us the exact contents of your .hs file?
On Wed, Aug 11, 2010 at 01:17:09PM -0700, prad wrote:
> 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
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
More information about the Beginners
mailing list