<A HREF="manual_c.htm"><img align=center src="contents.gif" ALT="Contents"></A> Up Previous Next

Print type after evaluation +t,-t


With the +t option, the interpreter will display both the result and type of each expression entered at the Hugs prompt:
 Prelude> :set +t
 Prelude> map (\x -> x*x) [1..10]
 [1, 4, 9, 16, 25, 36, 49, 64, 81, 100] :: [Int]
 Prelude> not True
 False :: Bool
 Prelude> \x -> x
 <> :: a -> a
 Prelude>
Note that the interpreter will not display the type of an expression if its evaluation is interrupted or fails with a run-time error. In addition, the interpreter will not print the type, IO (), of a program in the IO monad; the interpreter treats these as a special case, giving the programmer more control over the output that is produced.