Re: [Haskell] -fno-monomorphism-restriction makes type-inference ambiguous?

2006-02-27 Thread John Meacham
On Mon, Feb 27, 2006 at 04:42:32PM +0100, Johannes Waldmann wrote: > Implicit parameters are *evil*. They seem to simplify programs > but they make reasoning about them much harder. Indeed. We really need some big caveats in the manual. I find a lot of new users think they are what they need and j

Re: [Haskell] Implicit Parameters

2006-02-27 Thread Robert Dockins
On Feb 27, 2006, at 3:31 PM, Ashley Yakeley wrote: Ben Rudiak-Gould wrote: I'd advise against using implicit parameters, because (as you've seen) it's hard to reason about when they'll get passed to functions. And Johannes Waldmann wrote: > Implicit parameters are *evil*. They seem to simpl

[Haskell] Implicit Parameters

2006-02-27 Thread Ashley Yakeley
Ben Rudiak-Gould wrote: I'd advise against using implicit parameters, because (as you've seen) it's hard to reason about when they'll get passed to functions. And Johannes Waldmann wrote: > Implicit parameters are *evil*. They seem to simplify programs > but they make reasoning about them much

Re: [Haskell] -fno-monomorphism-restriction makes type-inference ambiguous?

2006-02-27 Thread Johannes Waldmann
Implicit parameters are *evil*. They seem to simplify programs but they make reasoning about them much harder. To an extent, they can be simulated with type classes, because dictionaries are also implicit (you don't see them in the code but you see them in the type declaration - same as for implic

[Haskell] -fno-monomorphism-restriction makes type-inference ambiguous?

2006-02-27 Thread Eike Scholz
Hi, thanks for the last help and hints. I have encountered an other problem, and again I don't quite understand the reason why I get the results I get. ghci seems to infer different types for the same expression. Consider that I have disabled the monomorphism restriction in module AGC.lhs (which

[Haskell] Re: "strange" behavior of Implicit Parameters

2006-02-27 Thread Ben Rudiak-Gould
I'd advise against using implicit parameters, because (as you've seen) it's hard to reason about when they'll get passed to functions. Another example: http://www.haskell.org/pipermail/haskell-cafe/2005-January/008571.html -- Ben ___ Haskell mailin

RE: [Haskell] "strange" behavior of Implicit Parameters

2006-02-27 Thread Simon Peyton-Jones
Look at the type of (???) (???) :: a -> (a->b) -> b Nothing about ?foo in there. You're passing a *monomorphic* function to (???), so fun is partially applied to ?foo before calling (???). Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eike