[Haskell-cafe] data constructor names
Tobias Dammers
tdammers at gmail.com
Sat Jun 22 22:00:00 CEST 2013
On Sat, Jun 22, 2013 at 12:15:07PM +0100, Tom Ellis wrote:
> On Sat, Jun 22, 2013 at 04:26:14AM -0500, Brian Lewis wrote:
> > Say you write
> > data Callback = Error ... | ...
> [...]
> >
> > Then, later, you write
> > data Error = ...
> [...]
> >
> > They're both good names, but there's a conflict.
>
> What do you mean by a conflict? That's fine as far as the compiler is
> concerned because constructors live in a different namespace from types.
>
I think he meant something like:
data Callback = Error Error | Success
data Error = Error String
...in which case there is a clash for the identifier "Error" at the
value level.
More information about the Haskell-Cafe
mailing list