]> hydra-www.ietfng.org Git - dyna2/commitdiff
Explain how to build the tree; revise .cabal
authorNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Fri, 2 Nov 2012 17:56:06 +0000 (13:56 -0400)
committerNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Fri, 2 Nov 2012 17:56:06 +0000 (13:56 -0400)
README
dyna.cabal

diff --git a/README b/README
index fbe3cbdabf5369b3368f06faf8fa9e88c06b785b..9bd35895cabf0e4b5a6e07eb977520e05cd6447f 100644 (file)
--- 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
index bf4ec7a52d6d45e99f35ae35297d5cacff43a2d7..6ee9247bda74ba0113e00dfec14f2a4876f98678 100644 (file)
@@ -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,