mirror of
https://github.com/mrkkrp/megaparsec.git
synced 2024-11-26 23:02:07 +03:00
34b34c3d93
Split the ‘Stream’ type class. The methods ‘showTokens’ and ‘tokensLength’ have been put into a separate type class ‘VisualStream’, while ‘reachOffset’ and ‘reachOffsetNoLine’ are now in ‘TraversableStream’. This should make defining ‘Stream’ instances for custom streams easier. Defined ‘Stream’ instances for lists and ‘Seq’s.
14 lines
572 B
Diff
14 lines
572 B
Diff
diff --git a/src/Idris/Parser/Stack.hs b/src/Idris/Parser/Stack.hs
|
|
index fb7b61144..991f50d48 100644
|
|
--- a/src/Idris/Parser/Stack.hs
|
|
+++ b/src/Idris/Parser/Stack.hs
|
|
@@ -84,7 +84,7 @@ instance Message ParseError where
|
|
(pos, _) = P.reachOffsetNoLine (parseErrorOffset err) (parseErrorPosState err)
|
|
#endif
|
|
messageText = PP.text . init . P.parseErrorTextPretty . parseError
|
|
- messageSource err = Just sline
|
|
+ messageSource err = sline
|
|
where
|
|
#if MIN_VERSION_megaparsec(8,0,0)
|
|
(sline, _) = P.reachOffset (parseErrorOffset err) (parseErrorPosState err)
|