An overview of the source tree
------------------------------
+* docs/sphinx/ -- Documentation in reST format for sphinx
* examples/ -- Dyna source programs
- * expected/ -- Expected output for self-tests. Named by program and backend, both.
-* external/
- * damsl-k3 -- The DAMSL K3 tree, tracked as a git submodule.
+ * expected/ -- Expected output for self-tests.
* misc/ -- Pretty much what it says on the tin
* src/Dyna/
* Analysis -- The heart of the compiler
* Mode -- A re-implementation of the Mercury mode system
* Backend -- Compilation to target languages
- * K3 -- An AST and printer for K3, done in finally-tagless style.
* Python -- A Python code generator
* Main -- Dyna compiler drivers (main and test) and definitions used throughout the pipeline
* ParserHS -- the Haskell front-end parser and selftests
First, ensure that you have the Haskell platform 2012.2 or later installed,
either through your favorite package manager or by installing it
-stand-alone. You should probably run
+stand-alone. You'll want to have the following programs installed, too:
- cabal update
-
-before proceeding, just to make sure that your package database is
-up-to-date. Some of our transitive dependencies assume that you have
-`alex` and `happy` available -- either fetch those from your package manager
-or add `~/.cabal/bin` to your `PATH` and run
-
- cabal install alex happy
-
-Then fetch, build, and install any dependencies (for the
-moment, we seem to be doing OK with vanilla upstreams!)
+ * Python 2.7 or compatible
+ * IPython
+ * Pygments (for pretty code output in our compiler-debugging tools)
+ * graphviz
- make deps
+You should probably run
-Build Dyna:
+ cabal update
- make build
+before proceeding, just to make sure that your package database is
+up-to-date. Running
-(If that doesn't work, you might try `make ghcbuild` which ignores the Cabal
-infrastructure. If you get an error about the `ghc-prim` package, it means
-that your compiler is older than what I've tested on; you may be able to
-make things work by dropping the lower bound on the package in dyna.cabal.)
+ make
-You'll want to have the following programs installed, too:
+will then build dependencies and the Dyna executable. Run the test harness,
+just to make sure things built and are working OK:
- * Python 2.7 or compatible
- * IPython
- * Pygments (for pretty code output in our compiler-debugging tools)
+ make tests
-Run the test harness:
+And read up on the documentation:
- make tests
+ make sphinxdoc
At this point, the code is still rather "in the works" so you probably want
to...
-* load some module in GHCi; for example:
-
- ghci -isrc Dyna.ParserHS.Parser
-
* Run the python backend interactively (leave off the "-i" for bulk
operation):
./debug examples/papa2.dyna
+* load some module in GHCi; for example:
+
+ ghci -isrc Dyna.ParserHS.Parser
+
Disclaimer
----------