Skip to content

Commit 626b759

Browse files
Remove unnecessary Alloc type (#249)
1 parent c3d6d37 commit 626b759

File tree

9 files changed

+123
-158
lines changed

9 files changed

+123
-158
lines changed

hkmc2/shared/src/main/scala/hkmc2/bbml/bbML.scala

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ final case class BbCtx(
4141
given (using ctx: BbCtx): Raise = ctx.raise
4242

4343
object BbCtx:
44-
def allocTy(using ctx: BbCtx): Type = ClassLikeType(ctx.getCls("Alloc").get, Nil)
4544
def intTy(using ctx: BbCtx): Type = ClassLikeType(ctx.getCls("Int").get, Nil)
4645
def numTy(using ctx: BbCtx): Type = ClassLikeType(ctx.getCls("Num").get, Nil)
4746
def strTy(using ctx: BbCtx): Type = ClassLikeType(ctx.getCls("Str").get, Nil)
@@ -77,9 +76,6 @@ class BBTyper(using elState: Elaborator.State, tl: TL):
7776
// in.state.upperBounds ::= out // * Not needed for soundness; complicates inferred types
7877
Wildcard(in, out)
7978

80-
private def allocType(using BbCtx): Type =
81-
BbCtx.allocTy
82-
8379
private def error(msg: Ls[Message -> Opt[Loc]])(using BbCtx) =
8480
raise(ErrorReport(msg))
8581
Bot // TODO: error type?
@@ -100,10 +96,7 @@ class BBTyper(using elState: Elaborator.State, tl: TL):
10096
case N => ctx.get(sym) match
10197
case Some(ty) => ty
10298
case _ =>
103-
if sym.nme === "Alloc" then
104-
allocType
105-
else
106-
error(msg"Variable not found: ${sym.nme}" -> ty.toLoc :: Nil)
99+
error(msg"Variable not found: ${sym.nme}" -> ty.toLoc :: Nil)
107100
case FunTy(Term.Tup(params), ret, eff) =>
108101
PolyFunType(params.map {
109102
case Fld(_, p, _) => typeAndSubstType(p, !pol)
@@ -517,7 +510,7 @@ class BBTyper(using elState: Elaborator.State, tl: TL):
517510
val (res, eff) = typeCheck(body)
518511
val tv = freshVar(N)(using ctx)
519512
constrain(eff, tv | sk)
520-
(extrude(res)(using ctx, true), tv | allocType)
513+
(extrude(res)(using ctx, true), tv)
521514
case Term.RegRef(reg, value) =>
522515
val (regTy, regEff) = typeCheck(reg)
523516
val (valTy, valEff) = typeCheck(value)
@@ -551,5 +544,5 @@ class BBTyper(using elState: Elaborator.State, tl: TL):
551544
def typePurely(t: Term)(using BbCtx): GeneralType =
552545
val (ty, eff) = typeCheck(t)
553546
given CCtx = CCtx.init(t, N)
554-
constrain(eff, allocType)
547+
constrain(eff, Bot)
555548
ty

hkmc2/shared/src/main/scala/hkmc2/semantics/Elaborator.scala

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,6 @@ class Elaborator(val tl: TraceLogger, val wd: os.Path)
133133
extends Importer:
134134
import tl.*
135135

136-
// * Ref allocation skolem UID, preserved
137-
private val allocSkolemSym = VarSymbol(Ident("Alloc"))
138-
private val allocSkolemDef = TyParam(FldFlags.empty, N, allocSkolemSym)
139-
allocSkolemSym.decl = S(allocSkolemDef)
140-
141136
def mkLetBinding(sym: LocalSymbol, rhs: Term): Ls[Statement] =
142137
LetDecl(sym) :: DefineVar(sym, rhs) :: Nil
143138

@@ -220,7 +215,6 @@ extends Importer:
220215
case N =>
221216
raise(ErrorReport(msg"Cannot use 'this' outside of an object scope." -> tree.toLoc :: Nil))
222217
Term.Error
223-
case id @ Ident("Alloc") => Term.Ref(allocSkolemSym)(id, 1)
224218
case id @ Ident(name) =>
225219
ctx.get(name) match
226220
case S(sym) => sym.ref(id)

hkmc2/shared/src/test/mlscript/bbml/bbBorrowing.mls

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fun next: [A, Br] -> Iter[A, Br] ->{Br} A
3737
letreg(r => r)
3838
//│ Type: Reg[?, E23_1]
3939
//│ Where:
40-
//│ E23_1 <: Alloc
40+
//│ E23_1 <:
4141

4242
letreg of r =>
4343
let b = mkVec(r)
@@ -49,7 +49,7 @@ letreg of r =>
4949
r
5050
//│ Type: Reg[?, E28_1]
5151
//│ Where:
52-
//│ E28_1 <: Alloc
52+
//│ E28_1 <:
5353

5454

5555
// * Non-lexical borrowing pattern encoded with a thunk
@@ -89,11 +89,11 @@ letreg of r =>
8989
//│ ║ ^^^^^^^^^^^^^^^^^^
9090
//│ ║ l.74: k()
9191
//│ ║ ^^^^^
92-
//│ ╟── because: cannot constrain E73_1 <: Alloc
93-
//│ ╟── because: cannot constrain E73_1 <: ¬(~{Alloc})
94-
//│ ╟── because: cannot constrain ¬⊥ ∧ ¬Rg96_1 <: ¬(~{Alloc})
95-
//│ ╟── because: cannot constrain ~{Alloc} <: Rg96_1
96-
//│ ╙── because: cannot constrain ~{Alloc} <: ¬()
92+
//│ ╟── because: cannot constrain E73_1 <:
93+
//│ ╟── because: cannot constrain E73_1 <: ¬()
94+
//│ ╟── because: cannot constrain ¬⊥ ∧ ¬Rg96_1 <: ¬()
95+
//│ ╟── because: cannot constrain <: Rg96_1
96+
//│ ╙── because: cannot constrain <: ¬()
9797
//│ Type: ⊥
9898

9999
:e
@@ -125,15 +125,15 @@ letreg of r =>
125125
//│ ║ ^^^^^^^^^^
126126
//│ ║ l.108: r
127127
//│ ║ ^^^
128-
//│ ╟── because: cannot constrain E97_1 <: Alloc
129-
//│ ╟── because: cannot constrain E97_1 <: ¬(~{Alloc})
130-
//│ ╟── because: cannot constrain ¬⊥ ∧ Rg117_1 <: ¬(~{Alloc})
131-
//│ ╟── because: cannot constrain Rg117_1 <: ¬(~{Alloc})
132-
//│ ╙── because: cannot constrain <: ¬(~{Alloc})
128+
//│ ╟── because: cannot constrain E97_1 <:
129+
//│ ╟── because: cannot constrain E97_1 <: ¬()
130+
//│ ╟── because: cannot constrain ¬⊥ ∧ Rg117_1 <: ¬()
131+
//│ ╟── because: cannot constrain Rg117_1 <: ¬()
132+
//│ ╙── because: cannot constrain <: ¬()
133133
//│ Type: Reg[?, E97_1]
134134
//│ Where:
135135
//│ ⊤ <: E97_1
136-
//│ E97_1 <: Alloc
136+
//│ E97_1 <:
137137

138138

139139
letreg of r =>
@@ -144,7 +144,7 @@ letreg of r =>
144144
r
145145
//│ Type: Reg[?, E123_1]
146146
//│ Where:
147-
//│ E123_1 <: Alloc
147+
//│ E123_1 <:
148148

149149
:e
150150
letreg of r =>
@@ -169,15 +169,15 @@ letreg of r =>
169169
//│ ║ ^^^^^^^^
170170
//│ ║ l.156: r
171171
//│ ║ ^^^
172-
//│ ╟── because: cannot constrain E137_1 <: Alloc
173-
//│ ╟── because: cannot constrain E137_1 <: ¬(~{Alloc})
174-
//│ ╟── because: cannot constrain ¬⊥ ∧ Rg149_1 <: ¬(~{Alloc})
175-
//│ ╟── because: cannot constrain Rg149_1 <: ¬(~{Alloc})
176-
//│ ╙── because: cannot constrain <: ¬(~{Alloc})
172+
//│ ╟── because: cannot constrain E137_1 <:
173+
//│ ╟── because: cannot constrain E137_1 <: ¬()
174+
//│ ╟── because: cannot constrain ¬⊥ ∧ Rg149_1 <: ¬()
175+
//│ ╟── because: cannot constrain Rg149_1 <: ¬()
176+
//│ ╙── because: cannot constrain <: ¬()
177177
//│ Type: Reg[?, E137_1]
178178
//│ Where:
179179
//│ ⊤ <: E137_1
180-
//│ E137_1 <: Alloc
180+
//│ E137_1 <:
181181

182182
letreg of r0 =>
183183
letreg of r1 =>
@@ -188,7 +188,7 @@ letreg of r0 =>
188188
r1
189189
//│ Type: Reg[?, in E174_1]
190190
//│ Where:
191-
//│ E174_1 <: Alloc
191+
//│ E174_1 <:
192192

193193

194194
// * Can leak the iterator

hkmc2/shared/src/test/mlscript/bbml/bbBorrowing2.mls

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ letreg of r =>
4646
//│ ║ ^^^^^^^^^^^
4747
//│ ║ l.35: write(r)
4848
//│ ║ ^^^^^^^^^^
49-
//│ ╟── because: cannot constrain E29_1 <: Alloc
50-
//│ ╟── because: cannot constrain E29_1 <: ¬(~{Alloc})
51-
//│ ╟── because: cannot constrain ¬⊥ ∧ Rg41_1 <: ¬(~{Alloc})
52-
//│ ╟── because: cannot constrain Rg41_1 <: ¬(~{Alloc})
53-
//│ ╙── because: cannot constrain <: ¬(~{Alloc})
49+
//│ ╟── because: cannot constrain E29_1 <:
50+
//│ ╟── because: cannot constrain E29_1 <: ¬()
51+
//│ ╟── because: cannot constrain ¬⊥ ∧ Rg41_1 <: ¬()
52+
//│ ╟── because: cannot constrain Rg41_1 <: ¬()
53+
//│ ╙── because: cannot constrain <: ¬()
5454
//│ Type: Int
5555

5656

hkmc2/shared/src/test/mlscript/bbml/bbLetRegEncoding.mls

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ letreg(r => r).ref 1
3030
//│ ╔══[ERROR] Type error in block
3131
//│ ║ l.16: letreg(r => r).ref 1
3232
//│ ║ ^^^^^^^^^^^^^^^^^^^^
33-
//│ ╟── because: cannot constrain α15_1 ∨ E10_1 <: Alloc
34-
//│ ╟── because: cannot constrain α15_1 <: ¬(~{Alloc})
35-
//│ ╟── because: cannot constrain R14_1 <: ¬(~{Alloc})
36-
//│ ╟── because: cannot constrain R14_1 <: ¬(~{Alloc})
37-
//│ ╙── because: cannot constrain <: ¬(~{Alloc})
33+
//│ ╟── because: cannot constrain α15_1 ∨ E10_1 <:
34+
//│ ╟── because: cannot constrain α15_1 <: ¬()
35+
//│ ╟── because: cannot constrain R14_1 <: ¬()
36+
//│ ╟── because: cannot constrain R14_1 <: ¬()
37+
//│ ╙── because: cannot constrain <: ¬()
3838
//│ Type: Ref[Int, ?]
3939

4040
letreg(r => r.ref 1)
@@ -48,13 +48,13 @@ letreg(r => !(r.ref 1))
4848
//│ ╔══[ERROR] Type error in block
4949
//│ ║ l.47: !letreg(r => r.ref 1)
5050
//│ ║ ^^^^^^^^^^^^^^^^^^^^
51-
//│ ╟── because: cannot constrain α34_1 ∨ E28_1 <: Alloc
52-
//│ ╟── because: cannot constrain α34_1 <: ¬(~{Alloc})
53-
//│ ╟── because: cannot constrain α32_1 <: ¬(~{Alloc})
54-
//│ ╟── because: cannot constrain α32_1 <: ¬(~{Alloc})
55-
//│ ╟── because: cannot constrain ¬⊥ ∧ R33_1 <: ¬(~{Alloc})
56-
//│ ╟── because: cannot constrain R33_1 <: ¬(~{Alloc})
57-
//│ ╙── because: cannot constrain <: ¬(~{Alloc})
51+
//│ ╟── because: cannot constrain α34_1 ∨ E28_1 <:
52+
//│ ╟── because: cannot constrain α34_1 <: ¬()
53+
//│ ╟── because: cannot constrain α32_1 <: ¬()
54+
//│ ╟── because: cannot constrain α32_1 <: ¬()
55+
//│ ╟── because: cannot constrain ¬⊥ ∧ R33_1 <: ¬()
56+
//│ ╟── because: cannot constrain R33_1 <: ¬()
57+
//│ ╙── because: cannot constrain <: ¬()
5858
//│ Type: Int
5959

6060
letreg of r =>
@@ -74,13 +74,13 @@ letreg(r => arg => r.ref arg)(0)
7474
//│ ╔══[ERROR] Type error in block
7575
//│ ║ l.73: letreg(r => arg => r.ref arg)(0)
7676
//│ ║ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
77-
//│ ╟── because: cannot constrain α63_1 ∨ E54_1 <: Alloc
78-
//│ ╟── because: cannot constrain α63_1 <: ¬(~{Alloc})
79-
//│ ╟── because: cannot constrain α61_1 <: ¬(~{Alloc})
80-
//│ ╟── because: cannot constrain α61_1 <: ¬(~{Alloc})
81-
//│ ╟── because: cannot constrain ¬⊥ ∧ R62_1 <: ¬(~{Alloc})
82-
//│ ╟── because: cannot constrain R62_1 <: ¬(~{Alloc})
83-
//│ ╙── because: cannot constrain <: ¬(~{Alloc})
77+
//│ ╟── because: cannot constrain α63_1 ∨ E54_1 <:
78+
//│ ╟── because: cannot constrain α63_1 <: ¬()
79+
//│ ╟── because: cannot constrain α61_1 <: ¬()
80+
//│ ╟── because: cannot constrain α61_1 <: ¬()
81+
//│ ╟── because: cannot constrain ¬⊥ ∧ R62_1 <: ¬()
82+
//│ ╟── because: cannot constrain R62_1 <: ¬()
83+
//│ ╙── because: cannot constrain <: ¬()
8484
//│ Type: Ref[arg59_1, ?]
8585
//│ Where:
8686
//│ Int <: arg59_1

hkmc2/shared/src/test/mlscript/bbml/bbList.mls

Lines changed: 30 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ fun map: [A, B, E] -> List[out A] -> (A ->{E} B) ->{E} List[out B]
1111

1212

1313
// * Dummy implementation
14-
fun mapi: [A, E] -> List[out A] -> ((Int, A) ->{E} A) ->{Alloc | E} List[out A]
14+
fun mapi: [A, E] -> List[out A] -> ((Int, A) ->{E} A) ->{E} List[out A]
1515
fun mapi = s => f =>
1616
region r in
1717
map(s) of x => f(0, x)
1818
//│ Type: ⊤
1919

20-
fun mapi: [A, E] -> List[out A] -> ((Int, A) ->{E} A) ->{Alloc | E} List[out A]
20+
fun mapi: [A, E] -> List[out A] -> ((Int, A) ->{E} A) ->{E} List[out A]
2121
fun mapi = s => f =>
2222
region r in
2323
let i = r.ref 0
@@ -43,14 +43,14 @@ region r in
4343
// * Should be an error. This definition would not be referentially transparent.
4444
// * The error message needs improvement, though.
4545
:e
46-
fun mapi: [A, E] -> List[out A] -> ((Int, A) ->{E} A) ->{Alloc | E} List[out A]
46+
fun mapi: [A, E] -> List[out A] -> ((Int, A) ->{E} A) ->{E} List[out A]
4747
fun mapi = s =>
4848
region r in
4949
let i = r.ref 0
5050
f => map(s) of x =>
5151
i := !i + 1
5252
f(!i, x)
53-
//│ ╔══[ERROR] Type error in region expression with expected type ((Int, <A>55_2) ->{<E>56_2} <A>55_2) ->{Alloc ∨ <E>56_2} List[out <A>55_2]
53+
//│ ╔══[ERROR] Type error in region expression with expected type ((Int, <A>54_2) ->{<E>55_2} <A>54_2) ->{<E>55_2} List[out <A>54_2]
5454
//│ ║ l.49: let i = r.ref 0
5555
//│ ║ ^^^^^^^
5656
//│ ║ l.50: f => map(s) of x =>
@@ -59,15 +59,15 @@ fun mapi = s =>
5959
//│ ║ ^^^^^^^^^^^^^^^^^
6060
//│ ║ l.52: f(!i, x)
6161
//│ ║ ^^^^^^^^^^^^^^
62-
//│ ╟── because: cannot constrain f71_2 ->{E79_2} List[out B78_2] <: ((Int, <A>55_2) ->{<E>56_2} <A>55_2) ->{Alloc ∨ <E>56_2} List[out <A>55_2]
63-
//│ ╟── because: cannot constrain D( E79_2 ) <: Alloc ∨ <E>56_2
64-
//│ ╟── because: cannot constrain E79_2 <: ¬(~{Alloc} && ~<E>56_2)
65-
//│ ╟── because: cannot constrain ¬⊥ ∧ α80_2 <: ¬(~{Alloc} && ~<E>56_2)
66-
//│ ╟── because: cannot constrain α80_2 <: ¬(~{Alloc} && ~<E>56_2)
67-
//│ ╟── because: cannot constrain ¬⊥ ∧ r81_2 <: ¬(~{Alloc} && ~<E>56_2)
68-
//│ ╟── because: cannot constrain r81_2 <: ¬(~{Alloc} && ~<E>56_2)
69-
//│ ╙── because: cannot constrain <: ¬(~{Alloc} && ~<E>56_2)
70-
//│ ╔══[ERROR] Type error in region expression with expected type ((Int, <A>55_2) ->{<E>56_2} <A>55_2) ->{Alloc ∨ <E>56_2} List[out <A>55_2]
62+
//│ ╟── because: cannot constrain f70_2 ->{E78_2} List[out B77_2] <: ((Int, <A>54_2) ->{<E>55_2} <A>54_2) ->{<E>55_2} List[out <A>54_2]
63+
//│ ╟── because: cannot constrain D( E78_2 ) <: <E>55_2
64+
//│ ╟── because: cannot constrain E78_2 <: ¬(~<E>55_2)
65+
//│ ╟── because: cannot constrain ¬⊥ ∧ α79_2 <: ¬(~<E>55_2)
66+
//│ ╟── because: cannot constrain α79_2 <: ¬(~<E>55_2)
67+
//│ ╟── because: cannot constrain ¬⊥ ∧ r80_2 <: ¬(~<E>55_2)
68+
//│ ╟── because: cannot constrain r80_2 <: ¬(~<E>55_2)
69+
//│ ╙── because: cannot constrain <: ¬(~<E>55_2)
70+
//│ ╔══[ERROR] Type error in region expression with expected type ((Int, <A>54_2) ->{<E>55_2} <A>54_2) ->{<E>55_2} List[out <A>54_2]
7171
//│ ║ l.49: let i = r.ref 0
7272
//│ ║ ^^^^^^^
7373
//│ ║ l.50: f => map(s) of x =>
@@ -76,15 +76,15 @@ fun mapi = s =>
7676
//│ ║ ^^^^^^^^^^^^^^^^^
7777
//│ ║ l.52: f(!i, x)
7878
//│ ║ ^^^^^^^^^^^^^^
79-
//│ ╟── because: cannot constrain f71_2 ->{E79_2} List[out B78_2] <: ((Int, <A>55_2) ->{<E>56_2} <A>55_2) ->{Alloc ∨ <E>56_2} List[out <A>55_2]
80-
//│ ╟── because: cannot constrain D( E79_2 ) <: Alloc ∨ <E>56_2
81-
//│ ╟── because: cannot constrain E79_2 <: ¬(~{Alloc} && ~<E>56_2)
82-
//│ ╟── because: cannot constrain ¬⊥ ∧ α80_2 <: ¬(~{Alloc} && ~<E>56_2)
83-
//│ ╟── because: cannot constrain α80_2 <: ¬(~{Alloc} && ~<E>56_2)
84-
//│ ╟── because: cannot constrain ¬⊥ ∧ r81_2 <: ¬(~{Alloc} && ~<E>56_2)
85-
//│ ╟── because: cannot constrain r81_2 <: ¬(~{Alloc} && ~<E>56_2)
86-
//│ ╙── because: cannot constrain <: ¬(~{Alloc} && ~<E>56_2)
87-
//│ ╔══[ERROR] Type error in region expression with expected type ((Int, <A>55_2) ->{<E>56_2} <A>55_2) ->{Alloc ∨ <E>56_2} List[out <A>55_2]
79+
//│ ╟── because: cannot constrain f70_2 ->{E78_2} List[out B77_2] <: ((Int, <A>54_2) ->{<E>55_2} <A>54_2) ->{<E>55_2} List[out <A>54_2]
80+
//│ ╟── because: cannot constrain D( E78_2 ) <: <E>55_2
81+
//│ ╟── because: cannot constrain E78_2 <: ¬(~<E>55_2)
82+
//│ ╟── because: cannot constrain ¬⊥ ∧ α79_2 <: ¬(~<E>55_2)
83+
//│ ╟── because: cannot constrain α79_2 <: ¬(~<E>55_2)
84+
//│ ╟── because: cannot constrain ¬⊥ ∧ r80_2 <: ¬(~<E>55_2)
85+
//│ ╟── because: cannot constrain r80_2 <: ¬(~<E>55_2)
86+
//│ ╙── because: cannot constrain <: ¬(~<E>55_2)
87+
//│ ╔══[ERROR] Type error in region expression with expected type ((Int, <A>54_2) ->{<E>55_2} <A>54_2) ->{<E>55_2} List[out <A>54_2]
8888
//│ ║ l.49: let i = r.ref 0
8989
//│ ║ ^^^^^^^
9090
//│ ║ l.50: f => map(s) of x =>
@@ -93,28 +93,14 @@ fun mapi = s =>
9393
//│ ║ ^^^^^^^^^^^^^^^^^
9494
//│ ║ l.52: f(!i, x)
9595
//│ ║ ^^^^^^^^^^^^^^
96-
//│ ╟── because: cannot constrain f71_2 ->{E79_2} List[out B78_2] <: ((Int, <A>55_2) ->{<E>56_2} <A>55_2) ->{Alloc ∨ <E>56_2} List[out <A>55_2]
97-
//│ ╟── because: cannot constrain D( E79_2 ) <: Alloc ∨ <E>56_2
98-
//│ ╟── because: cannot constrain E79_2 <: ¬(~{Alloc} && ~<E>56_2)
99-
//│ ╟── because: cannot constrain ¬⊥ ∧ α80_2 <: ¬(~{Alloc} && ~<E>56_2)
100-
//│ ╟── because: cannot constrain α80_2 <: ¬(~{Alloc} && ~<E>56_2)
101-
//│ ╟── because: cannot constrain ¬⊥ ∧ r81_2 <: ¬(~{Alloc} && ~<E>56_2)
102-
//│ ╟── because: cannot constrain r81_2 <: ¬(~{Alloc} && ~<E>56_2)
103-
//│ ╙── because: cannot constrain <: ¬(~{Alloc} && ~<E>56_2)
104-
//│ ╔══[ERROR] Type error in function literal with expected type (List[out <A>55_2]) ->{⊥} ((Int, <A>55_2) ->{<E>56_2} <A>55_2) ->{Alloc ∨ <E>56_2} List[out <A>55_2]
105-
//│ ║ l.47: fun mapi = s =>
106-
//│ ║ ^^^^
107-
//│ ║ l.48: region r in
108-
//│ ║ ^^^^^^^^^^^^^
109-
//│ ║ l.49: let i = r.ref 0
110-
//│ ║ ^^^^^^^^^^^^^^^^^^^
111-
//│ ║ l.50: f => map(s) of x =>
112-
//│ ║ ^^^^^^^^^^^^^^^^^^^^^^^
113-
//│ ║ l.51: i := !i + 1
114-
//│ ║ ^^^^^^^^^^^^^^^^^
115-
//│ ║ l.52: f(!i, x)
116-
//│ ║ ^^^^^^^^^^^^^^
117-
//│ ╙── because: cannot constrain α70_2 ∨ Alloc <: ⊥
96+
//│ ╟── because: cannot constrain f70_2 ->{E78_2} List[out B77_2] <: ((Int, <A>54_2) ->{<E>55_2} <A>54_2) ->{<E>55_2} List[out <A>54_2]
97+
//│ ╟── because: cannot constrain D( E78_2 ) <: <E>55_2
98+
//│ ╟── because: cannot constrain E78_2 <: ¬(~<E>55_2)
99+
//│ ╟── because: cannot constrain ¬⊥ ∧ α79_2 <: ¬(~<E>55_2)
100+
//│ ╟── because: cannot constrain α79_2 <: ¬(~<E>55_2)
101+
//│ ╟── because: cannot constrain ¬⊥ ∧ r80_2 <: ¬(~<E>55_2)
102+
//│ ╟── because: cannot constrain r80_2 <: ¬(~<E>55_2)
103+
//│ ╙── because: cannot constrain <: ¬(~<E>55_2)
118104
//│ Type: ⊤
119105

120106

hkmc2/shared/src/test/mlscript/bbml/bbPrelude.mls

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// :bbml
22

3-
class Alloc
4-
53
class CodeBase[T, C, S]
64
class Region[T]
75
class Ref[T, S]

0 commit comments

Comments
 (0)