Evidence Elimination

Alejandro Russo russo@fceia.unr.edu.ar
Fri, 25 Oct 2002 15:31:13 -0300 (ART)


I try the follow line in hugs (mode 98 enable)

Prelude> :t (let f =3D \x -> x =3D=3D x in ( f 'a', f 123 ) )
ERROR: Illegal Haskell 98 class constraint in inferred type
*** Expression : let {...} in (f 'a',f 123)
*** Type       : Num Char =3D> (Bool,Bool)

Prelude>

This happend because Num Char can never be satisfied with a=20
predicate evidence. However in hugs without 98 mode the result
of the previos line is :=20

Prelude> :t ( let f =3D \x -> x =3D=3D x in (f 'a' , f 123 ) )
let {...} in (f 'a',f 123) :: Num Char =3D> (Bool,Bool)

This (maybe) indicates how  hugs make evidence elimination in=20
runtime while Haskell 98 don=B4t do that. I don=B4t have a clear
idea about this, please someone can help me?. Thanks.

Alejandro Russo
Teacher in Computer Science =20
Rosario National University=20
Argentina