[Haskell-cafe] Re: GHC predictability

Don Stewart dons at galois.com
Tue May 13 17:47:49 EDT 2008

> Hi
> >  1. What is "ghc-core"?
> You actually answer this question as part of question 2. Think of it
> as simple Haskell with some additional bits.
> >  2. Does anybody know how to actually read GHC's Core output anyway?
> > To me,
> > it looks almost exactly like very, very complicated Haskell source with a
> > suspicious concentration of case expressions - but I understand that in the
> > Core language, many constructs actually mean something quite different.
> There is one different from standard Haskell I am aware of. In Core,
> case x of _ -> 1 will evaluate x, in Haskell it won't. Other than
> that, its just Haskell, but without pattern matching and only cases -
> hence the rather high number of cases.

Well, 'let's too, which bind either unlifted or lifted values.

If they're binding lifted things, that's a thunk being allocated.

-- Don

More information about the Haskell-Cafe mailing list