hazelgrove / hazel

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

Fixpoints in SynFun position create static errors #1299

Open Negabinary opened 2 months ago

Negabinary commented 2 months ago

e.g. (fix f -> fun x -> x + 1)(3) on https://[hazel](https://hazel.org/build/remove-dhexp/).org/build/remove-dhexp/ branch. Gives "Expected a Constructor".

image

disconcision commented 2 months ago

Reminder for myself that I have notes in mine and matt's slack message history regarding this. There are some non-trivial design considerations to address in fixing this properly

disconcision commented 2 months ago

@Negabinary re: this: talked about this with cyrus a bit. some of me questionable design decisions notwithstanding we can patch this ftm with a custom mode logic for Fix that turns SynFun into Fun. in retrospect this is pretty much what all the functions in Mode are doing already