Derived Functor instance for void types

15 Jan
2017
15 Jan
'17
2:37 p.m.
Currently, if you write data V a deriving Functor GHC generates fmap _ _ = error "Void fmap" This seems quite unfortunate, because it loses potentially useful error information: fmap (+ 3) (error "Too many snozzcumbers!") throws "Void fmap", rather than the much more precise "Too many snozzcumbers!" I've opened Trac #13117 to fix this, but I figured I should double check that no one is opposed. David Feuer
3047
Age (days ago)
3047
Last active (days ago)
0 comments
1 participants
participants (1)
-
David Feuer