September 4th, 2012

glider

-fdefer-type-errors in GHC 7.6

What is the next thing that you want, when you have data
kinds, polymorphic kinds, and type-level literals?

Naturally, to turn off type checking! :-)

With the flag -fdefer-type-errors, this example:

p,q :: Int
p = 1
q = ’1’
main = print p

Compiles with warning: “couldn’t match expected type Int
with actual type Char in an equation for q: q = ’1’”.

Runs and returns 1.

video: http://vimeo.com/42399455
slides: http://dreixel.net/research/pdf/ghc7.6mwtte_pres_dhd2012.pdf