on master help sign in
Replace getPosition with getSourcePos
5222ad9Joseph Morag
src/Idris/Parser/Helpers.hs+1−1
@@ -393,7 +393,7 @@ popIndent = do ist <- get
393
393
394-- | Gets current indentation
394-- | Gets current indentation
395indent :: Parsing m => m Int
395indent :: Parsing m => m Int
396−indent = P.unPos . P.sourceColumn <$> P.getPosition
396+indent = P.unPos . P.sourceColumn <$> P.getSourcePos
397
397
398-- | Gets last indentation
398-- | Gets last indentation
399lastIndent :: (MonadState IState m) => m Int
399lastIndent :: (MonadState IState m) => m Int
src/Idris/Parser/Stack.hs+1−1
@@ -104,7 +104,7 @@ sourcePositionFC (P.SourcePos name line column) =
104-- This is useful when the position is needed in a way unrelated to the
104-- This is useful when the position is needed in a way unrelated to the
105-- heirarchy of parsers. Prefer using @withExtent@ and friends.
105-- heirarchy of parsers. Prefer using @withExtent@ and friends.
106getFC :: Parsing m => m FC
106getFC :: Parsing m => m FC
107−getFC = sourcePositionFC <$> P.getPosition
107+getFC = sourcePositionFC <$> P.getSourcePos
108
108
109-- | Add an extent (widen) our current parsing context.
109-- | Add an extent (widen) our current parsing context.
110addExtent :: MonadWriter FC m => FC -> m ()
110addExtent :: MonadWriter FC m => FC -> m ()