Show for contexts, etc
This commit is contained in:
parent
ac518472ad
commit
e1257560b7
3 changed files with 11 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 =
|
||||
|
|
Loading…
Reference in a new issue