Skip to content

Commit d1896ea

Browse files
committed
Merge pull request #30 from triggerNZ/master
Eq instance for ParseError
2 parents cd65474 + 08bc10a commit d1896ea

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
language: node_js
2-
sudo: false
2+
dist: trusty
3+
sudo: required
34
node_js:
45
- 0.10
56
env:

src/Text/Parsing/Parser.purs

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ data ParseError = ParseError
2525
instance showParseError :: Show ParseError where
2626
show (ParseError msg) = "ParseError { message: " ++ msg.message ++ ", position: " ++ show msg.position ++ " }"
2727

28+
instance eqParseError :: Eq ParseError where
29+
eq (ParseError {message : m1, position : p1}) (ParseError {message : m2, position : p2}) = m1 == m2 && p1 == p2
30+
2831
-- | `PState` contains the remaining input and current position.
2932
data PState s = PState
3033
{ input :: s

0 commit comments

Comments
 (0)