
28 Mar
2013
28 Mar
'13
6:58 p.m.
Hi Jamie,
Ahh. I got confused since (JSObject JSValue) is one of the JSValue types. Where is the JSValue constructor? I saw it in Text.JSON.Types, but even after importing it, I get:
Ups, sorry, the data constructor to get a JSValue from a JSObject is named - well - also JSObject. So it's: getJSObj $ JSObject a There's a data type named JSObject: newtype JSObject e = JSONObject { fromJSObject :: [(String, e)] } deriving (Eq, Ord, Show, Read, Typeable ) And there's a data constructor with the name JSObject for the data type JSValue: data JSValue = ... | JSObject (JSObject JSValue) deriving (Show, Read, Eq, Ord, Typeable) Greetings, Daniel