haxetink / tink_state

Handle those pesky states.
The Unlicense
29 stars 13 forks source link

Try to deal with #46 #53

Closed back2dos closed 3 years ago

back2dos commented 3 years ago

Seems to work fine as indicated by the tests. I'm slightly hesitant to add more implicit casts at this point, but this one seems specific enough.

Also, using GADTs is always fun until it isn't. In this case, postfix switch autocompletion fails:

GADT-vs-IDE

Anyway, if people could confirm that this doesn't blow up everything else for them, I guess we can merge it.

kevinresol commented 3 years ago

The diff looks good in my codebase :+1:

back2dos commented 3 years ago

Well, seems to work fine for me, so let's do this.

nadako commented 3 years ago

Wow this is neat :) I'm also surprised that Haxe handles this pattern matching properly figuring out that there can be no Failed case.