Hi,

I'm trying to understand how the Html module works. I see many methods with 
return type Html msg, which is a type alias for Node msg. 

After tracking down the source code and reading into it, I am confused by 
the following line: 

type Node msg = Node

what is the purpose of the above line? 

Furthermore, I don't understand the use of the type parameter msg.

For example I can see that type Property msg = Property

and 

property : String -> Json.Value -> Property msg
property = Native.VirtualDom.property

when looking into the implementation of VirtualDom.property, I see 

function property(key, value)
{
return {
key: key,
value: value
};
}

Does that mean the return value of calling: property "className" 
(Json.string "myClass") is of type Property msg where msg = { key: 
"className", value: "myClass" }?
does the property function actually use a type constructor and return the 
type?

Thanks in advance.


-- 
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.

Reply via email to