@@ -52,13 +52,13 @@ primitive consTuple : (t : sort 0) -> (ts : TypeList) -> t -> Tuple ts -> Tuple
52
52
-- Pair types
53
53
54
54
fst : (a b : sort 0) -> #(a, b) -> a;
55
- fst a b tup = tup.(0) ;
55
+ fst a b tup = tup.0 ;
56
56
57
57
snd : (a b : sort 0) -> #(a, b) -> b;
58
- snd a b tup = tup.(1) ;
58
+ snd a b tup = tup.1 ;
59
59
60
60
uncurry (a b c : sort 0) (f : a -> b -> c) : #(a, b) -> c
61
- = (\ (x : #(a, b)) -> f x.(0) x.(1) );
61
+ = (\ (x : #(a, b)) -> f x.0 x.1 );
62
62
63
63
--------------------------------------------------------------------------------
64
64
-- String values
@@ -875,10 +875,10 @@ expNat b e =
875
875
primitive divModNat : Nat -> Nat -> #(Nat, Nat);
876
876
877
877
divNat : Nat -> Nat -> Nat;
878
- divNat x y = (divModNat x y).(0) ;
878
+ divNat x y = (divModNat x y).0 ;
879
879
880
880
modNat : Nat -> Nat -> Nat;
881
- modNat x y = (divModNat x y).(1) ;
881
+ modNat x y = (divModNat x y).1 ;
882
882
883
883
-- There are implicit constructors from integer literals.
884
884
@@ -1504,7 +1504,7 @@ foldList a =
1504
1504
either #() #(a, List a) (List a)
1505
1505
(\ (_ : #()) -> Nil a)
1506
1506
(\ (tup : #(a, List a)) ->
1507
- Cons a tup.(0) tup.(1) );
1507
+ Cons a tup.0 tup.1 );
1508
1508
1509
1509
-- A list of types, i.e. `List (sort 0)` if `List` was universe polymorphic
1510
1510
data ListSort : sort 1
@@ -1563,8 +1563,8 @@ foldW64List =
1563
1563
(\ (_:#()) -> W64Nil)
1564
1564
(\ (bv_l : #(Sigma (Vec 64 Bool) (\ (_:Vec 64 Bool) -> #()), W64List)) ->
1565
1565
W64Cons (Sigma_proj1 (Vec 64 Bool)
1566
- (\ (_:Vec 64 Bool) -> #()) bv_l.(0) )
1567
- bv_l.(1) );
1566
+ (\ (_:Vec 64 Bool) -> #()) bv_l.0 )
1567
+ bv_l.1 );
1568
1568
1569
1569
1570
1570
--------------------------------------------------------------------------------
@@ -2088,7 +2088,7 @@ composeM a b c f g x = bindM b c (f x) g;
2088
2088
tupleCompMFunBoth : (a b c: sort 0) -> (a -> CompM b) -> #(c, a) -> CompM #(c, b);
2089
2089
tupleCompMFunBoth a b c f =
2090
2090
\ (x : #(c, a)) ->
2091
- bindM b #(c, b) (f x.(1)) (\ (y:b) -> returnM #(c, b) (x.(0) , y));
2091
+ bindM b #(c, b) (f x.1) (\ (y:b) -> returnM #(c, b) (x.0 , y));
2092
2092
2093
2093
-- Tuple a valu onto the output of a monadic function
2094
2094
tupleCompMFunOut : (a b c: sort 0) -> c -> (a -> CompM b) -> (a -> CompM #(c, b));
@@ -2454,7 +2454,7 @@ multiFixM : (lrts:LetRecTypes) -> lrtPi lrts (lrtTupleType lrts) ->
2454
2454
multiArgFixM : (lrt:LetRecType) -> (lrtToType lrt -> lrtToType lrt) ->
2455
2455
lrtToType lrt;
2456
2456
multiArgFixM lrt F =
2457
- (multiFixM (LRT_Cons lrt LRT_Nil) (\ (f:lrtToType lrt) -> (F f, ()))).(0) ;
2457
+ (multiFixM (LRT_Cons lrt LRT_Nil) (\ (f:lrtToType lrt) -> (F f, ()))).0 ;
2458
2458
2459
2459
2460
2460
-- Test computations
0 commit comments