summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorRoss Paterson <ross@soi.city.ac.uk>2011-12-19 23:44:33 +0000
committerRoss Paterson <ross@soi.city.ac.uk>2011-12-19 23:44:33 +0000
commit4c8e03075ab8719f3753c1a2e4f05ef21be193ac (patch)
tree1a2a0410f57d08a4607ebc71f646b3225e05f860 /ghc
parent44e18534a9d84572047af2ee417fa5361ff366f0 (diff)
downloadhaskell-4c8e03075ab8719f3753c1a2e4f05ef21be193ac.tar.gz
fix #5022: polymorphic definitions inside arrow rec
This is quite tricky, with examples like this: import Control.Arrow pRepeat :: a -> [a] pRepeat = proc x -> do rec s <- returnA -< f_rec x:s -- f_rec is monomorphic here let f_later y = y -- f_later is polymorphic here _ <- returnA -< (f_later True, f_later 'a') let f_rec y = y -- f_rec is polymorphic here returnA -< f_later s -- f_later is monomorphic here Fixed the typechecking of arrow RecStmt to track changes to the monad version. It was simplest to add a field recS_later_rets corresponding to recS_rec_rets. It's only used for the arrow version, and always empty for the monad version. But I think it would be cleaner to put the rec_ids and later_ids in a single list with supplementary info saying how they're used. Also fixed several glitches in the desugaring of arrow RecStmt. The fact that the monomorphic variables shadow their polymorphic counterparts is a major pain. Also a bit of general cleanup of DsArrows while I was there.
Diffstat (limited to 'ghc')
0 files changed, 0 insertions, 0 deletions