Newtype wrappers

Johan Tibell johan.tibell at gmail.com
Mon Jan 14 23:55:31 CET 2013


On Mon, Jan 14, 2013 at 2:33 PM, Roman Cheplyaka <roma at ro-che.info> wrote:
> * Johan Tibell <johan.tibell at gmail.com> [2013-01-14 14:29:57-0800]
>> Let me rephrase: how will Simon's proposed "data constructors are in
>> scope" mechanism work? For example, will
>>
>>     let xs :: Map = ...
>>     in map MyNewtype xs
>>
>> behave differently if the constructors of Map are in scope or not?
>
> Coercion is never implicit. In Simon's original proposal, for example,
> you need to define coercion functions using a special syntax.
>
> So this code will always work in the same, traditional way.

I'm completely lost. What is Simon's proposal?



More information about the Glasgow-haskell-users mailing list