[Haskell-cafe] multiline mode on ghci 8.2.2

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Thu Aug 16 10:47:40 UTC 2018


You can separate lines with semicolons to avoid multiline definitions.

On mobile; please excuse any tpyos.

On Thu, 16 Aug. 2018, 5:23 pm Fabien R, <theedge456 at free.fr> wrote:

> I thought I could use the directive ":set +m" to define a function with
> its signature.
>
> Prelude> :set +m
> Prelude> square :: Num a=>a->a
>
> <interactive>:3:1: error: Variable not in scope: square :: a1 -> a1
>
> Instead, I have to type:
>
> Prelude> :unset +m
> Prelude> :{
> Prelude| square :: Num a=>a->a
> Prelude| square = (^2)
> Prelude| :}
> Prelude>
>
> Any hint ?
>
> --
> Fabien
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20180816/586442d3/attachment.html>


More information about the Haskell-Cafe mailing list