@@ -80,34 +80,34 @@ data Const = I Int | BI Integer | Fl Double | Ch Char | Str String
8080 | WorldType | TheWorld
8181%name Const c, c'
8282
83−abstract class ReflConst (a : Type) where
83+abstract interface ReflConst (a : Type) where
8484 toConst : a -> Const
8585
86−instance ReflConst Int where
86+implementation ReflConst Int where
8787 toConst x = I x
8888
89−instance ReflConst Integer where
89+implementation ReflConst Integer where
9090 toConst = BI
9191
92−instance ReflConst Double where
92+implementation ReflConst Double where
9393 toConst = Fl
9494
95−instance ReflConst Char where
95+implementation ReflConst Char where
9696 toConst = Ch
9797
98−instance ReflConst String where
98+implementation ReflConst String where
9999 toConst = Str
100100
101−instance ReflConst Bits8 where
101+implementation ReflConst Bits8 where
102102 toConst = B8
103103
104−instance ReflConst Bits16 where
104+implementation ReflConst Bits16 where
105105 toConst = B16
106106
107−instance ReflConst Bits32 where
107+implementation ReflConst Bits32 where
108108 toConst = B32
109109
110−instance ReflConst Bits64 where
110+implementation ReflConst Bits64 where
111111 toConst = B64
112112
113113implicit
@@ -182,7 +182,7 @@ data Binder : (tmTy : Type) -> Type where
182182
183183%name Binder b, b'
184184
185−instance Functor Binder where
185+implementation Functor Binder where
186186 map f (Lam x) = Lam (f x)
187187 map f (Pi x k) = Pi (f x) (f k)
188188 map f (Let x y) = Let (f x) (f y)
@@ -192,7 +192,7 @@ instance Functor Binder where
192192 map f (PVar x) = PVar (f x)
193193 map f (PVTy x) = PVTy (f x)
194194
195−instance Foldable Binder where
195+implementation Foldable Binder where
196196 foldr f z (Lam x) = f x z
197197 foldr f z (Pi x k) = f x (f k z)
198198 foldr f z (Let x y) = f x (f y z)
@@ -202,7 +202,7 @@ instance Foldable Binder where
202202 foldr f z (PVar x) = f x z
203203 foldr f z (PVTy x) = f x z
204204
205−instance Traversable Binder where
205+implementation Traversable Binder where
206206 traverse f (Lam x) = [| Lam (f x) |]
207207 traverse f (Pi x k) = [| Pi (f x) (f k) |]
208208 traverse f (Let x y) = [| Let (f x) (f y) |]
@@ -285,7 +285,7 @@ data Tactic =
285285 Trivial |
286286 ||| Build a proof by applying contructors up to a maximum depth
287287 Search Int |
288− ||| Resolve a type class
288+ ||| Resolve an interface
289289 Instance |
290290 ||| Infer the proof target from the context
291291 Solve |
@@ -330,12 +330,12 @@ data Tactic =
330330
331331||| Things with a canonical representation as a reflected term.
332332|||
333−||| This type class is intended to be used during proof automation and the
333+||| This interface is intended to be used during proof automation and the
334334||| construction of custom tactics.
335335|||
336336||| @ a the type to be quoted
337337||| @ t the type to quote it to (typically `TT` or `Raw`)
338−class Quotable a t where
338+interface Quotable a t where
339339 ||| A representation of the type `a`.
340340 |||
341341 ||| This is to enable quoting polymorphic datatypes
@@ -346,122 +346,122 @@ class Quotable a t where
346346 ||| Each equation should look something like ```quote (Foo x y) = `(Foo ~(quote x) ~(quote y))```
347347 quote : a -> t
348348
349−instance Quotable Nat TT where
349+implementation Quotable Nat TT where
350350 quotedTy = `(Nat)
351351
352352 quote Z = `(Z)
353353 quote (S k) = `(S ~(quote k))
354354
355−instance Quotable Nat Raw where
355+implementation Quotable Nat Raw where
356356 quotedTy = `(Nat)
357357
358358 quote Z = `(Z)
359359 quote (S k) = `(S ~(quote k))
360360
361−instance Quotable Int TT where
361+implementation Quotable Int TT where
362362 quotedTy = `(Int)
363363 quote x = TConst (I x)
364364
365−instance Quotable Int Raw where
365+implementation Quotable Int Raw where
366366 quotedTy = `(Int)
367367 quote x = RConstant (I x)
368368
369−instance Quotable Double TT where
369+implementation Quotable Double TT where
370370 quotedTy = `(Double)
371371 quote x = TConst (Fl x)
372372
373−instance Quotable Double Raw where
373+implementation Quotable Double Raw where
374374 quotedTy = `(Double)
375375 quote x = RConstant (Fl x)
376376
377−instance Quotable Char TT where
377+implementation Quotable Char TT where
378378 quotedTy = `(Char)
379379 quote x = TConst (Ch x)
380380
381−instance Quotable Char Raw where
381+implementation Quotable Char Raw where
382382 quotedTy = `(Char)
383383 quote x = RConstant (Ch x)
384384
385−instance Quotable Bits8 TT where
385+implementation Quotable Bits8 TT where
386386 quotedTy = `(Bits8)
387387 quote x = TConst (B8 x)
388388
389−instance Quotable Bits8 Raw where
389+implementation Quotable Bits8 Raw where
390390 quotedTy = `(Bits8)
391391 quote x = RConstant (B8 x)
392392
393−instance Quotable Bits16 TT where
393+implementation Quotable Bits16 TT where
394394 quotedTy = `(Bits16)
395395 quote x = TConst (B16 x)
396396
397−instance Quotable Bits16 Raw where
397+implementation Quotable Bits16 Raw where
398398 quotedTy = `(Bits16)
399399 quote x = RConstant (B16 x)
400400
401−instance Quotable Bits32 TT where
401+implementation Quotable Bits32 TT where
402402 quotedTy = `(Bits32)
403403 quote x = TConst (B32 x)
404404
405−instance Quotable Bits32 Raw where
405+implementation Quotable Bits32 Raw where
406406 quotedTy = `(Bits32)
407407 quote x = RConstant (B32 x)
408408
409−instance Quotable Bits64 TT where
409+implementation Quotable Bits64 TT where
410410 quotedTy = `(Bits64)
411411 quote x = TConst (B64 x)
412412
413−instance Quotable Bits64 Raw where
413+implementation Quotable Bits64 Raw where
414414 quotedTy = `(Bits64)
415415 quote x = RConstant (B64 x)
416416
417−instance Quotable Integer TT where
417+implementation Quotable Integer TT where
418418 quotedTy = `(Integer)
419419 quote x = TConst (BI x)
420420
421−instance Quotable Integer Raw where
421+implementation Quotable Integer Raw where
422422 quotedTy = `(Integer)
423423 quote x = RConstant (BI x)
424424
425−instance Quotable String TT where
425+implementation Quotable String TT where
426426 quotedTy = `(String)
427427 quote x = TConst (Str x)
428428
429−instance Quotable String Raw where
429+implementation Quotable String Raw where
430430 quotedTy = `(String)
431431 quote x = RConstant (Str x)
432432
433−instance Quotable NameType TT where
433+implementation Quotable NameType TT where
434434 quotedTy = `(NameType)
435435 quote Bound = `(Bound)
436436 quote Ref = `(Ref)
437437 quote (DCon x y) = `(DCon ~(quote x) ~(quote y))
438438 quote (TCon x y) = `(TCon ~(quote x) ~(quote y))
439439
440−instance Quotable NameType Raw where
440+implementation Quotable NameType Raw where
441441 quotedTy = `(NameType)
442442 quote Bound = `(Bound)
443443 quote Ref = `(Ref)
444444 quote (DCon x y) = `(DCon ~(quote {t=Raw} x) ~(quote {t=Raw} y))
445445 quote (TCon x y) = `(TCon ~(quote {t=Raw} x) ~(quote {t=Raw} y))
446446
447−instance Quotable a TT => Quotable (List a) TT where
447+implementation Quotable a TT => Quotable (List a) TT where
448448 quotedTy = `(List ~(quotedTy {a}))
449449 quote [] = `(List.Nil {elem=~(quotedTy {a})})
450450 quote (x :: xs) = `(List.(::) {elem=~(quotedTy {a})} ~(quote x) ~(quote xs))
451451
452−instance Quotable a Raw => Quotable (List a) Raw where
452+implementation Quotable a Raw => Quotable (List a) Raw where
453453 quotedTy = `(List ~(quotedTy {a}))
454454 quote [] = `(List.Nil {elem=~(quotedTy {a})})
455455 quote (x :: xs) = `(List.(::) {elem=~(quotedTy {a})} ~(quote x) ~(quote xs))
456456
457−instance Quotable SourceLocation TT where
457+implementation Quotable SourceLocation TT where
458458 quotedTy = `(SourceLocation)
459459 quote (FileLoc fn (sl, sc) (el, ec)) =
460460 `(FileLoc ~(quote fn)
461461 (~(quote sl), ~(quote sc))
462462 (~(quote el), ~(quote ec)))
463463
464−instance Quotable SourceLocation Raw where
464+implementation Quotable SourceLocation Raw where
465465 quotedTy = `(SourceLocation)
466466 quote (FileLoc fn (sl, sc) (el, ec)) =
467467 `(FileLoc ~(quote {t=Raw} fn)
@@ -470,14 +470,14 @@ instance Quotable SourceLocation Raw where
470470
471471
472472mutual
473− instance Quotable TTName TT where
473+ implementation Quotable TTName TT where
474474 quotedTy = `(TTName)
475475 quote (UN x) = `(UN ~(quote x))
476476 quote (NS n xs) = `(NS ~(quote n) ~(quote xs))
477477 quote (MN x y) = `(MN ~(quote x) ~(quote y))
478478 quote (SN sn) = `(SN ~(assert_total $ quote sn))
479479
480− instance Quotable SpecialName TT where
480+ implementation Quotable SpecialName TT where
481481 quotedTy = `(SpecialName)
482482 quote (WhereN i n1 n2) = `(WhereN ~(quote i) ~(quote n1) ~(quote n2))
483483 quote (WithN i n) = `(WithN ~(quote i) ~(quote n))
@@ -490,14 +490,14 @@ mutual
490490 quote (MetaN parent meta) = `(MetaN ~(quote parent) ~(quote meta))
491491
492492mutual
493− instance Quotable TTName Raw where
493+ implementation Quotable TTName Raw where
494494 quotedTy = `(TTName)
495495 quote (UN x) = `(UN ~(quote {t=Raw} x))
496496 quote (NS n xs) = `(NS ~(quote {t=Raw} n) ~(quote {t=Raw} xs))
497497 quote (MN x y) = `(MN ~(quote {t=Raw} x) ~(quote {t=Raw} y))
498498 quote (SN sn) = `(SN ~(assert_total $ quote sn))
499499
500− instance Quotable SpecialName Raw where
500+ implementation Quotable SpecialName Raw where
501501 quotedTy = `(SpecialName)
502502 quote (WhereN i n1 n2) = `(WhereN ~(quote i) ~(quote n1) ~(quote n2))
503503 quote (WithN i n) = `(WithN ~(quote i) ~(quote n))
@@ -510,45 +510,45 @@ mutual
510510 quote (MetaN parent meta) = `(MetaN ~(quote parent) ~(quote meta))
511511
512512
513−instance Quotable NativeTy TT where
513+implementation Quotable NativeTy TT where
514514 quotedTy = `(NativeTy)
515515 quote IT8 = `(Reflection.IT8)
516516 quote IT16 = `(Reflection.IT16)
517517 quote IT32 = `(Reflection.IT32)
518518 quote IT64 = `(Reflection.IT64)
519519
520−instance Quotable NativeTy Raw where
520+implementation Quotable NativeTy Raw where
521521 quotedTy = `(NativeTy)
522522 quote IT8 = `(Reflection.IT8)
523523 quote IT16 = `(Reflection.IT16)
524524 quote IT32 = `(Reflection.IT32)
525525 quote IT64 = `(Reflection.IT64)
526526
527−instance Quotable Reflection.IntTy TT where
527+implementation Quotable Reflection.IntTy TT where
528528 quotedTy = `(Reflection.IntTy)
529529 quote (ITFixed x) = `(ITFixed ~(quote x))
530530 quote ITNative = `(Reflection.ITNative)
531531 quote ITBig = `(ITBig)
532532 quote ITChar = `(Reflection.ITChar)
533533
534−instance Quotable Reflection.IntTy Raw where
534+implementation Quotable Reflection.IntTy Raw where
535535 quotedTy = `(Reflection.IntTy)
536536 quote (ITFixed x) = `(ITFixed ~(quote {t=Raw} x))
537537 quote ITNative = `(Reflection.ITNative)
538538 quote ITBig = `(ITBig)
539539 quote ITChar = `(Reflection.ITChar)
540540
541−instance Quotable ArithTy TT where
541+implementation Quotable ArithTy TT where
542542 quotedTy = `(ArithTy)
543543 quote (ATInt x) = `(ATInt ~(quote x))
544544 quote ATDouble = `(ATDouble)
545545
546−instance Quotable ArithTy Raw where
546+implementation Quotable ArithTy Raw where
547547 quotedTy = `(ArithTy)
548548 quote (ATInt x) = `(ATInt ~(quote {t=Raw} x))
549549 quote ATDouble = `(ATDouble)
550550
551−instance Quotable Const TT where
551+implementation Quotable Const TT where
552552 quotedTy = `(Const)
553553 quote (I x) = `(I ~(quote x))
554554 quote (BI x) = `(BI ~(quote x))
@@ -566,7 +566,7 @@ instance Quotable Const TT where
566566 quote WorldType = `(WorldType)
567567 quote TheWorld = `(TheWorld)
568568
569−instance Quotable Const Raw where
569+implementation Quotable Const Raw where
570570 quotedTy = `(Const)
571571 quote (I x) = `(I ~(quote {t=Raw} x))
572572 quote (BI x) = `(BI ~(quote {t=Raw} x))
@@ -584,30 +584,30 @@ instance Quotable Const Raw where
584584 quote WorldType = `(WorldType)
585585 quote TheWorld = `(TheWorld)
586586
587−instance Quotable TTUExp TT where
587+implementation Quotable TTUExp TT where
588588 quotedTy = `(TTUExp)
589589 quote (UVar x) = `(UVar ~(quote x))
590590 quote (UVal x) = `(UVal ~(quote x))
591591
592−instance Quotable TTUExp Raw where
592+implementation Quotable TTUExp Raw where
593593 quotedTy = `(TTUExp)
594594 quote (UVar x) = `(UVar ~(quote {t=Raw} x))
595595 quote (UVal x) = `(UVal ~(quote {t=Raw} x))
596596
597−instance Quotable Universe TT where
597+implementation Quotable Universe TT where
598598 quotedTy = `(Universe)
599599 quote Reflection.NullType = `(NullType)
600600 quote Reflection.UniqueType = `(UniqueType)
601601 quote Reflection.AllTypes = `(AllTypes)
602602
603−instance Quotable Universe Raw where
603+implementation Quotable Universe Raw where
604604 quotedTy = `(Universe)
605605 quote Reflection.NullType = `(NullType)
606606 quote Reflection.UniqueType = `(UniqueType)
607607 quote Reflection.AllTypes = `(AllTypes)
608608
609609mutual
610− instance Quotable TT TT where
610+ implementation Quotable TT TT where
611611 quotedTy = `(TT)
612612 quote (P nt n tm) = `(P ~(quote nt) ~(quote n) ~(quote tm))
613613 quote (V x) = `(V ~(quote x))
@@ -618,7 +618,7 @@ mutual
618618 quote (TType uexp) = `(TType ~(quote uexp))
619619 quote (UType u) = `(UType ~(quote u))
620620
621− instance Quotable (Binder TT) TT where
621+ implementation Quotable (Binder TT) TT where
622622 quotedTy = `(Binder TT)
623623 quote (Lam x) = `(Lam {a=TT} ~(assert_total (quote x)))
624624 quote (Pi x k) = `(Pi {a=TT} ~(assert_total (quote x))
@@ -651,11 +651,11 @@ mutual
651651 quoteRawBinderTT (PVar x) = `(PVar {a=Raw} ~(quoteRawTT x))
652652 quoteRawBinderTT (PVTy x) = `(PVTy {a=Raw} ~(quoteRawTT x))
653653
654−instance Quotable Raw TT where
654+implementation Quotable Raw TT where
655655 quotedTy = `(Raw)
656656 quote = quoteRawTT
657657
658−instance Quotable (Binder Raw) TT where
658+implementation Quotable (Binder Raw) TT where
659659 quotedTy = `(Binder Raw)
660660 quote = quoteRawBinderTT
661661
@@ -678,15 +678,15 @@ mutual
678678 quoteRawBinderRaw (PVar x) = `(PVar {a=Raw} ~(quoteRawRaw x))
679679 quoteRawBinderRaw (PVTy x) = `(PVTy {a=Raw} ~(quoteRawRaw x))
680680
681−instance Quotable Raw Raw where
681+implementation Quotable Raw Raw where
682682 quotedTy = `(Raw)
683683 quote = quoteRawRaw
684684
685−instance Quotable (Binder Raw) Raw where
685+implementation Quotable (Binder Raw) Raw where
686686 quotedTy = `(Binder Raw)
687687 quote = quoteRawBinderRaw
688688
689−instance Quotable ErrorReportPart TT where
689+implementation Quotable ErrorReportPart TT where
690690 quotedTy = `(ErrorReportPart)
691691 quote (TextPart x) = `(TextPart ~(quote x))
692692 quote (NamePart n) = `(NamePart ~(quote n))
@@ -694,7 +694,7 @@ instance Quotable ErrorReportPart TT where
694694 quote (RawPart tm) = `(RawPart ~(quote tm))
695695 quote (SubReport xs) = `(SubReport ~(assert_total $ quote xs))
696696
697−instance Quotable Tactic TT where
697+implementation Quotable Tactic TT where
698698 quotedTy = `(Tactic)
699699 quote (Try tac tac') = `(Try ~(quote tac) ~(quote tac'))
700700 quote (GoalType x tac) = `(GoalType ~(quote x) ~(quote tac))