diff --git a/src/Lexer.hs b/src/Lexer.hs index 273a0fe..3e98cce 100644 --- a/src/Lexer.hs +++ b/src/Lexer.hs @@ -221,7 +221,7 @@ link :: Lexer link = do pos <- getPosition l <- linkRaw - -- register the position of the last token + -- "unconsume" the last token pos' <- flip incSourceColumn (-1) <$> getPosition pure $ (pos, LinkOpen) : l <> [(pos', LinkClose)] diff --git a/test/Spec.hs b/test/Spec.hs index a09489e..8207b77 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -11,7 +11,6 @@ import Types import Data.String (IsString (..)) import Data.Text (Text) import Text.Parsec.Pos -import GHC.Stack main :: IO () main = hspec $ do @@ -187,7 +186,6 @@ instance IsString (Doc String) where shouldLexTo :: String -> [(Int, Int, Token)] -> Expectation shouldLexTo input expected = - withFrozenCallStack $ case lexer input of Right tokens -> do let actual = map (\(pos, tok) -> (sourceLine pos, sourceColumn pos, tok)) tokens