diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2016-10-24 21:18:23 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2016-10-24 21:19:23 +0200 |
commit | b717204d337c8833e5b8704d01466c836aeef091 (patch) | |
tree | d7f037b138e9ace91eec24830e709bb78d4378ba | |
parent | bd79768bac0e5d9b0578cb07aa2d9fa9bc4ddb8b (diff) | |
download | pesto-b717204d337c8833e5b8704d01466c836aeef091.tar.gz pesto-b717204d337c8833e5b8704d01466c836aeef091.tar.bz2 pesto-b717204d337c8833e5b8704d01466c836aeef091.zip |
GHC 7.10 compatibility
Bumps base version requirement to 4.8 due to
https://ghc.haskell.org/trac/ghc/wiki/Migration/7.10#GHCsaysTheimportof...isredundant
-rw-r--r-- | Pesto.cabal | 8 | ||||
-rw-r--r-- | src/Codec/Pesto/Graph.lhs | 1 | ||||
-rw-r--r-- | src/Codec/Pesto/Lint.lhs | 1 | ||||
-rw-r--r-- | src/Codec/Pesto/Parse.lhs | 3 | ||||
-rw-r--r-- | src/Main.lhs | 2 |
5 files changed, 7 insertions, 8 deletions
diff --git a/Pesto.cabal b/Pesto.cabal index b294013..f9d3d26 100644 --- a/Pesto.cabal +++ b/Pesto.cabal @@ -17,7 +17,7 @@ library exposed-modules: Codec.Pesto, Codec.Pesto.Parse, Codec.Pesto.Graph, Codec.Pesto.Lint, Codec.Pesto.Serialize -- other-modules: -- other-extensions: - build-depends: base >=4.6 && <4.9, HUnit, parsec >= 3.1.9 + build-depends: base >=4.8 && <4.9, HUnit, parsec >= 3.1.9 hs-source-dirs: src default-language: Haskell2010 ghc-options: -Werror -Wall -fno-warn-missing-signatures @@ -26,7 +26,7 @@ executable pesto main-is: Main.lhs hs-source-dirs: src default-language: Haskell2010 - build-depends: base >=4.6 && <4.9, HUnit, parsec >= 3.1.9 + build-depends: base >=4.8 && <4.9, HUnit, parsec >= 3.1.9 ghc-options: -Werror -Wall -fno-warn-missing-signatures test-suite pesto-test @@ -34,13 +34,13 @@ test-suite pesto-test main-is: Test.lhs hs-source-dirs: src default-language: Haskell2010 - build-depends: base >=4.6 && <4.9, Pesto, HUnit, parsec >= 3.1.9 + build-depends: base >=4.8 && <4.9, Pesto, HUnit, parsec >= 3.1.9 ghc-options: -Werror -Wall -fno-warn-missing-signatures executable pesto-doc main-is: Doc.lhs hs-source-dirs: src default-language: Haskell2010 - build-depends: base >=4.6 && <4.9, pandoc >=1.14, highlighting-kate, blaze-html, filepath, containers + build-depends: base >=4.8 && <4.9, pandoc >=1.14, highlighting-kate, blaze-html, filepath, containers ghc-options: -Werror -Wall -fno-warn-missing-signatures diff --git a/src/Codec/Pesto/Graph.lhs b/src/Codec/Pesto/Graph.lhs index 8ef384a..bcfd07b 100644 --- a/src/Codec/Pesto/Graph.lhs +++ b/src/Codec/Pesto/Graph.lhs @@ -23,7 +23,6 @@ Language semantics > import Data.Char (toLower) > import Data.List (sort, nub) > import Test.HUnit hiding (test, Node) -> import Control.Applicative ((<$>)) > > import Codec.Pesto.Parse hiding (test) diff --git a/src/Codec/Pesto/Lint.lhs b/src/Codec/Pesto/Lint.lhs index a829e5d..3d58ac8 100644 --- a/src/Codec/Pesto/Lint.lhs +++ b/src/Codec/Pesto/Lint.lhs @@ -11,7 +11,6 @@ Linting > , LintResult(..)) where > import Test.HUnit hiding (test, Node) > import Data.List (sort, isPrefixOf) -> import Control.Applicative ((<*>), (<$>), (*>)) > import Text.Parsec hiding (parse) > import Data.Char (isSpace) > import Data.Ratio ((%)) diff --git a/src/Codec/Pesto/Parse.lhs b/src/Codec/Pesto/Parse.lhs index 5e6d23c..e72fc21 100644 --- a/src/Codec/Pesto/Parse.lhs +++ b/src/Codec/Pesto/Parse.lhs @@ -22,7 +22,6 @@ Language syntax > , spaces1 > , notspace > ) where -> import Control.Applicative ((<*>), (<$>), (<*), (*>)) > import Data.Char (isSpace) > import Data.Ratio ((%)) > import Text.Parsec hiding (parse) @@ -73,6 +72,7 @@ The pesto grammar has two instruction types: The first one begins with a start symbol (``start``) and consumes any character up to and including a terminating symbol (``end``), which can be escaped with a backslash (``\``). +> betweenEscaped :: Char -> Char -> Parsec String () String > betweenEscaped start end = > char start > *> many (try (char '\\' *> char end) <|> satisfy (/= end)) @@ -92,6 +92,7 @@ Here are examples for both: The second one starts with one identifying character, ignores the following whitespace characters and then consumes an object or a quantity. +> oparg :: Char -> Parsec String () Instruction -> Parsec String () Instruction > oparg ident cont = char ident *> spaces *> cont > ingredient = oparg '+' (Ingredient <$> quantity) > tool = oparg '&' (Tool <$> quantity) diff --git a/src/Main.lhs b/src/Main.lhs index 1b257bd..61ed180 100644 --- a/src/Main.lhs +++ b/src/Main.lhs @@ -6,7 +6,7 @@ User interface > module Main (main) where > import System.Environment (getArgs) > import Data.List (intercalate) -> import Data.Monoid ((<>), mconcat) +> import Data.Monoid ((<>)) > > import Codec.Pesto.Parse (parse, Instruction (Ingredient), Quantity (..)) > import Codec.Pesto.Graph (extract, toGraph, firstNodeId, resolveReferences) |