@@ -60,7 +60,7 @@ data ElabInfo = EInfo { params :: [(Name, PTerm)],
60 namespace :: Maybe [String],
60 namespace :: Maybe [String],
61 elabFC :: Maybe FC,
61 elabFC :: Maybe FC,
62 -- We may, recursively, collect transformations to
62 -- We may, recursively, collect transformations to
63− -- do on the rhs, e.g. rewriting recursive calls to
63+ -- do on the rhs, e.g. rewriting recursive calls to
64 -- functions defined by 'with'
64 -- functions defined by 'with'
65 rhs_trans :: PTerm -> PTerm,
65 rhs_trans :: PTerm -> PTerm,
66 rec_elabDecl :: ElabWhat -> ElabInfo -> PDecl ->
66 rec_elabDecl :: ElabWhat -> ElabInfo -> PDecl ->
@@ -271,7 +271,8 @@ data IState = IState {
271 idris_parserHighlights :: [(FC, OutputAnnotation)], -- ^ Highlighting information from the parser
271 idris_parserHighlights :: [(FC, OutputAnnotation)], -- ^ Highlighting information from the parser
272 idris_deprecated :: Ctxt String, -- ^ Deprecated names and explanation
272 idris_deprecated :: Ctxt String, -- ^ Deprecated names and explanation
273 idris_inmodule :: S.Set Name, -- ^ Names defined in current module
273 idris_inmodule :: S.Set Name, -- ^ Names defined in current module
274− idris_ttstats :: M.Map Term (Int, Term)
274+ idris_ttstats :: M.Map Term (Int, Term),
275+ idris_fragile :: Ctxt String -- ^ Fragile names and explanation.
277-- Required for parsers library, and therefore trifecta
278-- Required for parsers library, and therefore trifecta
@@ -347,6 +348,7 @@ data IBCWrite = IBCFix FixDecl
347 | IBCExport Name
348 | IBCExport Name
348 | IBCAutoHint Name Name
349 | IBCAutoHint Name Name
349 | IBCDeprecate Name String
350 | IBCDeprecate Name String
351+ | IBCFragile Name String
350 deriving Show
352 deriving Show
352-- | The initial state for the compiler
354-- | The initial state for the compiler
@@ -361,7 +363,7 @@ idrisInit = IState initContext S.empty []
361 [] [] Nothing [] Nothing [] [] Nothing Nothing emptyContext Private False [] Nothing [] []
363 [] [] Nothing [] Nothing [] [] Nothing Nothing emptyContext Private False [] Nothing [] []
362 (RawOutput stdout) True defaultTheme [] (0, emptyContext) emptyContext M.empty
364 (RawOutput stdout) True defaultTheme [] (0, emptyContext) emptyContext M.empty
363 AutomaticWidth S.empty S.empty [] Nothing Nothing [] [] M.empty [] [] []
365 AutomaticWidth S.empty S.empty [] Nothing Nothing [] [] M.empty [] [] []
364− emptyContext S.empty M.empty
366+ emptyContext S.empty M.empty emptyContext
367-- | The monad for the main REPL - reading and processing files and updating
369-- | The monad for the main REPL - reading and processing files and updating
@@ -758,22 +760,23 @@ deriving instance NFData PDecl'
760-- | The set of source directives
762-- | The set of source directives
761−data Directive = DLib Codegen String |
763+data Directive = DLib Codegen String
762− DLink Codegen String |
764+ | DLink Codegen String
763− DFlag Codegen String |
765+ | DFlag Codegen String
764− DInclude Codegen String |
766+ | DInclude Codegen String
765− DHide Name |
767+ | DHide Name
766− DFreeze Name |
768+ | DFreeze Name
767− DAccess Accessibility |
769+ | DAccess Accessibility
768− DDefault Bool |
770+ | DDefault Bool
769− DLogging Integer |
771+ | DLogging Integer
770− DDynamicLibs [String] |
772+ | DDynamicLibs [String]
771− DNameHint Name FC [(Name, FC)] |
773+ | DNameHint Name FC [(Name, FC)]
772− DErrorHandlers Name FC Name FC [(Name, FC)] |
774+ | DErrorHandlers Name FC Name FC [(Name, FC)]
773− DLanguage LanguageExt |
775+ | DLanguage LanguageExt
774− DDeprecate Name String |
776+ | DDeprecate Name String
777+ | DFragile Name String
775− DAutoImplicits Bool |
778+ | DAutoImplicits Bool
776− DUsed FC Name Name
779+ | DUsed FC Name Name
778-- | A set of instructions for things that need to happen in IState
781-- | A set of instructions for things that need to happen in IState
779-- after a term elaboration when there's been reflected elaboration.
782-- after a term elaboration when there's been reflected elaboration.
@@ -1016,7 +1019,7 @@ data PTerm = PQuote Raw -- ^ Inclusion of a core term into the high-level langua
1016 | PLet FC Name FC PTerm PTerm PTerm -- ^ A let binding (second FC is precise name location)
1019 | PLet FC Name FC PTerm PTerm PTerm -- ^ A let binding (second FC is precise name location)
1017 | PTyped PTerm PTerm -- ^ Term with explicit type
1020 | PTyped PTerm PTerm -- ^ Term with explicit type
1018 | PApp FC PTerm [PArg] -- ^ e.g. IO (), List Char, length x
1021 | PApp FC PTerm [PArg] -- ^ e.g. IO (), List Char, length x
1019− | PWithApp FC PTerm PTerm -- ^ Application plus a 'with' argument
1022+ | PWithApp FC PTerm PTerm -- ^ Application plus a 'with' argument
1020 | PAppImpl PTerm [ImplicitInfo] -- ^ Implicit argument application (introduced during elaboration only)
1023 | PAppImpl PTerm [ImplicitInfo] -- ^ Implicit argument application (introduced during elaboration only)
1021 | PAppBind FC PTerm [PArg] -- ^ implicitly bound application
1024 | PAppBind FC PTerm [PArg] -- ^ implicitly bound application
1022 | PMatchApp FC Name -- ^ Make an application by type matching
1025 | PMatchApp FC Name -- ^ Make an application by type matching
@@ -1024,7 +1027,7 @@ data PTerm = PQuote Raw -- ^ Inclusion of a core term into the high-level langua
1024 | PCase FC PTerm [(PTerm, PTerm)] -- ^ A case expression. Args are source location, scrutinee, and a list of pattern/RHS pairs
1027 | PCase FC PTerm [(PTerm, PTerm)] -- ^ A case expression. Args are source location, scrutinee, and a list of pattern/RHS pairs
1025 | PTrue FC PunInfo -- ^ Unit type..?
1028 | PTrue FC PunInfo -- ^ Unit type..?
1026 | PResolveTC FC -- ^ Solve this dictionary by type class resolution
1029 | PResolveTC FC -- ^ Solve this dictionary by type class resolution
1027− | PRewrite FC (Maybe Name) PTerm PTerm (Maybe PTerm)
1030+ | PRewrite FC (Maybe Name) PTerm PTerm (Maybe PTerm)
1028 -- ^ "rewrite" syntax, with optional rewriting function
1031 -- ^ "rewrite" syntax, with optional rewriting function
1029 -- and optional result type
1032 -- and optional result type
1030 | PPair FC [FC] PunInfo PTerm PTerm -- ^ A pair (a, b) and whether it's a product type or a pair (solved by elaboration). The list of FCs is its punctuation.
1033 | PPair FC [FC] PunInfo PTerm PTerm -- ^ A pair (a, b) and whether it's a product type or a pair (solved by elaboration). The list of FCs is its punctuation.
@@ -1886,7 +1889,7 @@ pprintPTerm ppo bnd docArgs infixes = prettySe (ppopt_depth ppo) startPrec bnd
1886 prettySe d p bnd (PTrue _ TypeOrTerm) = text "()"
1889 prettySe d p bnd (PTrue _ TypeOrTerm) = text "()"
1887 prettySe d p bnd (PRewrite _ by l r _) =
1890 prettySe d p bnd (PRewrite _ by l r _) =
1888 depth d . bracket p startPrec $
1891 depth d . bracket p startPrec $
1889− text "rewrite" <+> prettySe (decD d) (startPrec + 1) bnd l
1892+ text "rewrite" <+> prettySe (decD d) (startPrec + 1) bnd l
1890 <+> (case by of
1893 <+> (case by of
1891 Nothing -> empty
1894 Nothing -> empty
1892 Just fn -> text "using" <+>
1895 Just fn -> text "using" <+>