Newtype wrappers in hsSyn

Ian Lynagh igloo at earth.li
Wed Jan 27 09:46:49 EST 2010


On Wed, Jan 27, 2010 at 02:38:25PM +0000, Thomas Schilling wrote:
> 
> The Haskell AST used by GHC unfortunately has a few fields that are only defined after certain phases have been run.  For example:
> 
>  PostTcType, PostTcExpr  -- only defined after type checking
>  SyntaxExpr, Fixity      -- only defined after renaming

These have always distressed me. Would it be feasible to refactor so
that this isn't necessary, e.g.

    typecheck :: HsSyn Name () -> HsSyn Name PostTcInfo

or something?


Thanks
Ian



More information about the Cvs-ghc mailing list