@@ -52,13 +52,13 @@ primitive consTuple : (t : sort 0) -> (ts : TypeList) -> t -> Tuple ts -> Tuple
5252-- Pair types
5353
5454fst : (a b : sort 0) -> #(a, b) -> a;
55- fst a b tup = tup.(0) ;
55+ fst a b tup = tup.0 ;
5656
5757snd : (a b : sort 0) -> #(a, b) -> b;
58- snd a b tup = tup.(1) ;
58+ snd a b tup = tup.1 ;
5959
6060uncurry (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 );
6262
6363--------------------------------------------------------------------------------
6464-- String values
@@ -875,10 +875,10 @@ expNat b e =
875875primitive divModNat : Nat -> Nat -> #(Nat, Nat);
876876
877877divNat : Nat -> Nat -> Nat;
878- divNat x y = (divModNat x y).(0) ;
878+ divNat x y = (divModNat x y).0 ;
879879
880880modNat : Nat -> Nat -> Nat;
881- modNat x y = (divModNat x y).(1) ;
881+ modNat x y = (divModNat x y).1 ;
882882
883883-- There are implicit constructors from integer literals.
884884
@@ -1504,7 +1504,7 @@ foldList a =
15041504 either #() #(a, List a) (List a)
15051505 (\ (_ : #()) -> Nil a)
15061506 (\ (tup : #(a, List a)) ->
1507- Cons a tup.(0) tup.(1) );
1507+ Cons a tup.0 tup.1 );
15081508
15091509-- A list of types, i.e. `List (sort 0)` if `List` was universe polymorphic
15101510data ListSort : sort 1
@@ -1563,8 +1563,8 @@ foldW64List =
15631563 (\ (_:#()) -> W64Nil)
15641564 (\ (bv_l : #(Sigma (Vec 64 Bool) (\ (_:Vec 64 Bool) -> #()), W64List)) ->
15651565 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 );
15681568
15691569
15701570--------------------------------------------------------------------------------
@@ -2088,7 +2088,7 @@ composeM a b c f g x = bindM b c (f x) g;
20882088tupleCompMFunBoth : (a b c: sort 0) -> (a -> CompM b) -> #(c, a) -> CompM #(c, b);
20892089tupleCompMFunBoth a b c f =
20902090 \ (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));
20922092
20932093-- Tuple a valu onto the output of a monadic function
20942094tupleCompMFunOut : (a b c: sort 0) -> c -> (a -> CompM b) -> (a -> CompM #(c, b));
@@ -2454,7 +2454,7 @@ multiFixM : (lrts:LetRecTypes) -> lrtPi lrts (lrtTupleType lrts) ->
24542454multiArgFixM : (lrt:LetRecType) -> (lrtToType lrt -> lrtToType lrt) ->
24552455 lrtToType lrt;
24562456multiArgFixM 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 ;
24582458
24592459
24602460-- Test computations
0 commit comments