justinlubin / cobbler

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

Pattern matches are sometimes wrongly eta-reduced in output #67

Open justinlubin opened 6 months ago

justinlubin commented 6 months ago

For example, with the following input:

main : (Int -> Int) -> Maybe (Maybe Int) -> Int
main f mma =
 case mma of
   Nothing -> 0
   Just ma ->
     case ma of
       Nothing -> 1
       Just a -> f a