On 1/26/06, John Hughes [EMAIL PROTECTED] wrote:
I'd be against this--its semantics isn't clear enough to me. For example,
I usually assume id e = e, for any e, but
id (f _ x) y = id (\y-f y x) y = f y x
/=
f _ x y = \z - f z x y
Or would (f _ x) y and f _ x y maybe be
John Hughes wrote:
* You can't eta-convert definitions freely, if there is no type signature.
...
* Definitions without a type-signature can change ...
(entering ironic mode, but not quite:)
So, what about making type signatures mandatory,
as the rest of the civilized world does happily for
Ross Paterson wrote:
I suggest = for bind-by-name, and
:= for bind-by-need.
...
You're proposing that the =/:= distinction both decides whether
constrained type variables are monomorphic and whether the binding
should be implemented using sharing. If it only did the former (and the
On 26 January 2006 09:59, John Hughes wrote:
The solution I favour is simply to use *different syntax* for the two
forms of binding, so that a definition is monomorphic, and computed
at most once, if it uses the monomorphic binding operator, and
polymorphic/overloaded, computed at each use,
Simon Marlow [EMAIL PROTECTED] writes:
On 26 January 2006 09:59, John Hughes wrote:
The solution I favour is simply to use *different syntax* for the two
forms of binding,
I wonder if there's an alternative solution along these lines:
- We use ParialTypeSignatures to make bindings
The Haskell Prime Wiki mentions the scoping of type variables
in class instances, but only as an aside, and it is not even clear
whether proposal 1 would support that feature or not.
For me this once occurred as a matter of language expressiveness,
i.e. I had once to switch from hugs to GHC,
I am very please to see on the Wiki also a list of removal candidates
and that these include n+k patterns and ~ patterns.
I'd like to add one pattern to this list of removal candiates: k
patterns, that is, numeric literals.
Why do I want to get rid of these three patterns? Because all
I agree that if (n+k) patterns go, then so should k patterns. Both are
overloaded, and that's the root of their complexity.
Personally I think ~ patterns are great, and we are now talking about !
patterns, a kind of dual to ~ patterns. So at least I think we should
un-couple the two
Johannes - thanks for the pointer to this posting; would you have a
concrete proposal to make on the basis of this for Haskell'?
Regards
Simon Thompson
On Wed, 25 Jan 2006, Johannes Waldmann wrote:
It is standard practice to hide implementation details,
in particular, not publishing the
On 2006-01-26, John Hughes [EMAIL PROTECTED] wrote:
I don't think it's hard. I would just teach students to define
functions with =, and variables with :=. I tell my students to write
type signatures at the beginning anyway, so they don't risk being
bitten by the M-R anyway. Beginning students
Duncan Coutts wrote:
I think it's a perfectly reasonable mental model for people to believe
that:
data Char = 'a' | 'b' | 'c' | ...
data Int = ... -2 | -1 | 0 | 1 | 2 | ...
I don't see why we should remove one and not the other. Students will
ask why the can pattern match on strings,
Olaf Chitil wrote:
I'd like to add one pattern to this list of removal candiates: k
patterns, that is, numeric literals.
I was rather shocked when I first read this. And I certainly don't
like the argument from implementation difficulties in a certain tool!-)
I don't mind losing (n+k), not
12 matches
Mail list logo