Skip to content

Commit 6520842

Browse files
committed
Fix #2116
- Exp.cls_of_term shows cls of underlying expression if projector - Cursor inspector still shows projector info on left side
1 parent 062397c commit 6520842

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/language/term/Exp.re

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ let rep_id: t => Id.t = IdTagged.rep_id;
7575
let term_of: t => term = IdTagged.term_of;
7676
let unwrap: t => (term, term => t) = IdTagged.unwrap;
7777

78-
let cls_of_term: type a. Grammar.exp_term(a) => cls =
78+
let rec cls_of_term: type a. Grammar.exp_term(a) => cls =
7979
fun
8080
| Invalid(_) => Invalid
8181
| EmptyHole => EmptyHole
@@ -116,7 +116,7 @@ let cls_of_term: type a. Grammar.exp_term(a) => cls =
116116
| Filter(_) => Filter
117117
| Closure(_) => Closure
118118
| Parens(_) => Parens
119-
| Projector(_) => Projector
119+
| Projector(_, e) => cls_of_term(e.term)
120120
| Cons(_) => Cons
121121
| ListConcat(_) => ListConcat
122122
| UnOp(op, _) => UnOp(op)

0 commit comments

Comments
 (0)