graph-rewriting-trs 0.1.2 → 0.1.3
raw patch · 2 files changed
+13/−10 lines, 2 filesdep ~basedep ~directorydep ~filepath
Dependency ranges changed: base, directory, filepath, uu-parsinglib
Files
- Term.hs +7/−5
- graph-rewriting-trs.cabal +6/−5
Term.hs view
@@ -1,8 +1,10 @@-{-# LANGUAGE UnicodeSyntax #-}+{-# LANGUAGE UnicodeSyntax, FlexibleContexts, Rank2Types #-} module Term where import Prelude.Unicode import Text.ParserCombinators.UU as UU+import Text.ParserCombinators.UU.Utils as UU+import Text.ParserCombinators.UU.BasicInstances as UU data Term = App Term Term | Var Char deriving (Ord, Eq)@@ -20,8 +22,8 @@ maybeWrap str = if isComponent then "(" ⧺ str ⧺ ")" else str diverge = showComp True -parse ∷ Parser a → String → (a, [Error (Int,Int)])-parse p inp = UU.parse ((,) <$> p <*> pEnd) (listToStr inp (0,0))+parse ∷ Parser a → String → (a, [Error LineCol])+parse p inp = UU.parse ((,) <$> p <*> pEnd) (createStr (LineCol 0 0) inp) var ∷ Parser Term var = Var <$> alphaNum <?> "variable"@@ -51,7 +53,7 @@ arrow = pToken "->" <|> pToken "→" <?> "arrow" alphaNum ∷ Parser Char-alphaNum = pSym ('a','z') <|> pSym ('A','Z') <|> pSym ('0','9') <?> "alphaNum"+alphaNum = pLetter <|> pDigit <?> "alphaNum" asciiPrintable ∷ Parser Char-asciiPrintable = pSym ('!', '~')+asciiPrintable = pRange ('!', '~')
graph-rewriting-trs.cabal view
@@ -1,5 +1,5 @@ Name: graph-rewriting-trs-Version: 0.1.2+Version: 0.1.3 Copyright: (c) 2011, Jan Rochel License: BSD3 License-File: LICENSE@@ -17,21 +17,22 @@ Executable trs Main-Is: Main.hs Build-Depends:- base >= 4 && < 4.4,+ base >= 4 && < 4.5, base-unicode-symbols >= 0.2 && < 0.3, graph-rewriting >= 0.5.2 && < 0.6, graph-rewriting-layout >= 0.4.1 && < 0.5, graph-rewriting-gl >= 0.6 && < 0.7,- uu-parsinglib >= 2.5 && < 2.6,+ uu-parsinglib >= 2.7 && < 2.8, containers >= 0.4 && < 0.5, GLUT >= 2.2 && < 2.3, OpenGL >= 2.4 && < 2.5,- filepath >= 1.1 && < 1.2,- directory >= 1.0 && < 1.1+ filepath >= 1.1 && < 1.3,+ directory >= 1.0 && < 1.2 Extensions: UnicodeSyntax FlexibleInstances FlexibleContexts MultiParamTypeClasses+ Rank2Types GHC-Options: -fno-warn-duplicate-exports Other-Modules: GL Graph Rules Term TermRewriting