Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type Hole Inference (post merge) #1155

Draft
wants to merge 141 commits into
base: dev
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
08ac8a8
update Typ.re to reflect new provenances and matched patterns with co…
RaefM Oct 30, 2022
a87c395
got new notion of matched functions and provenances compiling
RaefM Nov 1, 2022
ec96408
wip; ammend later
RaefM Dec 26, 2022
8c7a0d6
merge with recent changes from haz3l-tests and improved casts
RaefM Dec 26, 2022
e5b4b7a
fix remaining compiler errors after merge
RaefM Dec 26, 2022
09ddeea
adds constraints to Typ.re; doesn't compile yet
RaefM Dec 29, 2022
c4488cd
adds constraint generation to static type checking
RaefM Dec 31, 2022
5ad3ee9
adds all the inference modules; unlinked to UI or log in this commit
RaefM Dec 31, 2022
431c20f
links inference to UI. currently untested. changes existing code in M…
RaefM Jan 3, 2023
94669dd
makes annotation maps mutable. merges mk_map and mk_annotations
RaefM Jan 15, 2023
7dd160d
makes annotations be accumulated in a single source
RaefM Jan 15, 2023
be649cb
fix unsolved annotations bug. adds toggle for turning annotations on …
RaefM Jan 18, 2023
c48b065
adjusts coloring of annotations. removes empty hole svg when annotati…
RaefM Jan 18, 2023
d75fb75
fix bug with things solved as unknown retaining their annotations fro…
RaefM Jan 19, 2023
fece0e9
fix occurs stack overflowing. clear annotations on slide clear
RaefM Jan 25, 2023
e298ce1
moves unsolved annotations to the cursorinspector; replaces code anno…
RaefM Jan 25, 2023
2927ce5
quick fix to compiler error
RaefM Jan 25, 2023
55f3631
quick change to unsolved printing to make it neater
RaefM Jan 26, 2023
b03f2c8
fixed issue where cursor is misdrawn after hole suggestions change
anandrav Jan 26, 2023
ead7b45
fix printing of annotations types to be consistent; fix annotation co…
RaefM Jan 26, 2023
bdb43df
comments for our roadmap for non global inf maps
RaefM Jan 29, 2023
0f9aa93
create annotations in Editor.new_state
anandrav Jan 29, 2023
a2fe31b
removed global annotation_map from Measured, still present in Code.of…
anandrav Jan 29, 2023
493febf
removed global annotation_map from Code.of_grout
anandrav Jan 29, 2023
4c78da2
removed globals from svg_display_settings() (makes grout red)
anandrav Jan 29, 2023
b61229f
no longer using var accumulated_annotations, still using annotations_…
anandrav Jan 29, 2023
1e305f4
fix bug where type annotations don't show when editor first loaded
anandrav Jan 31, 2023
aa9e622
removed type annotations from editor.state.meta
anandrav Jan 31, 2023
677cf8d
remove annotations_enabled global var and refactor names of types
RaefM Feb 2, 2023
2a37937
add accept suggestions on clicking enter when to the right of a solve…
RaefM Feb 2, 2023
a2e767d
small fix related to hole molds
RaefM Feb 3, 2023
9fd5630
remove prov specific typing in annotations (makes acceptance suggesti…
RaefM Feb 9, 2023
715d5cd
merge in dev
RaefM Feb 9, 2023
a4a1f68
add documentation (housed in rei files where possible) and did some c…
RaefM Feb 9, 2023
0d47347
merge more recent dev changes
RaefM Feb 9, 2023
24a96d9
updated UI
anandrav Feb 28, 2023
ea15b86
dotted line around unsolved type hole
anandrav Feb 28, 2023
e2645a1
removed ? from CI and added ! to unsolved hole in editor
anandrav Mar 1, 2023
7d5925a
renames eqclasses to potential type sets
RaefM Mar 1, 2023
981f15a
merge dev
RaefM Mar 19, 2023
afd91e8
fill type hole is atomic action
anandrav Mar 23, 2023
444490b
hole filling on click (not hover yet)
anandrav Mar 24, 2023
0c8f678
makes the buttons for cursorinspector suggestions hoverable to see re…
RaefM Mar 24, 2023
5f81e86
made buttons brighter on hover
RaefM Mar 24, 2023
14cb043
refactor and combine certain functions
RaefM Apr 8, 2023
b4dbdf7
wip
RaefM Apr 8, 2023
c471ad6
refactor inference results code to be more consistent
RaefM May 12, 2023
db487be
CI hexagons looking good- grout suggestions being funky with lines an…
RaefM May 22, 2023
3e32023
Merge branch 'dev' of https://github.com/hazelgrove/hazel into haz3l-…
RaefM May 22, 2023
86ac43f
fixes issues with svg in suggestions but introduces new issue with th…
RaefM Jun 12, 2023
866be93
fix weird positioning issues
RaefM Jun 14, 2023
7e4d53d
makes parenthesization less/un ambiguous (always parenthesizes left c…
RaefM Jun 14, 2023
34fbb14
Merge branch 'dev' of https://github.com/hazelgrove/hazel into haz3l-…
RaefM Jun 14, 2023
c497f61
Fix UI bugs
RaefM Jul 11, 2023
8af2bea
add message to CI on errors
RaefM Jul 12, 2023
64d109e
fix weird hover bug
RaefM Jul 12, 2023
7985faf
add text to consistent suggestions in ci
RaefM Jul 12, 2023
7607246
merged type_provenance cases 'Internal' and 'TypeHole'
anandrav Aug 23, 2023
1afa3ee
rename Anonymous to NoProvenance
anandrav Aug 23, 2023
4119c85
renamed Inference prov case to Matched
anandrav Aug 23, 2023
1db78ad
rewrite pt. 1
anandrav Aug 25, 2023
25f1808
rewrite pt. 2
anandrav Aug 26, 2023
7c431e9
functional again
anandrav Aug 26, 2023
887574b
cleanup
anandrav Aug 26, 2023
e7aee26
must resolve conflicts in Statics and CursorInspector
anandrav Oct 8, 2023
788fd55
attempt to resolve cursorinspector merge errors
disconcision Oct 8, 2023
44a649f
statics still WIP, does not compile
anandrav Oct 8, 2023
1c2f440
resolving remaining merge type errors. starts up fine but UI is utter…
disconcision Oct 10, 2023
3251d22
resolve some css issues; UI now renders okay, but still some issues
disconcision Oct 10, 2023
8afd381
Update Elaborator.re
disconcision Oct 10, 2023
c07e305
add logging
RaefM Nov 15, 2023
6b60d72
setup logging
anandrav Nov 15, 2023
adf926e
consider tuples conflicting if they have different arity
anandrav Nov 15, 2023
30442f0
fixed how unknown types are displayed
anandrav Nov 15, 2023
7484d17
added comments to clarify last change
anandrav Nov 15, 2023
a8bf67f
occurs check
anandrav Nov 15, 2023
3179e5a
Fix a bunch of todos and missing constraints
RaefM Dec 6, 2023
9a78e94
changed grout width back to 1 for inference suggestions
anandrav Dec 11, 2023
bdacad6
added labels for more clarity
anandrav Dec 11, 2023
6de7a0b
merged dev, probably does not compile.
anandrav Dec 11, 2023
9d17cf2
fixed some compiler errors, more to go...
anandrav Dec 11, 2023
51819c7
Merge branch 'dev' of https://github.com/hazelgrove/hazel into thi-me…
RaefM Dec 19, 2023
6a4bdc9
fix build failures after latest merge
RaefM Dec 19, 2023
3571c92
Fix join constraint threading
RaefM Dec 19, 2023
03facf9
Fix some issues with join_constraints and missing constraints for uex…
RaefM Dec 19, 2023
2b3152b
Review and fix issues in upat_to_info_map
RaefM Dec 19, 2023
ab14eeb
Refactor to use new provenances where synswitch is separated out to e…
RaefM Dec 23, 2023
c0b0820
make debug print string more useful
RaefM Dec 23, 2023
6650633
sub in old inference module
RaefM Dec 23, 2023
26c7fa1
Make things compile after substituting in the old inference algos
RaefM Dec 23, 2023
bf04f1c
debug wip
RaefM Dec 24, 2023
301117e
remove init syn; still broken lines
RaefM Dec 25, 2023
d89198a
Fix UI measured-grout view mismatch issues; Add PatternVar provenance…
RaefM Dec 25, 2023
51336d5
get rid of debug logs
RaefM Dec 25, 2023
4efc804
Add logic to also build out indirect suggestions in global_inference_…
RaefM Dec 26, 2023
115b25f
ADTs seem to work; stack overflowing on the examples page for ADTs th…
RaefM Dec 26, 2023
dcb3d72
fix stack overflow issue
RaefM Dec 28, 2023
4049dfe
Fix issue where solved as type alias and its body type val resulted i…
RaefM Dec 28, 2023
36bc5af
Fix CI hover issues
RaefM Dec 28, 2023
3187947
Add logic to suggest results for unsolved exp holes, but the paste ha…
RaefM Dec 31, 2023
92c5a82
Add directional jump; unsolved exphole suggestions working
RaefM Dec 31, 2023
0e757f8
remove debug logs
RaefM Dec 31, 2023
732fff7
Add suggestions for solved/nested inconsistency exp holes too (easily…
RaefM Dec 31, 2023
1ab2c53
fix issue where annotated patterns were also candidates for annot ins…
RaefM Dec 31, 2023
ba8f2a2
rename NonTypeHoleId to NotSuggestableHoleId
RaefM Dec 31, 2023
d0639da
fix issue of ? being pasted in
RaefM Dec 31, 2023
757b07d
autoformatting
RaefM Dec 31, 2023
19fc24e
fix ADT issue
RaefM Jan 5, 2024
32d0d55
Moved acceptance logic into Tab and out of Enter. Should talk to Andr…
RaefM Jan 6, 2024
4916324
fix text alignment in CI
RaefM Jan 6, 2024
051cb41
fix issue where holes become offset when UpdateAssistant operations o…
RaefM Jan 6, 2024
f529616
make exp hole suggestions only pop up on directly constrained unannot…
RaefM Jan 7, 2024
aa06ada
fix sneaky internals causing not-as-good-as-they-could-be solutions
RaefM Jan 12, 2024
ed8a2bf
Added new update settings_action
RaefM Jan 12, 2024
887c67f
switched all logic over to new toggle in nut bar
RaefM Jan 12, 2024
8114313
fix stray debug change
RaefM Jan 12, 2024
7374be6
cleanup prints and todos
RaefM Jan 13, 2024
95ddccd
fix measurement issue after suggestion accept
RaefM Jan 13, 2024
db7ef98
Add inference_enabled to init to fix issue of weird offset holes on s…
RaefM Jan 13, 2024
c988481
fix stack overflow issue for nested occurs check failures
RaefM Jan 13, 2024
d533620
make occurs check failures have special ci text
RaefM Jan 13, 2024
1247487
fix clunky CI types when parens involved
RaefM Jan 13, 2024
5255070
Fix issue where occurs failures were given solved UI. Fix issue where…
RaefM Jan 14, 2024
c7ddca2
Make all CI unknowns be the hexagon
RaefM Jan 14, 2024
6d9b105
remove debug logs again
RaefM Jan 15, 2024
fe27c3a
hackily disable cons suggestion in patterns
disconcision Jan 15, 2024
12c3f12
Make occurs failures involving type holes show conflicts in CI. Shift…
RaefM Jan 18, 2024
7f60039
Simplify CI text; fix bug where sum was being printed as prod
RaefM Jan 18, 2024
6ce7dc7
Add names when ityps are made into sum types based on position
RaefM Jan 18, 2024
c765aac
Fix stack overflow issue when nullary sum occurs
RaefM Jan 18, 2024
e263e23
fix ambiguous parens on sums in arrows
RaefM Jan 18, 2024
11e6aa6
Hackily disable cons suggestion in patterns (#1162)
cyrus- Jan 18, 2024
76c382e
merge updated nut menu
RaefM Jan 22, 2024
db7f533
Merge branch 'thi-old-engine-with-merge' of https://github.com/hazelg…
RaefM Jan 22, 2024
2f43770
finalize merge conflicts
RaefM Jan 22, 2024
5fad881
make it so if statics turns off, infernce does too
RaefM Jan 22, 2024
14f1e19
Fix empty list type paste bug and solutions
RaefM Feb 26, 2024
dc83c58
Fix issue where type aliases weren't always constrainted to self
RaefM Feb 26, 2024
298a51d
whoops- fix usage of wrong type in prev commit
RaefM Feb 26, 2024
d7f07bf
test - rerun GitHub Action
thomasporter522 Mar 29, 2024
55273cb
added constructor names to internal types
thomasporter522 Apr 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove annotations_enabled global var and refactor names of types
RaefM committed Feb 2, 2023
commit 677cf8dbfe356faacdc421185e13d1d12f54ae9b
7 changes: 5 additions & 2 deletions src/haz3lcore/Measured.re
Original file line number Diff line number Diff line change
@@ -286,7 +286,7 @@ let of_segment =
(
~old: t=empty,
~touched=Touched.empty,
~annotation_map=InferenceResult.empty_annotations(),
~global_inference_info=InferenceResult.empty_info(),
seg: Segment.t,
)
: t => {
@@ -378,7 +378,10 @@ let of_segment =
| Grout(g) =>
let annotation_offset =
switch (
InferenceResult.get_solution_of_id(g.id, annotation_map)
InferenceResult.get_solution_of_id(
g.id,
global_inference_info,
)
) {
| Some(ityp) =>
ityp |> ITyp.ityp_to_typ |> Typ.typ_to_string |> String.length
103 changes: 35 additions & 68 deletions src/haz3lcore/inference/InferenceResult.re
Original file line number Diff line number Diff line change
@@ -6,21 +6,24 @@ type status =

type t = (ITyp.t, status);

type annotation_map = Hashtbl.t(Id.t, status);
type type_hole_to_solution = Hashtbl.t(Id.t, status);

let empty_annotations = (): annotation_map => Hashtbl.create(20);

// let accumulated_annotations = empty_annotations();
type global_inference_info = {
enabled: bool,
solution_statuses: type_hole_to_solution,
};

// TODO this is the other global
let annotations_enabled = ref(true);
let empty_annotations = (): type_hole_to_solution => Hashtbl.create(20);

// remove and put in editor too at some point... not needed then
let update_annoation_mode = annot_mode => {
annotations_enabled := annot_mode;
let mk_global_inference_info = (enabled, annotations) => {
{enabled, solution_statuses: annotations};
};

let get_annotations = (inference_results: list(t)): annotation_map => {
let empty_info = (): global_inference_info =>
mk_global_inference_info(true, empty_annotations());

let get_desired_solutions =
(inference_results: list(t)): type_hole_to_solution => {
let id_and_status_if_type_hole = (result: t): option((Id.t, status)) => {
switch (result) {
| (Unknown(TypeHole(id)), status) => Some((id, status))
@@ -36,52 +39,11 @@ let get_annotations = (inference_results: list(t)): annotation_map => {
new_map;
};

// Used in Code.re
// Used in Measured.re
/**
* Major Dest 1: Measured.of_segment
*
* Dest 1.1: BackpackView
* Solution: Pass down
* Source: Cell.editor_view editor
* Invocations in bt to source:
* - BackpackView.backpack_sel_view
* - BackpackView.view
* - Deco.backpack
* - Deco.all
* - Cell.deco
* - Cell.editor_view
*
* Dest 1.2: LangDoc Module
* Solution: ignore via opargs
*
* Dest 1.3: Editor Modules
* Solution: Make Meta.init take oparg; pass dummy for all init
* May want to pass into Meta.init in cell; to do so, use results of 1.1\
*/
/**
* Major Dest 1: Code.of_grout
*
* Only subdest: Text.of_segment
* This module is only ever invoked from places that have called
* Measured.of_segment (it literally takes its results as a map)
* If it had those results, pass those in! if from langdoc, use dummy
*/
// let get_solution_of_id = (id: Id.t): option(ITyp.t) =>
// if (annotations_enabled^) {
// let* status = Hashtbl.find_opt(accumulated_annotations, id);
// switch (status) {
// | Solved(Unknown(_)) => None
// | Solved(ityp) => Some(ityp)
// | Unsolved(_) => None
// };
// } else {
// None;
// };
let get_solution_of_id =
(id: Id.t, annotation_map: annotation_map): option(ITyp.t) =>
if (annotations_enabled^) {
let* status = Hashtbl.find_opt(annotation_map, id);
(id: Id.t, global_inference_info: global_inference_info): option(ITyp.t) =>
if (global_inference_info.enabled) {
let* status =
Hashtbl.find_opt(global_inference_info.solution_statuses, id);
switch (status) {
| Solved(Unknown(_)) => None
| Solved(ityp) => Some(ityp)
@@ -97,23 +59,28 @@ let get_solution_of_id =
* who should already have access to all of the above
*/
let svg_display_settings =
(~annotation_map: annotation_map, id: Id.t): (bool, bool) => {
switch (Hashtbl.find_opt(annotation_map, id)) {
| Some(status) =>
switch (status) {
| Solved(Unknown(_)) => (true, false)
| Solved(_) => (false, false)
| Unsolved(_) => (true, true)
}
| None => (true, false)
(~global_inference_info: global_inference_info, id: Id.t): (bool, bool) =>
if (global_inference_info.enabled) {
switch (Hashtbl.find_opt(global_inference_info.solution_statuses, id)) {
| Some(status) =>
switch (status) {
| Solved(Unknown(_)) => (true, false)
| Solved(_) => (false, false)
| Unsolved(_) => (true, true)
}
| None => (true, false)
};
} else {
(true, false);
};
};

//Only called from uppermost levels where editors live anyway
let get_cursor_inspect_result =
(~annotation_map: annotation_map, id: Id.t): option((bool, string)) =>
if (annotations_enabled^) {
let* status = Hashtbl.find_opt(annotation_map, id);
(~global_inference_info: global_inference_info, id: Id.t)
: option((bool, string)) =>
if (global_inference_info.enabled) {
let* status =
Hashtbl.find_opt(global_inference_info.solution_statuses, id);
switch (status) {
| Unsolved(eq_class) =>
Some((false, EqClass.string_of_eq_class(eq_class)))
5 changes: 3 additions & 2 deletions src/haz3lcore/statics/Statics.re
Original file line number Diff line number Diff line change
@@ -828,11 +828,12 @@ let mk_map_and_annotations =
uexp_to_info_map(~ctx=Builtins.ctx(Builtins.Pervasives.builtins), e);

let inference_results = Inference.unify_and_report_status(constraints);
let annotation_map = InferenceResult.get_annotations(inference_results);
let global_inference_solutions =
InferenceResult.get_desired_solutions(inference_results);

// InferenceResult.add_on_new_annotations(annotation_map);

(info_map, annotation_map);
(info_map, global_inference_solutions);
},
);
let mk_map = e => {
41 changes: 34 additions & 7 deletions src/haz3lcore/zipper/Editor.re
Original file line number Diff line number Diff line change
@@ -41,17 +41,30 @@ module Meta = {
let t_of_yojson = _ => failwith("Editor.Meta.t_of_yojson");

let next =
(~effects: list(Effect.t)=[], a: Action.t, z: Zipper.t, meta: t): t => {
(
~effects: list(Effect.t)=[],
a: Action.t,
z: Zipper.t,
meta: t,
inference_enabled,
)
: t => {
let {touched, measured, col_target, _} = meta;
let touched = Touched.update(Time.tick(), effects, touched);
let unselected = Zipper.unselect_and_zip(z);
let (term, _) = MakeTerm.go(unselected);
let (_, annotation_map) = Statics.mk_map_and_annotations(term);
// TODO Raef: add in flow for the enabled flag
let (_, global_inference_solutions) =
Statics.mk_map_and_annotations(term);
let measured =
Measured.of_segment(
~touched,
~old=measured,
~annotation_map,
~global_inference_info=
InferenceResult.mk_global_inference_info(
inference_enabled,
global_inference_solutions,
),
unselected,
);
let term_ranges = TermRanges.mk(unselected);
@@ -75,9 +88,16 @@ module State = {

let init = zipper => {zipper, meta: Meta.init(zipper)};

let next = (~effects: list(Effect.t)=[], a: Action.t, z: Zipper.t, state) => {
let next =
(
~effects: list(Effect.t)=[],
a: Action.t,
z: Zipper.t,
state,
inference_enabled,
) => {
zipper: z,
meta: Meta.next(~effects, a, z, state.meta),
meta: Meta.next(~effects, a, z, state.meta, inference_enabled),
};
};

@@ -127,8 +147,15 @@ let update_z_opt = (f: Zipper.t => option(Zipper.t), ed: t) => {
};

let new_state =
(~effects: list(Effect.t)=[], a: Action.t, z: Zipper.t, ed: t): t => {
let state = State.next(~effects, a, z, ed.state);
(
~effects: list(Effect.t)=[],
a: Action.t,
z: Zipper.t,
ed: t,
inference_enabled,
)
: t => {
let state = State.next(~effects, a, z, ed.state, inference_enabled);
let history = History.add(a, ed.state, ed.history);
{state, history, read_only: ed.read_only};
};
5 changes: 3 additions & 2 deletions src/haz3lcore/zipper/action/Perform.re
Original file line number Diff line number Diff line change
@@ -109,7 +109,7 @@ let go_z =
};

let go =
(a: Action.t, ed: Editor.t, id_gen: IdGen.state)
(a: Action.t, ed: Editor.t, id_gen: IdGen.state, inference_enabled)
: Action.Result.t((Editor.t, IdGen.state)) =>
if (ed.read_only && is_write_action(a)) {
Result.Ok((ed, id_gen));
@@ -118,6 +118,7 @@ let go =
let Editor.State.{zipper, meta} = ed.state;
Effect.s_clear();
let+ (z, id_gen) = go_z(~meta, a, zipper, id_gen);
let ed = Editor.new_state(~effects=Effect.s^, a, z, ed);
let ed =
Editor.new_state(~effects=Effect.s^, a, z, ed, inference_enabled);
(ed, id_gen);
};
20 changes: 17 additions & 3 deletions src/haz3lweb/Update.re
Original file line number Diff line number Diff line change
@@ -204,7 +204,9 @@ let perform_action =
(model: Model.t, a: Action.t, _state: State.t, ~schedule_action as _)
: Result.t(Model.t) => {
let (id, ed_init) = Editors.get_editor_and_id(model.editors);
switch (Haz3lcore.Perform.go(a, ed_init, id)) {
switch (
Haz3lcore.Perform.go(a, ed_init, id, model.langDocMessages.annotations)
) {
| Error(err) => Error(FailedToPerform(err))
| Ok((ed, id)) =>
Ok({...model, editors: Editors.put_editor_and_id(id, ed, model.editors)})
@@ -334,7 +336,13 @@ let apply =
| None => Error(CantPaste)
| Some((z, id)) =>
//TODO: add correct action to history (Pick_up is wrong)
let ed = Haz3lcore.Editor.new_state(Pick_up, z, ed);
let ed =
Haz3lcore.Editor.new_state(
Pick_up,
z,
ed,
model.langDocMessages.annotations,
);
Ok({
...model,
editors: Editors.put_editor_and_id(id, ed, model.editors),
@@ -351,7 +359,13 @@ let apply =
| None => Error(CantReset)
| Some((z, id)) =>
//TODO: add correct action to history (Pick_up is wrong)
let editor = Haz3lcore.Editor.new_state(Pick_up, z, ed);
let editor =
Haz3lcore.Editor.new_state(
Pick_up,
z,
ed,
model.langDocMessages.annotations,
);
let editors = Editors.put_editor_and_id(id, editor, model.editors);
Ok({...model, editors});
};
10 changes: 5 additions & 5 deletions src/haz3lweb/view/BackpackView.re
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ open Haz3lcore;

let backpack_sel_view =
(
~annotation_map: InferenceResult.annotation_map,
~global_inference_info: InferenceResult.global_inference_info,
x_off: float,
y_off: float,
scale: float,
@@ -14,7 +14,7 @@ let backpack_sel_view =
module Text =
Code.Text({
let map = Measured.of_segment(content);
let annotation_map = annotation_map;
let global_inference_info = global_inference_info;
let settings = Model.settings_init;
});
// TODO(andrew): Maybe use init sort at caret to prime this
@@ -34,14 +34,14 @@ let backpack_sel_view =
),
]),
// zwsp necessary for containing box to stretch to contain trailing newline
Text.of_segment(~no_sorts=true, ~annotation_map, content)
Text.of_segment(~no_sorts=true, ~global_inference_info, content)
@ [text(Unicode.zwsp)],
);
};

let view =
(
~annotation_map: InferenceResult.annotation_map,
~global_inference_info: InferenceResult.global_inference_info,
~font_metrics: FontMetrics.t,
~origin: Measured.Point.t,
{backpack, _} as z: Zipper.t,
@@ -101,7 +101,7 @@ let view =
let new_y_offset = y_offset -. dy_fn(idx, base_height);
let v =
backpack_sel_view(
~annotation_map,
~global_inference_info,
x_offset,
new_y_offset,
scale,
Loading