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

Francesco Ariis fa-ml at ariis.it
Thu Dec 10 21:09:35 UTC 2020


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


More information about the Beginners mailing list