On 2008 Dec 20, at 20:20, Brian Hurt wrote:
class Fooable a where
   toFoo :: a -> Foo
or I can simply have all the functions which need a toFoo take an extra agrument. Performance really isn't that important here, so it's really
a matter of style- which approach would people prefer in this case?


A third possibility is to use the simple Reader monad ((->) r).

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to