ext-core Questions

Kirsten Chevalier krc@uclink.berkeley.edu
Mon, 30 Dec 2002 11:24:20 -0800

On Fri, Dec 20, 2002 at 12:01:01PM -0500, glasgow-haskell-users-request@haskell.org wrote:
> Secondly, in GHC produced Core programs, one sees frequently references to
> intermediate values from other Modules such as SystemziIO.lvl (print
> newline?) or GHCziNum.lvl1 (which seems to be an Integer constant) or even
> GHCziNum.a4 (which seems to be (>) :: Integer -> Integer -> Bool). The type
> of those names as well as any other names from imported Modules is not
> given, however. How then is it possible to type check a Core program?

To typecheck a Core program, you need the type environment obtained from
typechecking all the modules it imports -- i.e., at least the Prelude modules.
The Core typechecker in the utils/ext-core directory in the GHC distribution
gives an example.

Kirsten Chevalier * krc@uclink.berkeley.edu * Often in error, never in doubt