Yhc Core is a way of dumping and using the internal representation of Yhc in an external project. The code related to this, including data types, is found in src/compiler/Core directory of the Yhc source code.

+

Yhc Core is a way of dumping and using the internal representation of Yhc in an external project.

* evaluate <code>g</code> as soon as it is ready (i. e. before application to <code>5 6</code>): this may eliminate some laziness

+

* take care of oversaturating arguments by storing them until <code>x</code> is to be evaluated, and evaluate <code>g</code> right before <code>x</code>: this preserves laziness

−

The <tt>-core</tt> option gives human readable Core output, in a style very similar to Haskell. The <tt>-corep</tt> option gives a <tt>deriving Show</tt> output of the Core, which can be read back in with <tt>read</tt> very easily. The machine Core also contains source code locations for statements.

+

An example how the second solution can be implemented in Javascript, see this [[Yhc/Javascript#Oversaturation|section]] of the '''ycr2js''' page.