do expression

Mark Carroll
Mon, 5 May 2003 11:09:50 -0400 (EDT)

On Tue, 6 May 2003, sashan wrote:
>            choice <- getLine
>            case choice of
>              1 -> do putStrLn "f1"

getLine returns a String, yet the 1 is your case statement is a number.

	case (read choice) of

instead. "read" complements "show": it is a handy function that turns
strings into what you want. (The "Read" typeclass is relevant.)

-- Mark