RE: Replacing Ty in ExternalCore with IfaceType

Simon Peyton-Jones <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.all,gmane.comp.lang.haskell.cvs.ghc
Message-ID <DCA83D5F3861C941808187D4D387875034638C20@EA-EXMSG-C312.europe.corp.microsoft.com>
| > the two languages have a very similar type structure. However, since
| > they have very different term structures, there would be distinct
| > HsExpr and ExtCoreExpr data types.
|
| Really? Simon wrote:

Well what I wrote was this:

| * Add a new sort of binding to the data type HsBind, something like
|       data HsBind id = ... | CoreBind id (ExtCore id)
|
| Here ExtCore is basically the data type Exp in the ExternalCore module, but parameterised over the
| type of identifiers.  So we have
|       data ExtCore id = Var id | Dcon id | Lit Lit ... etc

So yes, as Aaron says, I think you'd probably want a HsSyn datatype for External Core terms, as above and as Aaron suggests. They are typechecked differently than HsExpr, because all binders have an explicit type.  It could be done as a subset of HsExpr, I think, but I'd be inclined to use a separate type.

Simon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.