I'm sure this question has been asked many times but I have not been able to find it anywhere. I have written the code below into Lekseh directly from the RWH book. However, I always get the error parse error on input 'getString' and the line number refers to the type declaration for getString. I have no idea what's wrong and would appreciate any suggestions to get past this. Thanks in advance David ---------------------------- module SimpleJSON ( JValue(..), getString, getInt, getDouble, getBool, getObject, getArray, isNull ) where data JValue = JString String | JNumber Double | JBool Bool | JNull | JObject [ (String, JValue) ] | JArray [JValue] deriving (Eq, Ord, Show) getString :: JValue -> Maybe String getString (JString s) = Just s getString _ = Nothing getInt (JNumber n) = Just (truncate n) getInt _ = Nothing getDouble (JNumber n) = Just n getDouble _ = Nothing getBool (JBool b) = Just b getBool _ = Nothing getObject (JObject o) = Just o getObject _ = Nothing getArray (JArray a) = Just a getArray _ = Nothing isNull v = v == JNull -- View this message in context: http://haskell.1045720.n5.nabble.com/I-m-a-beginner-struggling-with-the-Simp... Sent from the Haskell - Haskell mailing list archive at Nabble.com.