@@ -878,10 +878,7 @@ class_ syn = do (doc, argDocs, acc)
878878 classKeyword = reservedHL "interface"
879879 <|> do reservedHL "class"
880880 fc <- getFC
881− ist <- get
882− put ist { parserWarnings =
883− (fc, Msg "The 'class' keyword is deprecated. Use 'interface' instead.")
884− : parserWarnings ist }
881+ parserWarning fc Nothing (Msg "The 'class' keyword is deprecated. Use 'interface' instead.")
885882
886883 carg :: IdrisParser (Name, FC, PTerm)
887884 carg = do lchar '('; (i, ifc) <- name; lchar ':'; ty <- expr syn; lchar ')'
@@ -928,11 +925,7 @@ instance_ kwopt syn
928925 instanceKeyword = reservedHL "implementation"
929926 <|> do reservedHL "instance"
930927 fc <- getFC
931− ist <- get
932− put ist { parserWarnings =
933− (fc, Msg "The 'instance' keyword is deprecated. Use 'implementation' (or omit it) instead.")
934− : parserWarnings ist }
935−
928+ parserWarning fc Nothing (Msg "The 'instance' keyword is deprecated. Use 'implementation' (or omit it) instead.")
936929
937930-- | Parse a docstring
938931docstring :: SyntaxInfo