Eq 1.1.2 → 1.1.3
raw patch · 2 files changed
+39/−32 lines, 2 filesdep ~containersdep ~template-haskell
Dependency ranges changed: containers, template-haskell
Files
- Eq.cabal +24/−28
- Language/Eq/InputParser/EqCode.hs +15/−4
Eq.cabal view
@@ -1,21 +1,10 @@ Name: Eq -Version: 1.1.2 +Version: 1.1.3 Synopsis: Render math formula in ASCII, and perform some simplifications Build-Type: Simple Category: Language, Math -Cabal-Version: >= 1.6 -Homepage: http://twinside.free.fr/eq/ -Description: - Haskell formula manipulation program - . - Changelog : - . - Version 1.1.1: - . - * Fixing some rendering bug - . - * Updating all the dependencies - +Cabal-Version: >= 1.6 +Description: Haskell formula manipulation program Author: Vincent Berthoux Maintainer: Vincent Berthoux <vincent.berthoux@gmail.com> License: BSD3 @@ -24,10 +13,6 @@ Description: Enable debug prints Default: False -Flag TestProject - Description: Enable compilation of the test project - Default: False - Flag StaticLinking Description: Try to link statically on Linux Default: False @@ -36,6 +21,16 @@ Description: turn on optimisation Default: True +Source-Repository head + Type: git + Location: git://github.com/Twinside/Eq.git + +Source-Repository this + Type: git + Location: git://github.com/Twinside/Eq.git + Tag: v1.1.3 + +-- Main executable Executable eq Main-Is: formulaMain.hs Extensions: CPP @@ -52,6 +47,17 @@ if flag(optimize) Ghc-options:-O3 + Build-Depends: base >= 4.1 && < 5.0 + , parsec >= 3.1 && < 3.2 + , HaXml >= 1.9 && < 2.0 + , mtl >= 2.1 && < 2.2 + , transformers >= 0.2 && < 0.4 + , template-haskell >= 2.8 && < 2.9 + , containers >= 0.4 && < 0.6 + , filepath >= 1.3 && < 1.4 + , array >= 0.4 && < 0.5 + + Other-Modules: Language.Eq , Language.Eq.Algorithm.Cleanup , Language.Eq.Algorithm.Derivative @@ -99,14 +105,4 @@ , Language.Eq.UnicodeSymbols , Language.Eq.CharArray , Language.Eq.Repl - - Build-Depends: base >= 4.1 && < 5.0 - , parsec >= 3.1 && < 3.2 - , HaXml >= 1.9 && < 2.0 - , mtl >= 2.1 && < 2.2 - , transformers >= 0.2 && < 0.4 - , template-haskell >= 2.7 && < 2.8 - , containers >= 0.4 && < 0.5 - , filepath >= 1.3 && < 1.4 - , array >= 0.4 && < 0.5
Language/Eq/InputParser/EqCode.hs view
@@ -114,10 +114,6 @@ , [ binary ":>" (binop OpLazyAttrib) AssocRight , binary ":=" (binop OpAttrib) AssocRight] ] - where binary name fun = Infix (do{ reservedOp name; return fun }) - prefix name fun = Prefix (do{ reservedOp name; return fun }) - postfix name fun = Postfix (do{ reservedOp name; return fun }) - binop op left right = binOp op [left, right] funCall :: Parsed st FormulaPrim funCall = do @@ -160,4 +156,19 @@ falseConst :: Parsed st FormulaPrim falseConst = return (Truth False) <* (string "false" >> whiteSpace) + +----------------------------------------------- +---- Little helpers +----------------------------------------------- +{-binary :: String -> (a -> a -> a) -> Assoc -> Operator String st Identity a-} +binary name fun = Infix (do{ reservedOp name; return fun }) + +{-prefix :: String -> (a -> a) -> Operator String st Identity a-} +prefix name fun = Prefix (do{ reservedOp name; return fun }) + +{-postfix :: String -> (a -> a) -> Operator String st Identity a-} +postfix name fun = Postfix (do{ reservedOp name; return fun }) + +binop :: BinOperator -> FormulaPrim -> FormulaPrim -> FormulaPrim +binop op left right = binOp op [left, right]