
5 Apr
2012
5 Apr
'12
9:16 a.m.
Hello. Consider the following ghci session: Prelude> :t read "2" + 1 read "2" + 1 :: (Num a, Read a) => a Prelude> :t read "2.3" + 1 read "2.3" + 1 :: (Num a, Read a) => a Prelude> read "2" + 1 3 Prelude> read "2.3" + 1 *** Exception: Prelude.read: no parse Why does (read "2" + 1) works, but (read "2.3" + 1) fail at runtime? Romildo