justinlubin / cobbler

Refactor programs to use library functions!
5 stars 0 forks source link

Add fully generic catamorphisms #38

Closed justinlubin closed 1 year ago

justinlubin commented 1 year ago

This pull request vastly generalizes the list_foldr primitive in our core calculus to work with arbitrary datatypes, implementing #29 and enabling future implementation of #3. The most difficult parts of the implementation were updating (beta-)normalization, recursion scheme extraction, and fusion (in increasing difficulty order).