[Haskell-cafe] multiline mode on ghci 8.2.2

Fabien R theedge456 at free.fr
Thu Aug 16 09:22:25 UTC 2018


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


More information about the Haskell-Cafe mailing list