packages feed

graph-rewriting-ww 0.2 → 0.3

raw patch · 3 files changed

+5/−6 lines, 3 files

Files

Graph.hs view
@@ -1,7 +1,6 @@ {-# LANGUAGE UnicodeSyntax, FlexibleInstances, MultiParamTypeClasses #-} module Graph where -import Prelude.Unicode import Data.View import GraphRewriting.Graph.Types 
Resolver.hs view
@@ -7,7 +7,7 @@ import Graph import GraphRewriting.Graph import GraphRewriting.Graph.Write-import Control.Monad (liftM, zipWithM)+import Control.Monad (liftM, zipWithM, void)   type Compiler = Rewrite NodeWW@@ -26,13 +26,13 @@ 	A func arg → do 		f ← newEdge 		x ← newEdge-		newNode Applicator {inp = p, func = f, arg = x}+		void $ 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-		newNode Abstractor {name = x, inp = p, body = b, var = v}+		void $ 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-		zipWithM (compile env') es (Prelude.map snd binds)+		void $ zipWithM (compile env') es (Prelude.map snd binds) 		compile env' p e  bindName ∷ String → Compiler (Edge, Name)
graph-rewriting-ww.cabal view
@@ -1,5 +1,5 @@ Name:           graph-rewriting-ww-Version:        0.2+Version:        0.3 Copyright:      (c) 2010, Jan Rochel License:        BSD3 License-File:   LICENSE