[Haskell] Space behaviour & hyperseq

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Fri Jun 18 07:52:27 EDT 2004

Colin, Arjan, one further remark on

>> hyperseq x y = if x==x then y else error "this is very unlikely"
> the result of an application 'normal x' is always true ...

I understand how this works,
but do we agree that it looks outright ugly?

We mean one thing (strictness)
but we write something quite different
(an "obviously useless" computation of the constant True).

Can you explain this to students? Would you be proud of it?

Reminds me of hacks like { int x = 42; String s = x + ""; }
-- Johannes Waldmann,  Tel/Fax: (0341) 3076 6479 / 6480 --
------ http://www.imn.htwk-leipzig.de/~waldmann/ ---------

More information about the Haskell mailing list