map - Type check error in Haskell monad chaining -
i'm new haskell , i'm following example on rwh. i'm having problems following programs on chapter 14: import qualified data.map m type personname = string type phonenumber = string type billingaddress = string data mobilecarrier = honest_bobs_phone_network | morrisas_marvelous_mobiles | petes_plutocratic_phones deriving (eq, ord) findcarrierbillingaddress :: personname -> m.map personname phonenumber -> m.map phonenumber mobilecarrier -> m.map mobilecarrier billingaddress -> maybe billingaddress -- work findcarrierbillingaddress person phonemap carriermap addressmap = phone <- m.lookup person phonemap carrier <- m.lookup phone carriermap address <- m.lookup carrier addressmap return address -- not work: findcarrierbillingaddress person phonemap carriermap addressmap = retu...