3import Language.Reflection
4import Language.Reflection.Errors
5import Language.Reflection.Utils
7%language ErrorReflection
11 -> {auto cons1 : isCons xs = True}
12 -> {auto cons2 : isCons (tail xs) = True}
14cadr (x :: (y :: _)) {cons1=Refl} {cons2=Refl} = y
15cadr (x :: []) {cons1=Refl} {cons2=Refl} impossible
16cadr [] {cons1=Refl} {cons2=Refl} impossible
18extractList : TT -> Maybe TT
19extractList (App (App reflCon (App isCons lst)) _) = Just lst
20extractList _ = Nothing
23has2elts : Err -> Maybe (List ErrorReportPart)
24has2elts (CantSolveGoal tm _) = do lst <- extractList tm
25 return [ TextPart "Could not prove that"
27 , TextPart "has at least two elements."
29has2elts e = Just [TextPart (show e)]
31%error_handlers cadr cons1 has2elts
32%error_handlers cadr cons2 has2elts
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list