Re: [Haskell] Implicit parameters

2004-06-09 Thread Iavor S. Diatchki
hi, i don't think this is a bug, and this is a situation where it matters if you use ($) or parens. the same probelm occurs when you work with polymorohism, rank-2 and above, e.g. when you use runST. the problem occurs because ($) has a monomorphic (non-overloaded) type: ($) :: (a -> b) -> (a ->

[Haskell] Implicit parameters

2004-06-09 Thread Per Larsson
When using implicit parameters I have noticed (at least for me) a rather puzzling behaviour with GHC and Hugs. Given the declarations data Env = Env {numlines :: Int, numcols :: Int} initEnv = Env {numlines = 0, numcols = 1} withEnv :: ((?env :: Env) => IO a) -> IO a withEnv io = let ?env = i