From: Nathaniel Wesley Filardo Date: Fri, 2 Nov 2012 17:56:06 +0000 (-0400) Subject: Explain how to build the tree; revise .cabal X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=bec03d11a40c19e605643aadebc93fa847639ca9;p=dyna2 Explain how to build the tree; revise .cabal --- diff --git a/README b/README index fbe3cbd..9bd3589 100644 --- a/README +++ b/README @@ -1,24 +1,57 @@ An overview of the source tree ------------------------------ -src/Dyna/BackendK3 -- An AST and printer for K3, +external/ + ekmett-trifecta -- The trifecta parser combinator library, tracked + -- as a git submodule. + +src/Dyna/ + + BackendK3 -- An AST and printer for K3, -- done in finally-tagless style. -- Includes some "Examples", even if not self-tests. -src/Dyna/ParserHS -- the Haskell front-end parser and selftests + ParserHS -- the Haskell front-end parser and selftests -src/Dyna/Term -- Different representations of terms and - utilities + Term -- Different representations of terms and + -- utilities -src/Dyna/Test -- code used by self-tests throughout the codebase + Test -- code used by self-tests throughout the codebase -src/Dyna/XXX -- code that should probably go upstream; - modules here are named by the upstream package. + XXX -- code that should probably go upstream; + -- modules here are named by the upstream package. For those not familar with cabal -------------------------------- +First, ensure that you have GHC 7.6 or later. + +Then, sadly, I have to ask you to build some upstream packages out of their +repositories. I thought they were going to be released "soon" when I +switched to these later versions, but it hasn't happened yet: + +git submodule init +git submodule update +(cd external/ekmett-trifecta; cabal install --user) + +Then fetch, build, and install any dependencies + +(cabal install --enable-tests --only-dependencies) + +Build Dyna: + cabal configure --user --enable-tests cabal build +cabal haddock cabal test + +And then run the REPL: + +./dist/build/drepl/drepl + +OK, that last bit is probably not quite true. 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 diff --git a/dyna.cabal b/dyna.cabal index bf4ec7a..6ee9247 100644 --- a/dyna.cabal +++ b/dyna.cabal @@ -40,9 +40,9 @@ Library bytestring >=0.9, charset >=0.3, containers >=0.4, - ghc-prim, + ghc-prim >= 0.3, mtl >=2.1, - parsers >=0.3, + parsers >=0.2, reducers >=3.0, semigroups >=0.8, template-haskell, @@ -65,7 +65,7 @@ Executable drepl containers >=0.4, haskeline >=0.6, mtl >=2.1, - parsers >=0.3, + parsers >=0.2, reducers >=3.0, semigroups >=0.8, trifecta >=0.90, @@ -87,10 +87,10 @@ Test-suite dyna-selftests bytestring >=0.9, charset >=0.3, containers >=0.4, - ghc-prim, + ghc-prim >= 0.3, HUnit >=1.2, mtl >=2.1, - parsers >=0.3, + parsers >=0.2, reducers >=3.0, semigroups >=0.8, template-haskell,