[Remove a backup of the old wiki, out of date information (the new wiki is backed up automatically)
Neil Mitchell**20061026133230] {
hunk ./wiki/Yhc.html 1
-
-
-
-
-
-
-
-
Yhc - York Haskell Compiler
-
-
, see the official home page at http://www.cs.york.ac.uk/~ndm/yhc/
-
-
Yhc Manual
-
-This is the official Yhc manual, feel free to edit it! (you must be logged into edit)
-
-
- -
-
-/Introduction - the dull stuff
-
-
- -
-
-/UsingYhc - short tutorial on yhc, yhi, yhe
-
-
- -
-
-/FAQ - Frequently Asked Questions
-
-
- -
-
-?/Options - command line options and environment variables
-
-
- -
-
-/Building - building yhc from source
-
-
- -
-
-/Hacking - how to hack on Yhc
-
-
- -
-
-/Porting - how to port Yhc to a new architecture/platform
-
-
-
-
-
License
-
-By adding anything under Yhc/*, you consent to it being licensed under a BSD license. Yhc itself (both compiler and runtime) are released under the GPL. Any programs compiled with Yhc do not gain any additional license restrictions.
-
-
Yhc Pages
-
-These are all the pages within the Yhc domain
-
-
-
-
-
-
-
-
-CategoryHaskellImplementations CategoryApplication
-
-
-
-
-
-
-
-
-
-
rmfile ./wiki/Yhc.html
hunk ./wiki/Yhc_2fBuilding.html 1
-
-
-
-
-
-
-
-
Yhc - Building
-
-
--
-Yhc - Building
-
--
-Requirements
--
-Getting the Code
--
-Building on Windows
--
-Building on Linux/Unix
--
-Building on Mac OS X
-
-
-
-
-
-
-
Requirements
-
-You need a C compiler - both gcc and MS Visual C are known to be OK.
-
-
-If you want to build the yhc compiler itself (not strictly necessary), you will need a very recent Haskell compiler, e.g. ghc >= 6.4 or nhc98 >= 1.18.
-
-
Getting the Code
-
-The first step is to get the source code. There are two branches, stable and development. Stable should always build and give you a working compiler, but development is the one we are putting new things into. We can't generally guarantee that the development branch will always even compile so stable is likely most useful to people. It is hoped that the stable branch will be no more than a week or so behind development.
-
-
-The source code is stored in a darcs (http://www.darcs.net/) repo, to get the stable version do:
-
-
-
darcs get http://www.cs.york.ac.uk/fp/darcs/yhc/
-
-To get the development version do:
-
-
-
darcs get http://www.cs.york.ac.uk/fp/darcs/yhc-devel/
-
Building on Windows
-
-Open a console at the root of the yhc tree. There is a file called Makefile.bat, which is used to build the various components. Just typing Makefile should give you a list of the options.
-
-
-The modes are:
-
-
- -
-
- yhc - build the compiler, requires GHC
-
-
- -
-
- yhi - build the runtime, requires Visual Studio 2003 (ask for support for other compilers)
-
-
- -
-
- yhe - build the evaluator, requires GHC
-
-
- -
-
- gyhe - build the graphic evaluator, requires GHC and Gtk2Hs
-
-
- -
-
- doc - build the documentation, requires haddock and GHC
-
-
- -
-
- lib - build the base libraries
-
-
- -
-
- test - run the standard tests, option 98 is useful to just run the conformance tests
-
-
-
-
-
-The standard options are:
-
-
-
-
-All compiled binaries will go into \inst\bin. To compile and run the test suite do:
-
-
-
$ Makefile yhc
-$ Makefile yhi
-$ Makefile yht
-$ Makefile test 98
-
Building on Linux/Unix
-
-The standard unix thing will should get you most of the way.
-
-
-
chmod +x configure # because darcs does't record the executable bit
-./configure
-make
-
-There currently isn't a 'make install', but it is fairly trivial: simply copy the contents of the 'inst' directory into where everything should be installed.
-
-
Building on Mac OS X
-
-You will need to have libraries like GMP (Gnu multi-precision arithmetic) installed. Most people do this with Fink or ?DarwinPorts, or some such. You need the header files in addition to the library archive, and these are often distributed in a 'devel' version of the package.
-
-
-If your packaging system uses a separate directory hierarchy (Fink uses /sw) then you may need to set up some environment variables so that the C compiler can find the includes and libraries:
-
LD_LIBRARY_PATH=/sw/lib # for dylibs
-LIBRARY_PATH=/sw/lib # for static linking
-CPATH=/sw/include # for header files
-
-
-
-Then just follow the usual unix-like procedure, as above.
-
-
-
-
-
-
-
-
-
-
rmfile ./wiki/Yhc_2fBuilding.html
hunk ./wiki/Yhc_2fByteCodeApi.html 1
-
-
-
-
-
-
-
-
ByteCode API
-
-On the step towards a full API for the whole compiler, an API for just the bytecode first will probably be desirable.
-
-
-There are two entirely separate lumps in this, the raw bytecode, and the wrappers that make a module file.
-
-
Module
-
-
-data Module = Module {objects :: [Object]}
-
-data PackageVer = PackageVer {version :: [Int], name :: String}
-data ModuleName = ModuleName PackageVer {name :: String}
-data Import = Import ModuleName {name :: String, arity :: Int}
-data Export = Export {name :: String, obj :: Object, arity :: Int}
-
-data Object = Function Arity ConstTable HufByteCode
- | Constructor Arity TagNo
-
-type ConstTable = [Const]
-
-type HufByteCode = [HufBC]
-
-
-
-
-
-
-
Bytecode
-
-There are tree types of bytecode representation:
-
-
-
-data GraphNode = ...
-data LabeledJumps = ...
-
-