[project @ 2003-04-16 13:34:13 by simonpj]
authorsimonpj <unknown>
Wed, 16 Apr 2003 13:34:17 +0000 (13:34 +0000)
committersimonpj <unknown>
Wed, 16 Apr 2003 13:34:17 +0000 (13:34 +0000)
----------------------------------
 Use the Infer/Check idea for typechecking higher-rank types
----------------------------------

The main idea is that

data Expected ty = Infer (TcRef ty) | Check ty

tcMonoExpr :: Expr -> Expected TcRhoType -> TcM Expra

This "Expected" type tells tcMonoExpr whether it's doing inference or
checking.  It replaces the "HoleTv" flavour of type variable.

This actually leads to slightly more lines of code, but it's much
clearer, and the new type distinctions showed up several subtle bugs
in the previous implementation.  It all arose out of writing the
prototype implementation for the paper.

Error messages wibble around a little bit.  I'm not quite certain why!  But the
changes look like improvements to me.


No differences found