[Haskell-beginners] Haskell REPL doesn't accept type declaration

Lawrence Bottorff borgauf at gmail.com
Thu Dec 10 21:41:06 UTC 2020


Yes, but a simple

λ> prova :: Int

doesn't work. What am I missing?


On Thu, Dec 10, 2020 at 3:11 PM Francesco Ariis <fa-ml at ariis.it> wrote:

> Il 10 dicembre 2020 alle 14:53 Lawrence Bottorff ha scritto:
> > If I simply put a type declaration into the GHCi (version 8.8.4), it
> > complains:
> >
> > Prelude> divides :: Integer -> Integer -> Bool
> > <interactive>:18:1-7: error:
> >     Variable not in scope: divides :: Integer -> Integer -> Bool
> >
> > I'm trying to use Emacs org-mode babel, and I have to wrap the code block
> > to get it to work.
>
> I do not believe it solves your problem but
>
>     λ> prova :: Int; prova = 8
>     λ>
>
> works
> —F
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20201210/d1bf0d51/attachment.html>


More information about the Beginners mailing list