[Haskell-cafe] Question about data

Jason Dagit dagitj at gmail.com
Fri Aug 19 22:58:00 CEST 2011

On Fri, Aug 19, 2011 at 1:45 PM, Thomas DuBuisson
<thomas.dubuisson at gmail.com> wrote:
> This is not a valid data declaration.  You can't have a "Float" field
> without any constructor name and have it still of type

And the reason why it accepts 'data MathExpr = Float', is because data
constructors and types live in separate namespaces.  There is already
a type called Float in the Prelude, but there is no 'Float' data

(Just pointing this out in case it's not obvious!)


More information about the Haskell-Cafe mailing list