packages feed

graph-rewriting-lambdascope 0.4.7 → 0.4.8

raw patch · 7 files changed

+41/−41 lines, 7 filesdep ~basedep ~graph-rewritingdep ~graph-rewriting-gl

Dependency ranges changed: base, graph-rewriting, graph-rewriting-gl

Files

GL.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE UnicodeSyntax #-} module GL () where  import Graph@@ -14,8 +15,8 @@ 		Constant   {} → [sd n] 		Function   {} → [sd n, sd s] 		Eraser     {} → [sd n]-		Duplicator {} → [sd n, (sw, s), (se, s)]-		Delimiter  {} → [sd $ Vector2 0 0.6, sd $ Vector2 0 (-0.6)]+		Duplicator {} → [(Vector2 0 0.9, n), (Vector2 (-0.6) (-0.5), s), (Vector2 0.6 (-0.5), s)]+		Delimiter  {} → [sd $ Vector2 0 0.7, sd $ Vector2 0 (-0.7)] 		where 			n = Vector2 0 1 			w = Vector2 (-1) 0@@ -28,24 +29,24 @@  renderNode node = drawPorts node >> case node of 	Initiator  {} → drawNode "I"-	Applicator {} → drawNode "A"-	Abstractor {} → drawNode "L"+	Applicator {} → drawNode "@"+	Abstractor {} → drawNode "λ" 	Constant   {} → drawNode (name node) 	Function   {} → drawNode (name node) 	Eraser     {} → drawNode "" 	Duplicator {} → do 		GL.preservingMatrix $ GL.renderPrimitive GL.LineLoop $ do-			vertex2 (0,1)-			vertex2 (-1,-1)-			vertex2 (1,-1)-		drawString $ show $ level node+			vertex2 (0,0.9)+			vertex2 (-1,-0.5)+			vertex2 (1,-0.5)+		renderString $ show $ level node 	Delimiter {} → do-		GL.renderPrimitive GL.LineStrip $ do+		GL.preservingMatrix $ GL.renderPrimitive GL.LineStrip $ do 			vertex2 (-0.8,-0.3) 			vertex2 (-0.8,0) 			vertex2 (0.8,0) 			vertex2 (0.8,-0.3)-		drawString $ show $ level node+		renderString $ show $ level node  drawPorts ∷ NodeLS -> IO () drawPorts = mapM_ drawPort . relPortPos@@ -61,9 +62,4 @@  drawNode label = do 	GL.renderPrimitive GL.LineLoop (circle 1 1 20)-	drawString label--drawString label = GL.preservingMatrix $ do-	GL.translate $ vector2 (-0.3,-0.3)-	GL.scale 0.007 0.007 (0 ∷ GL.GLdouble)-	GL.renderString GL.MonoRoman label+	renderString label
Graph.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE UnicodeSyntax, FlexibleInstances, MultiParamTypeClasses #-} module Graph where  import Prelude.Unicode
Main.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE UnicodeSyntax, FlexibleInstances #-} module Main where  import GraphRewriting.Graph@@ -25,7 +26,7 @@ 	(prog,args) ← UI.initialise 	file ← case args of 		[f] → return f-		___ → error "usage: vle [GLUT-options] <file>"+		___ → error "usage: lambdascope [GLUT-options] <file>" 	term ← parseFile file 	let hypergraph = resolve term 	let graph = execGraph (apply $ exhaustive compileShare) (wrapGraph hypergraph)@@ -51,4 +52,3 @@ 	 	 Leaf "Erase" eraser,  	 	 Branch "Primitive" [Leaf "Constant" applyConstant, Leaf "Function" applyFunction]], 	 Leaf "All but Beta (exhaustively)" $ exhaustive $ anyOf [duplicate, eliminateDelimiter, eliminateDuplicator, annihilate, commuteDelimiter, eraser, applyConstant, applyFunction]]---	 Leaf "\"Readback\"" readback]
Resolver.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE UnicodeSyntax #-} -- | Term to graph transformation where variable names are resolved to graph edges (or constants) module Resolver (resolve) where 
Rules.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE UnicodeSyntax, FlexibleContexts #-} module Rules where  import Prelude.Unicode
Term.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE UnicodeSyntax #-} module Term where  import Prelude.Unicode
graph-rewriting-lambdascope.cabal view
@@ -1,35 +1,35 @@ Name:           graph-rewriting-lambdascope-Version:        0.4.7+Version:        0.4.8 Copyright:      (c) 2010, Jan Rochel License:        BSD3-License-File:	LICENSE+License-File:   LICENSE Author:         Jan Rochel Maintainer:     jan@rochel.info+Homepage:       http://rochel.info/#graph-rewriting Stability:      alpha Build-Type:     Simple Synopsis:       Implementation of Lambdascope as an interactive graph-rewriting system-Description:-	Lambdascope is an optimal implementation of the λβ-calculus described in the paper "Lambdascope - Another optimal implementation of the lambda-calculus" by Vincent van Oostrom, Kees-Jan van de Looij, and Marijn Zwitserlood. Examples of lambda terms are supplied in the "examples" directory.+Description:    Lambdascope is an optimal implementation of the λβ-calculus described in the paper "Lambdascope - Another optimal implementation of the lambda-calculus" by Vincent van Oostrom, Kees-Jan van de Looij, and Marijn Zwitserlood. Examples of lambda terms are supplied in the "examples" directory. Category:       Graphs, Application Cabal-Version:  >= 1.6 Data-Files:     examples/*.l -Executable:     lambdascope-Main-Is:        Main.hs-Build-Depends:-	base >= 4 && < 4.3,-	base-unicode-symbols >= 0.2 && < 0.3,-	graph-rewriting >= 0.4.4 && < 0.5,-	graph-rewriting-layout >= 0.4.1 && < 0.5,-	graph-rewriting-gl >= 0.6 && < 0.7,-	parsec >= 2.1 && < 2.2,-	GLUT >= 2.2 && < 2.3,-	OpenGL >= 2.4 && < 2.5,-	IndentParser >= 0.2 && < 0.3-Extensions:-	UnicodeSyntax-	FlexibleInstances-	FlexibleContexts-	MultiParamTypeClasses-GHC-Options:    -fno-warn-duplicate-exports -fwarn-unused-imports-Other-Modules:	 GL Graph Resolver Rules Term+Executable lambdascope+  Main-Is:        Main.hs+  Build-Depends:+    base >= 4 && < 4.4,+    base-unicode-symbols >= 0.2 && < 0.3,+    graph-rewriting >= 0.4.4 && < 0.6,+    graph-rewriting-layout >= 0.4.1 && < 0.5,+    graph-rewriting-gl >= 0.6.5 && < 0.7,+    parsec >= 2.1 && < 2.2,+    GLUT >= 2.2 && < 2.3,+    OpenGL >= 2.4 && < 2.5,+    IndentParser >= 0.2 && < 0.3+  Extensions:+    UnicodeSyntax+    FlexibleInstances+    FlexibleContexts+    MultiParamTypeClasses+  GHC-Options:    -fno-warn-duplicate-exports+  Other-Modules:   GL Graph Resolver Rules Term