[Haskell-cafe] Re: Different return type?

2009-01-19 Thread Jon Fairbairn
John Ky newho...@gmail.com writes: Hi, Possibly a silly question but is it possible to have a function that has a different return type based on it's first argument? Are you sure that's what you really want? For instance data Person = Person { name :: String, ... } data Business =

[Haskell-cafe] Re: Different return type?

2009-01-19 Thread Chung-chieh Shan
John Ky newho...@gmail.com wrote in article bd4fcb030901181744i2b26172bv2328974ff911f...@mail.gmail.com in gmane.comp.lang.haskell.cafe: data Person = Person { name :: String, ... } data Business = Business { business_number :: Int, ...} key person = name person key business =