[Fwd: Re: [Haskell-cafe] Implicit newtype unwrapping]
Sjoerd Visscher
sjoerd at w3future.com
Wed Dec 2 19:40:02 EST 2009
The idea is that there's just enough unwrapping such that you don't need to use getDual and appEndo.
On Dec 3, 2009, at 1:25 AM, Holger Siegel wrote:
> Am Donnerstag, den 03.12.2009, 01:16 +0100 schrieb Martijn van
> Steenbergen:
>> So here's a totally wild idea Sjoerd and I came up with.
>>
>> What if newtypes were unwrapped implicitly?
>>
>> What advantages and disadvantages would it have?
>> In what cases would this lead to ambiguous code?
>
> 1)
> instance Monoid a => Monoid (Dual a)
>
> 2)
> instance Monoid (Endo a)
> instance Monoid b => Monoid (a -> b)
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Sjoerd Visscher
sjoerd at w3future.com
More information about the Haskell-Cafe
mailing list