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@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.