mirror of
https://github.com/mrkkrp/megaparsec.git
synced 2024-11-23 10:23:39 +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
542 B
Diff
14 lines
542 B
Diff
diff --git a/src/Dhall/Parser/Expression.hs b/src/Dhall/Parser/Expression.hs
|
|
index 3cd51406..0def6b22 100644
|
|
--- a/src/Dhall/Parser/Expression.hs
|
|
+++ b/src/Dhall/Parser/Expression.hs
|
|
@@ -36,7 +36,7 @@ import Dhall.Parser.Combinators
|
|
import Dhall.Parser.Token
|
|
|
|
-- | Get the current source position
|
|
-getSourcePos :: Text.Megaparsec.MonadParsec e s m =>
|
|
+getSourcePos :: (Text.Megaparsec.MonadParsec e s m, Text.Megaparsec.TraversableStream s) =>
|
|
m Text.Megaparsec.SourcePos
|
|
getSourcePos =
|
|
Text.Megaparsec.getSourcePos
|