diprism / perpl

The PERPL Compiler
MIT License
10 stars 5 forks source link

Zero-constructor datatypes #52

Closed colin-mcd closed 1 year ago

colin-mcd commented 2 years ago

Datatypes with zero constructors are only kinda working right now. So long as optimizations are on, it turns case x of for an x with no constructors into sample fail, but if you turn optimizations off then the FGG rules are messed up.

davidweichiang commented 2 years ago

I think it would be perfectly fine to just not allow zero-constructor datatypes.

davidweichiang commented 2 years ago

Oh, I guess defunctionalization internally can create a zero-constructor datatype (if there are no folds).