Overlapping and incoherent instances

Felipe Lessa felipe.lessa at gmail.com
Wed Jul 30 01:47:16 UTC 2014


On 29-07-2014 20:41, Stephen Paul Weber wrote:
>> instance {-# OVERLAPPABLE #-} Show a => Show [a] where ...
> 
>> instance {-# OVERLAPPING #-} Show [Char] where ...
> 
> This, to me, is an admission that developers are not going to want to turn 
> overlapping on globally in general, and so the current language extensions 
> would not make sense to get adopted into the core language at any point.  
> I agree with this idea, and so would second the proposal mentioned at 
> <http://www.reddit.com/r/haskell/comments/2c136i/xoverlappinginstances_and_xincoherentinstances_to/cjb4jmr> 
> that a language extension that adds actual keywords to tag instances that 
> should be allowed to overlap be added, instead of resorting to pragmas.  
> This seems like an approach that could be useful in general and one could 
> imagine moving "past" an extension to the core language at some point, 
> potentially.

OTOH, the pragma is mostly harmless for older GHC versions, while the
keyword approach needs a preprocessor.

-- 
Felipe.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20140729/cf5c99c0/attachment.sig>


More information about the Glasgow-haskell-users mailing list