Compiling GHC disabling the type checker

Neil Mitchell ndmitchell at
Fri Oct 13 13:03:59 EDT 2006


I would like to write a translator which takes a Haskell-like language
to GHC compilable Haskell. This Haskell-like language is not
explicitly typed, and cannot have types inferred for it (rank 2 types
may exist etc), however it is known that the program will not crash
with a type error. All case statements are well typed, i.e. case x of
{1 -> ..; True -> ...} will not happen, although types cannot be given
to the whole program.

How does GHC react to a really large number of unsafeCoerce's? Is this
likely to destroy performance? Has anything like this been done
before? I know that LML was able to "turn off" the type checker, but I
guess GHC doesn't have such an option, because of its typed Core



More information about the Glasgow-haskell-users mailing list