Skip to content

Commit 92c6b50

Browse files
committed
Implement fail using failWithPosition
1 parent 2d5cafb commit 92c6b50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Text/Parsing/Parser.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ position = gets \(ParseState _ pos _) -> pos
131131

132132
-- | Fail with a message.
133133
fail :: forall m s a. Monad m => String -> ParserT s m a
134-
fail message = throwError <<< ParseError message =<< position
134+
fail message = failWithPosition message =<< position
135135

136136
-- | Fail with a message and a position.
137137
failWithPosition :: forall m s a. Monad m => String -> Position -> ParserT s m a

0 commit comments

Comments
 (0)