graph-rewriting-ww 0.3 → 0.3.1
raw patch · 3 files changed
+9/−9 lines, 3 filesdep ~base
Dependency ranges changed: base
Files
- Resolver.hs +4/−4
- Term.hs +3/−3
- graph-rewriting-ww.cabal +2/−2
Resolver.hs view
@@ -7,7 +7,7 @@ import Graph import GraphRewriting.Graph import GraphRewriting.Graph.Write-import Control.Monad (liftM, zipWithM, void)+import Control.Monad (liftM, zipWithM) type Compiler = Rewrite NodeWW@@ -26,13 +26,13 @@ A func arg → do f ← newEdge x ← newEdge- void $ newNode Applicator {inp = p, func = f, arg = x}+ _ ← newNode Applicator {inp = p, func = f, arg = x} compile env f func compile env x arg Λ x e → do b ← newEdge (v, n) ← bindName x- void $ newNode Abstractor {name = x, inp = p, body = b, var = v}+ _ ← newNode Abstractor {name = x, inp = p, body = b, var = v} compile (n : env) b e V var → case env of [ ] → newNode Primitive {inp = p, name = var} >> return ()@@ -42,7 +42,7 @@ L binds e → do (es, names) ← liftM unzip $ mapM bindName (map fst binds) let env' = names ⧺ env- void $ zipWithM (compile env') es (Prelude.map snd binds)+ _ ← zipWithM (compile env') es (Prelude.map snd binds) compile env' p e bindName ∷ String → Compiler (Edge, Name)
Term.hs view
@@ -6,7 +6,7 @@ import Text.ParserCombinators.Parsec.IndentParser as Indent import Text.ParserCombinators.Parsec.Language import Text.ParserCombinators.Parsec.IndentParser.Token-import Control.Monad (liftM, void)+import Control.Monad (liftM) data Λ = A Λ Λ -- ^ application@@ -31,9 +31,9 @@ parenthetic = parens haskell expression abstraction = flip label "abstraction" $ do- void $ sym "λ" <|> sym "\\"+ _ ← sym "λ" <|> sym "\\" vars ← many1 ident- void $ sym "." <|> sym "→" <|> sym "->"+ _ ← sym "." <|> sym "→" <|> sym "->" body ← expression return $ foldr Λ body vars
graph-rewriting-ww.cabal view
@@ -1,5 +1,5 @@ Name: graph-rewriting-ww-Version: 0.3+Version: 0.3.1 Copyright: (c) 2010, Jan Rochel License: BSD3 License-File: LICENSE@@ -17,7 +17,7 @@ Executable ww Main-Is: Main.hs Build-Depends:- base >= 4.3 && < 4.6,+ base >= 4 && < 4.6, base-unicode-symbols >= 0.2 && < 0.3, graph-rewriting >= 0.7 && < 0.8, graph-rewriting-layout >= 0.5.1 && < 0.6,