Principles of Operation
The Yhc compiler generally produces a binarybytecode file (usually named with .hbc extension) for each Haskell module compiled. These bytecode files are to be interpreted by yhi, a command-line bytecode interpreter.
The compiler is also capable of producing a binary core file (usually named with .ycr extension), and also its human-readable representation for each Haskell module compiled. The internal structure of core is based on significantly simplified NHC98's PosLambda constructs (Yhc is derived from HNC98 code). Core contains of definitions for compiled Haskell functions and data objects.
The feature of core linking was added recently to Yhc. This allows for merging core files from several modules together, removing functions that are not used (similar to static linking performed by a traditional Unix or Windows executable linker). The resulting file (usually named with .yca extension) has the same format as per-module core files.
Binary core files may be read back into computer memory using the Yhc Core API functions.
Examples and Demos
Description: Type any text in the input field provided, and see it echoed right above.
Tested with: Netscape 7/Linux
Demo URL: http://darcs.haskell.org/yhc/web/jsdemos/Echo.html
Haskell Source: http://darcs.haskell.org/yhc/web/jsdemos/Echo.hs
--DimitryGolubovsky 19:02, 6 November 2006 (UTC)