Replace getPosition with getSourcePos
commit5222ad9b5bee23b5ba662818e88d3231b52f13a2
authorJoseph Morag <jm4157@columbia.edu>
dateTue 11 Dec 2018, 01:01 (8 years ago)
parent80b60a6
src/Idris/Parser/Helpers.hs+1−1
@@ -393,7 +393,7 @@ popIndent = do ist <- get
393393
394394-- | Gets current indentation
395395indent :: Parsing m => m Int
396−indent = P.unPos . P.sourceColumn <$> P.getPosition
396+indent = P.unPos . P.sourceColumn <$> P.getSourcePos
397397
398398-- | Gets last indentation
399399lastIndent :: (MonadState IState m) => m Int
src/Idris/Parser/Stack.hs+1−1
@@ -104,7 +104,7 @@ sourcePositionFC (P.SourcePos name line column) =
104104-- This is useful when the position is needed in a way unrelated to the
105105-- heirarchy of parsers. Prefer using @withExtent@ and friends.
106106getFC :: Parsing m => m FC
107−getFC = sourcePositionFC <$> P.getPosition
107+getFC = sourcePositionFC <$> P.getSourcePos
108108
109109-- | Add an extent (widen) our current parsing context.
110110addExtent :: MonadWriter FC m => FC -> m ()