File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 1
1
module Parsing where
2
2
3
3
import Prelude
4
- import Either
5
- import String
6
- import Arrays
7
- import Maybe
4
+ import Data.Array
5
+ import Data.Either
6
+ import Data.Maybe
7
+ import Data.String
8
8
9
9
data ParseError = ParseError
10
10
{ message :: String
Original file line number Diff line number Diff line change 1
1
module Main where
2
2
3
3
import Prelude
4
- import Either
5
- import Eff
4
+ import Data.Array
5
+ import Data.Either
6
+ import Data.Maybe
7
+ import Control.Monad.Eff
8
+ import Debug.Trace
6
9
import Parsing
7
- import Trace
8
- import Arrays
9
- import Maybe
10
10
11
11
parens :: forall a . ({ } -> Parser String a ) -> Parser String a
12
12
parens = between (string " (" ) (string " )" )
@@ -18,8 +18,8 @@ nested _ = (do
18
18
19
19
parseTest :: forall s a eff . (Show a ) => Parser s a -> s -> Eff (trace :: Trace | eff ) { }
20
20
parseTest p input = case runParser p input of
21
- ParseResult { result = Left (ParseError err) } -> Trace . print err.message
22
- ParseResult { result = Right result } -> Trace . print result
21
+ ParseResult { result = Left (ParseError err) } -> print err.message
22
+ ParseResult { result = Right result } -> print result
23
23
24
24
opTest = chainl char (do string " +"
25
25
return (++)) " "
You can’t perform that action at this time.
0 commit comments