@@ -650,9 +650,6 @@ fnOpt = do keyword "total"; return TotalFn
650 <|> NoImplicit <$ P.try (lchar '%' *> reserved "no_implicit")
650 <|> NoImplicit <$ P.try (lchar '%' *> reserved "no_implicit")
651 <|> Inlinable <$ P.try (lchar '%' *> reserved "inline")
651 <|> Inlinable <$ P.try (lchar '%' *> reserved "inline")
652 <|> StaticFn <$ P.try (lchar '%' *> reserved "static")
652 <|> StaticFn <$ P.try (lchar '%' *> reserved "static")
653− <|> do fc <- P.try $ extent $ lchar '%' *> reserved "assert_total"
654− parserWarning fc Nothing (Msg "%assert_total is deprecated. Use the 'assert_total' function instead.")
656 <|> ErrorHandler <$ P.try (lchar '%' *> reserved "error_handler")
653 <|> ErrorHandler <$ P.try (lchar '%' *> reserved "error_handler")
657 <|> ErrorReverse <$ P.try (lchar '%' *> reserved "error_reverse")
654 <|> ErrorReverse <$ P.try (lchar '%' *> reserved "error_reverse")
658 <|> ErrorReduce <$ P.try (lchar '%' *> reserved "error_reduce")
655 <|> ErrorReduce <$ P.try (lchar '%' *> reserved "error_reduce")
@@ -881,10 +878,15 @@ interface_ syn = do (doc, argDocs, acc)
881 fundeps :: IdrisParser [(Name, FC)]
878 fundeps :: IdrisParser [(Name, FC)]
882 fundeps = do lchar '|'; P.sepBy (withExtent name) (lchar ',')
879 fundeps = do lchar '|'; P.sepBy (withExtent name) (lchar ',')
881+ classWarning :: String
882+ classWarning = "Use of a fragile keyword `class`. " ++
883+ "`class` is provided for those coming from Haskell. " ++
884+ "Please use `interface` instead, which is equivalent."
884 interfaceKeyword :: IdrisParser ()
886 interfaceKeyword :: IdrisParser ()
885 interfaceKeyword = keyword "interface"
887 interfaceKeyword = keyword "interface"
886 <|> do fc <- extent $ keyword "class"
888 <|> do fc <- extent $ keyword "class"
887− parserWarning fc Nothing (Msg "The 'class' keyword is deprecated. Use 'interface' instead.")
889+ parserWarning fc Nothing (Msg classWarning)
889 carg :: IdrisParser (Name, FC, PTerm)
891 carg :: IdrisParser (Name, FC, PTerm)
890 carg = do lchar '('; (i, ifc) <- withExtent name; lchar ':'; ty <- expr syn; lchar ')'
892 carg = do lchar '('; (i, ifc) <- withExtent name; lchar ':'; ty <- expr syn; lchar ')'
@@ -929,10 +931,16 @@ implementation syn = do (doc, argDocs) <- docstring syn
929 let n = expandNS syn n_in
931 let n = expandNS syn n_in
931 <?> "implementation name"
933 <?> "implementation name"
935+ instanceWarning :: String
936+ instanceWarning = "Use of fragile keyword `instance`. " ++
937+ "`instance` is provided for those coming from Haskell. " ++
938+ "Please use `implementation` (which is equivalent) instead, or omit it."
932 implementationKeyword :: IdrisParser ()
940 implementationKeyword :: IdrisParser ()
933 implementationKeyword = keyword "implementation"
941 implementationKeyword = keyword "implementation"
934 <|> do fc <- extent $ keyword "instance"
942 <|> do fc <- extent $ keyword "instance"
935− parserWarning fc Nothing (Msg "The 'instance' keyword is deprecated. Use 'implementation' (or omit it) instead.")
943+ parserWarning fc Nothing (Msg instanceWarning)
937 implementationUsing :: IdrisParser [Name]
945 implementationUsing :: IdrisParser [Name]
938 implementationUsing = do keyword "using"
946 implementationUsing = do keyword "using"