kztk-m / flippre

Imported from Bitbucket for its sunsetting support of Mercurial.
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Instance resolution for `letr` seems looping #3

Closed kztk-m closed 1 week ago

kztk-m commented 1 week ago
pprMode (flippr $ do { ppr <- Defs.letr1 $ \p -> pure ((arg $ \x -> case_ x [ $(un 'True) $ text "True", $(un 'False) $ text "False" ]), p); pure ppr }) False

terminates while

pprMode (flippr $ do { ppr <- Defs.letr $ \p -> pure ((arg $ \x -> case_ x [ $(un 'True) $ text "True", $(un 'False) $ text "False" ]), p); pure ppr }) False

runs forever. This suggests there is a loop in instance resolution.

kztk-m commented 1 week ago

The following line changed in 430c3df9cff8fc95d04fa1be89dae84bcf4a5af7 seems problematic. https://github.com/kztk-m/flippre/blob/430c3df9cff8fc95d04fa1be89dae84bcf4a5af7/src/Text/FliPpr/Internal/Type.hs#L420C1-L420C23