parameterise over qty semiring
This commit is contained in:
parent
961c8415b5
commit
c45a963ba0
16 changed files with 712 additions and 491 deletions
|
@ -2,10 +2,11 @@ module Tests.Equal
|
|||
|
||||
import Quox.Equal as Lib
|
||||
import Quox.Pretty
|
||||
import Quox.Syntax.Qty.Three
|
||||
import TAP
|
||||
|
||||
export
|
||||
ToInfo Error where
|
||||
ToInfo (Error Three) where
|
||||
toInfo (NotInScope x) =
|
||||
[("type", "NotInScope"),
|
||||
("name", show x)]
|
||||
|
@ -35,10 +36,11 @@ ToInfo Error where
|
|||
("right", prettyStr True rh)]
|
||||
|
||||
|
||||
M = ReaderT Definitions (Either Error)
|
||||
0 M : Type -> Type
|
||||
M = ReaderT (Definitions Three) (Either (Error Three))
|
||||
|
||||
parameters (label : String) (act : Lazy (M ()))
|
||||
{default empty globals : Definitions}
|
||||
{default empty globals : Definitions Three}
|
||||
testEq : Test
|
||||
testEq = test label $ runReaderT globals act
|
||||
|
||||
|
@ -46,19 +48,19 @@ parameters (label : String) (act : Lazy (M ()))
|
|||
testNeq = testThrows label (const True) $ runReaderT globals act
|
||||
|
||||
|
||||
subT : {default 0 d, n : Nat} -> Term d n -> Term d n -> M ()
|
||||
subT : {default 0 d, n : Nat} -> Term Three d n -> Term Three d n -> M ()
|
||||
subT = Lib.subT
|
||||
%hide Lib.subT
|
||||
|
||||
equalT : {default 0 d, n : Nat} -> Term d n -> Term d n -> M ()
|
||||
equalT : {default 0 d, n : Nat} -> Term Three d n -> Term Three d n -> M ()
|
||||
equalT = Lib.equalT
|
||||
%hide Lib.equalT
|
||||
|
||||
subE : {default 0 d, n : Nat} -> Elim d n -> Elim d n -> M ()
|
||||
subE : {default 0 d, n : Nat} -> Elim Three d n -> Elim Three d n -> M ()
|
||||
subE = Lib.subE
|
||||
%hide Lib.subE
|
||||
|
||||
equalE : {default 0 d, n : Nat} -> Elim d n -> Elim d n -> M ()
|
||||
equalE : {default 0 d, n : Nat} -> Elim Three d n -> Elim Three d n -> M ()
|
||||
equalE = Lib.equalE
|
||||
%hide Lib.equalE
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue