diff --git a/lib/Quox/Typing/Context.idr b/lib/Quox/Typing/Context.idr index 15e5b1e..385721f 100644 --- a/lib/Quox/Typing/Context.idr +++ b/lib/Quox/Typing/Context.idr @@ -4,8 +4,10 @@ import Quox.Syntax import Quox.Context import Quox.Pretty import public Data.Singleton +import Derive.Prelude %default total +%language ElabReflection public export @@ -36,6 +38,7 @@ record TyContext d n where tnames : BContext n -- only used for printing qtys : QContext n -- only used for printing %name TyContext ctx +%runElab deriveIndexed "TyContext" [Show] public export @@ -49,6 +52,7 @@ record EqContext n where tnames : BContext n -- only used for printing qtys : QContext n -- only used for printing %name EqContext ctx +%runElab deriveIndexed "EqContext" [Show] public export @@ -58,6 +62,7 @@ record WhnfContext d n where tnames : BContext n tctx : TContext d n %name WhnfContext ctx +%runElab deriveIndexed "WhnfContext" [Show] namespace TContext export %inline diff --git a/lib/Quox/Typing/Error.idr b/lib/Quox/Typing/Error.idr index 5975445..342fb05 100644 --- a/lib/Quox/Typing/Error.idr +++ b/lib/Quox/Typing/Error.idr @@ -8,6 +8,10 @@ import Quox.Pretty import Data.List import Control.Eff +import Derive.Prelude + +%language ElabReflection +%hide TT.Name public export @@ -15,6 +19,7 @@ record NameContexts d n where constructor MkNameContexts dnames : BContext d tnames : BContext n +%runElab deriveIndexed "NameContexts" [Show] namespace NameContexts export @@ -105,6 +110,7 @@ data Error (Elim 0 n) (Elim 0 n) Error %name Error err +%runElab derive "Error" [Show] public export ErrorEff : Type -> Type diff --git a/tests/TypingImpls.idr b/tests/TypingImpls.idr index febb152..e149f50 100644 --- a/tests/TypingImpls.idr +++ b/tests/TypingImpls.idr @@ -12,11 +12,6 @@ import Derive.Prelude %language ElabReflection -%runElab deriveIndexed "TyContext" [Show] -%runElab deriveIndexed "EqContext" [Show] -%runElab deriveIndexed "NameContexts" [Show] -%runElab derive "Error" [Show] - export ToInfo Error where toInfo err =