quox/tests/TypingImpls.idr

26 lines
541 B
Idris

module TypingImpls
import TAP
import public Quox.Typing
import public Quox.Pretty
import public TermImpls
import Derive.Prelude
%language ElabReflection
%runElab derive "Reduce.WhnfError" [Show]
%runElab deriveIndexed "TyContext" [Show]
%runElab deriveIndexed "EqContext" [Show]
%runElab derive "Error" [Show]
export
ToInfo WhnfError where
toInfo (MissingEnumArm t ts) =
[("type", "MissingEnumArm"),
("tag", show t),
("list", show ts)]
export
ToInfo Error where toInfo err = [("err", show $ prettyError True True err)]