@@ -71,13 +71,13 @@ let e_unit_5 = t
7171
7272(* Tests for extraction of erasable effects, combined with their lifts to non-erasable effects *)
7373
74- type repr ( a :Type) ( _ : eqtype_as_type unit) = a
74+ type repr ( a :Type) ( _ :unit) = a
7575let return ( a :Type) ( x : a ) : repr a () = x
7676let bind ( a b :Type) ( f : repr a ()) ( g : a -> repr b ()) : repr b () = g f
7777[ @@ primitive_extraction ]
7878total
7979effect {
80- MPURE ( a :Type) ( _ : eqtype_as_type unit) with { repr ; return ; bind }
80+ MPURE ( a :Type) ( _ :unit) with { repr ; return ; bind }
8181}
8282
8383//an erasable effect must be marked total
@@ -88,7 +88,7 @@ new_effect MGHOST = MPURE
8888total new_effect MGHOST = MPURE
8989
9090//a lift cannot be in Ghost effect if the source effect is not erasable
91- let lift_PURE_MPURE_error ( a :Type) ( wp : pure_wp a ) ( f : eqtype_as_type unit -> PURE a wp )
91+ let lift_PURE_MPURE_error ( a :Type) ( wp : pure_wp a ) ( f :unit -> PURE a wp )
9292 : Ghost ( repr a ())
9393 ( requires wp ( fun _ -> True ))
9494 ( ensures fun _ -> True )
@@ -99,7 +99,7 @@ sub_effect PURE ~> MPURE = lift_PURE_MPURE_error
9999
100100//lifts from GHOST effect are not allowed
101101//GHOST effect is implicitly lifted/combined with effects when appropriate
102- let lift_GHOST_MPURE ( a :Type) ( wp : pure_wp a ) ( f : eqtype_as_type unit -> GHOST a wp )
102+ let lift_GHOST_MPURE ( a :Type) ( wp : pure_wp a ) ( f :unit -> GHOST a wp )
103103 : Ghost ( repr a ())
104104 ( requires wp ( fun _ -> True ))
105105 ( ensures fun _ -> True )
@@ -108,7 +108,7 @@ let lift_GHOST_MPURE (a:Type) (wp:pure_wp a) (f:eqtype_as_type unit -> GHOST a w
108108[ @@expect_failure [ 187 ]]
109109sub_effect GHOST ~> MPURE = lift_GHOST_MPURE
110110
111- let lift_PURE_MPURE ( a :Type) ( wp : pure_wp a ) ( f : eqtype_as_type unit -> PURE a wp )
111+ let lift_PURE_MPURE ( a :Type) ( wp : pure_wp a ) ( f :unit -> PURE a wp )
112112 : Pure ( repr a ())
113113 ( requires wp ( fun _ -> True ))
114114 ( ensures fun _ -> True )
@@ -205,7 +205,7 @@ total
205205new_effect M2 = MPURE
206206
207207//instead of defining lifts from PURE To M1 or M2, we define polymonadic binds
208- let bind_PURE_M1 ( a b :Type) ( wp : pure_wp a ) ( f : eqtype_as_type unit -> PURE a wp ) ( g : a -> repr b ())
208+ let bind_PURE_M1 ( a b :Type) ( wp : pure_wp a ) ( f :unit -> PURE a wp ) ( g : a -> repr b ())
209209 : Pure ( repr b ())
210210 ( requires wp ( fun _ -> True ))
211211 ( ensures fun _ -> True )
0 commit comments