summaryrefslogtreecommitdiff
path: root/src/Codec/Pesto
diff options
context:
space:
mode:
Diffstat (limited to 'src/Codec/Pesto')
-rw-r--r--src/Codec/Pesto/Graph.lhs1
-rw-r--r--src/Codec/Pesto/Lint.lhs1
-rw-r--r--src/Codec/Pesto/Parse.lhs3
3 files changed, 2 insertions, 3 deletions
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)