@@ -2350,6 +2350,7 @@ Directive' ::= 'lib' CodeGen String_t
2350 | 'logging' Natural
2350 | 'logging' Natural
2351 | 'dynamic' StringList
2351 | 'dynamic' StringList
2352 | 'language' 'TypeProviders'
2352 | 'language' 'TypeProviders'
2353+ | 'language' 'ErrorReflection'
2355directive :: SyntaxInfo -> IdrisParser [PDecl]
2356directive :: SyntaxInfo -> IdrisParser [PDecl]
@@ -2390,10 +2391,14 @@ directive syn = do try (lchar '%' *> reserved "lib"); cgn <- codegen_; lib <- st
2390 Left lib -> addIBC (IBCDyLib (lib_name lib))
2391 Left lib -> addIBC (IBCDyLib (lib_name lib))
2391 Right msg ->
2392 Right msg ->
2392 fail $ msg)]
2393 fail $ msg)]
2393− <|> do try (lchar '%' *> reserved "language"); ext <- reserved "TypeProviders";
2394+ <|> do try (lchar '%' *> reserved "language"); ext <- pLangExt;
2394− return [PDirective (addLangExt TypeProviders)]
2395+ return [PDirective (addLangExt ext)]
2395 <?> "directive"
2396 <?> "directive"
2398+pLangExt :: IdrisParser LanguageExt
2399+pLangExt = (reserved "TypeProviders" >> return TypeProviders)
2400+ <|> (reserved "ErrorReflection" >> return ErrorReflection)
2397{- | Parses a totality
2402{- | Parses a totality
2398Totality ::= 'partial' | 'total'
2403Totality ::= 'partial' | 'total'