My guess is that this has to do with the strange way in which your "Foo" -
like in any record type alias -
*Foo is at the same time a Type as well as constructor*.
So Foo is a type, that you can use in type annotations and signatures, but
also a function with the signature "String -> Foo", taking a String, and
returning a type Foo.
If you want to get another the constructor variant of "Foo", you can do
this:
derp = Foo
If Foo were a strong type, like this:
type Foo = FooConstructor { bar : String }
then you could do
type alias Derp = Foo
and
FooConstructor "bar"
but you could* not* do
type alias Derp = FooConstructor
nor
Foo "bar"
Derp "herp"
Hope this makes some sense..
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.