2023-02-11 12:15:50 -05:00
|
|
|
module TypingImpls
|
|
|
|
|
|
|
|
import TAP
|
|
|
|
import public Quox.Typing
|
|
|
|
import public Quox.Pretty
|
2023-03-13 14:33:09 -04:00
|
|
|
import public TermImpls
|
2023-02-11 12:15:50 -05:00
|
|
|
|
2023-03-13 14:33:09 -04:00
|
|
|
import Derive.Prelude
|
|
|
|
%language ElabReflection
|
|
|
|
|
|
|
|
|
2023-03-13 14:39:29 -04:00
|
|
|
%runElab derive "Reduce.WhnfError" [Show]
|
2023-03-13 14:33:09 -04:00
|
|
|
|
|
|
|
%runElab deriveIndexed "DimEq" [Show]
|
|
|
|
|
|
|
|
export %hint
|
|
|
|
showTyContext : (PrettyHL q, Show q) => Show (TyContext q d n)
|
|
|
|
showTyContext = deriveShow
|
|
|
|
|
2023-03-13 22:22:26 -04:00
|
|
|
export %hint
|
|
|
|
showEqContext : (PrettyHL q, Show q) => Show (EqContext q n)
|
|
|
|
showEqContext = deriveShow
|
|
|
|
|
2023-03-13 14:33:09 -04:00
|
|
|
export %hint
|
|
|
|
showTypingError : (PrettyHL q, Show q) => Show (Error q)
|
|
|
|
showTypingError = deriveShow
|
2023-02-22 01:45:10 -05:00
|
|
|
|
|
|
|
export
|
2023-03-13 14:39:29 -04:00
|
|
|
ToInfo WhnfError where
|
2023-02-22 01:45:10 -05:00
|
|
|
toInfo (MissingEnumArm t ts) =
|
|
|
|
[("type", "MissingEnumArm"),
|
|
|
|
("tag", show t),
|
|
|
|
("list", show ts)]
|
|
|
|
|
2023-02-11 12:15:50 -05:00
|
|
|
export
|
2023-03-15 10:54:51 -04:00
|
|
|
(Eq q, PrettyHL q) => ToInfo (Error q) where
|
|
|
|
toInfo err = [("err", show $ prettyError True True err)]
|