hazelgrove / hazel

Hazel, a live functional programming environment with typed holes
http://hazel.org/
MIT License
806 stars 52 forks source link

Cursor inspector now uses typ equality as opposed to full structural equality #1418

Open 7h3kk1d opened 1 week ago

7h3kk1d commented 1 week ago

Old version Screenshot from 2024-11-18 14-22-40 New version Screenshot from 2024-11-18 14-23-22

Depends on https://github.com/hazelgrove/hazel/pull/1409 for a notion of ID-unaware equality.

cyrus- commented 1 week ago

what happens with alpha equivalent types (e.g. forall x -> (x, x) and forall a -> (a, a))?

7h3kk1d commented 1 week ago

what happens with alpha equivalent types (e.g. forall x -> (x, x) and forall a -> (a, a))?

@cyrus- According to the docstring it should do alpha equivalence but not normalization. https://github.com/hazelgrove/hazel/blob/dev/src/haz3lcore/statics/TermBase.re#L693

If we don't want it for alpha equivalent types I can introduce a 3rd form of equality that just ignores IDs.

7h3kk1d commented 1 week ago

This may be a bug somewhere else as well though

Screenshot from 2024-11-18 14-44-16