Capitalized type variables (was Re: Scoped type variables)

2006-02-23 Thread Ben Rudiak-Gould
I wrote: What I don't like is that given a signature like x :: a - a there's no way to tell, looking at it in isolation, whether a is free or bound in the type. [...] Here's a completely different idea for solving this. It occurs to me that there isn't all that much difference between

Re: Scoped type variables

2006-02-10 Thread Ross Paterson
On Wed, Feb 08, 2006 at 05:48:24PM -, Simon Peyton-Jones wrote: | b) A pattern type signature may bring into scope a skolem bound |in the same pattern: |data T where | MkT :: a - (a-Int) - T |f (MkT (x::a) f) = ... | |The skolem bound by

Re: Scoped type variables

2006-02-08 Thread Ross Paterson
On Tue, Feb 07, 2006 at 08:15:19PM +, Ben Rudiak-Gould wrote: Simon PJ thinks that Haskell' should include scoped type variables, and I tend to agree. But I'm unhappy with one aspect of the way they're implemented in GHC. What I don't like is that given a signature like x :: a - a

RE: Scoped type variables

2006-02-08 Thread Simon Peyton-Jones
| I think we should do the simplest thing that could possibly work, | and then see if we really need more. By work, I mean a compatible | extension of H98 that makes it possible to add type signatures for | local bindings (which isn't always possible in H98). How about: | | * no implicit

Re: Scoped type variables

2006-02-07 Thread Ashley Yakeley
Ben Rudiak-Gould wrote: Simon PJ thinks that Haskell' should include scoped type variables, and I tend to agree. But I'm unhappy with one aspect of the way they're implemented in GHC. What I don't like is that given a signature like x :: a - a there's no way to tell, looking at it in