Name: Anonymous 2013-12-17 15:06
# sqrt -1;;
Error: This expression has type float -> float
but an expression was expected of type int
Error: This expression has type float -> float
but an expression was expected of type int
$ ghci
GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
ghci> :m + Data.Complex
ghci> sqrt (1 :+ 0)
1.0 :+ 0.0
ghci> sqrt ((-1) :+ 0)
Segmentation fault
$