@@ -878,10 +878,15 @@ interface_ syn = do (doc, argDocs, acc)
878878 fundeps :: IdrisParser [(Name, FC)]
879879 fundeps = do lchar '|'; P.sepBy (withExtent name) (lchar ',')
880880
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."
885+
881886 interfaceKeyword :: IdrisParser ()
882887 interfaceKeyword = keyword "interface"
883888 <|> do fc <- extent $ keyword "class"
884− parserWarning fc Nothing (Msg "The 'class' keyword exists to migrate from Haskell--use 'interface' instead.")
889+ parserWarning fc Nothing (Msg classWarning)
885890
886891 carg :: IdrisParser (Name, FC, PTerm)
887892 carg = do lchar '('; (i, ifc) <- withExtent name; lchar ':'; ty <- expr syn; lchar ')'
@@ -926,10 +931,16 @@ implementation syn = do (doc, argDocs) <- docstring syn
926931 let n = expandNS syn n_in
927932 return n
928933 <?> "implementation name"
934+
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."
939+
929940 implementationKeyword :: IdrisParser ()
930941 implementationKeyword = keyword "implementation"
931942 <|> do fc <- extent $ keyword "instance"
932− parserWarning fc Nothing (Msg "The 'instance' keyword exists to migrate from Haskell--use 'implementation' (or omit it) instead.")
943+ parserWarning fc Nothing (Msg instanceWarning)
933944
934945 implementationUsing :: IdrisParser [Name]
935946 implementationUsing = do keyword "using"