20 | %hide Libraries.Data.Record.KeyVal.label
21 | %hide Libraries.Data.Record.LabelledValue.label
47 | export
57 | export
73 | ||| Soft-breaking change, make an error later.
74 | ||| @ original Originally declared visibility on forward decl
75 | ||| @ new Incompatible new visibility on actual declaration.
78 | ||| First FC is type
79 | ||| @ shadowed list of names which are shadowed,
80 | ||| where they originally appear
81 | ||| and where they are shadowed
83 | ||| A warning about a deprecated definition. Supply an FC and Name to
84 | ||| have the documentation for the definition printed with the warning.
90 | -- All possible errors, carrying a location
114 | -- ^ Not a true error.
115 | -- Thrown deliberately to signal the coverage checker that a case is impossible
116 | -- (e.g. pattern match against an empty type).
178 | -- left: backticked, right: op symbolds
193 | ||| Contains list of specifiers for which foreign call cannot be resolved
210 | export
214 | "TTC data is in an " ++ age ++ " format, file: " ++ file ++ ", expected version: " ++ show exp ++ ", actual version: " ++ show ver
218 | -- Simplest possible display - higher level languages should unelaborate names
219 | -- and display annotations appropriately
221 | export
232 | export
233 | covering
250 | Left tm => assert_total (show tm) ++ " is not a valid impossible pattern because it typechecks"
282 | where
285 | "irrelevant"
286 | "linear"
291 | "irrelevant"
292 | "relevant"
296 | " so must be fully applied"
336 | show (SolvedNamedHole fc _ h _) = show fc ++ ":Named hole " ++ show h ++ " is solved by unification"
367 | show (BadRunElab fc env script desc) = show fc ++ ":Bad elaborator script " ++ show script ++ " (" ++ desc ++ ")"
370 | show (GenericMsgSol fc msg solutionHeader sols) = show fc ++ ":" ++ msg ++ " \{solutionHeader}: " ++ show sols
375 | show (LazyPatternVar fc) = "Defining lazy functions via pattern matching is not yet supported"
422 | export
432 | export
514 | export
525 | export
530 | killErrorLoc (PatternVariableUnifies fc fct x y z) = PatternVariableUnifies emptyFC emptyFC x y z
596 | killErrorLoc (FailingWrongError fc x errs) = FailingWrongError emptyFC x (map killErrorLoc errs)
607 | -- Core is a wrapper around IO that is specialised for efficiency.
608 | export
613 | export
619 | export
623 | export
627 | -- This would be better if we restrict it to a limited set of IO operations
628 | export
629 | %inline
634 | {- Monad, Applicative, Traversable are specialised by hand for Core.
635 | In theory, this shouldn't be necessary, but it turns out that Idris 1 doesn't
636 | specialise interfaces under 'case' expressions, and this has a significant
637 | impact on both compile time and run time.
639 | Of course it would be a good idea to fix this in Idris, but it's not an urgent
640 | thing on the road to self hosting, and we can make sure this isn't a problem
641 | in the next version (i.e., in this project...)! -}
643 | -- Functor (specialised)
660 | -- This would be better if we restrict it to a limited set of IO operations
661 | export
662 | %inline
666 | -- Monad (specialised)
671 | \case
679 | -- Flipped bind
684 | -- Kleisli compose
689 | -- Flipped kleisli compose
694 | -- Applicative (specialised)
699 | export
703 | export
707 | export
721 | export
726 | export
735 | export
740 | -- Control.Catchable in Idris 1, just copied here (but maybe no need for
741 | -- it since we'll only have the one instance for Core Error...)
749 | export
759 | -- Prelude.Monad.foldlM hand specialised for Core
760 | export
764 | -- Traversable (specialised)
770 | %inline
771 | export
776 | -- Traversable (specialised)
782 | %inline
783 | export
787 | export
796 | %inline
797 | export
801 | export
808 | export
813 | export
818 | export
823 | %inline
824 | export
829 | export
834 | export
841 | %inline
842 | export
846 | export
851 | -- TODO put in namespace `List1`
852 | export
867 | export
877 | export
885 | export
890 | export
899 | export
919 | export
935 | export
939 | export
947 | export
956 | export
976 | export
991 | export
996 | export
1002 | export
1009 | export
1018 | export
1024 | export
1031 | export
1046 | export
1050 | export