Andrew Coppin wrote:
That seems simple enough (although problematic to implement). However,
the Report seems to say that it matters whether or not the bindings are
muturally recursive [but I'm not sure precisely *how* it matters...]
Seriously, check out the classic Milner paper. Of
Andrew Coppin wrote:
Robert Greayer wrote:
f0 _ = (foo True, foo 'x') where foo = id
is well-typed.
Really? That actually works? How interesting... This suggests to me that
where-clauses also do strange things to the type system.
Not too strange, in fact we need it to do that for
2009/7/17 Andrew Coppin andrewcop...@btinternet.com:
I've been working hard this week, and I'm stumbled upon something which is
probably of absolutely no surprise to anybody but me.
Consider the following expression:
(foo True, foo 'x')
Is this expression well-typed?
Astonishingly, the
Derek Elkins wrote:
The answer to your questions are on the back of this T-shirt.
http://www.cafepress.com/skicalc.6225368
Oh... dear God. o_O
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
John Meacham wrote:
actually, the rules are pretty straightforward. It doesn't matter where
something is bound, just _how_ it is bound. Let-bound names (which
includes 'where' and top-level definitions) can be polymorphic.
lambda-bound or case-bound names (names bound as an argument to a
Andrew,
That seems simple enough (although problematic to implement).
However, the Report seems to say that it matters whether or not the
bindings are muturally recursive [but I'm not sure precisely *how*
it matters...]
It means that functions can only be used monomorphically within
I've been working hard this week, and I'm stumbled upon something which
is probably of absolutely no surprise to anybody but me.
Consider the following expression:
(foo True, foo 'x')
Is this expression well-typed?
Astonishingly, the answer depends on where foo is defined. If foo is
a
Consider the following expression:
(foo True, foo 'x')
Is this expression well-typed?
Astonishingly, the answer depends on where foo is defined. If
foo is a local variable, then the above expression is guaranteed
to be ill-typed. However, if we have (for example)
That's not true:
main =
On Thu, Jul 16, 2009 at 2:34 PM, Andrew
Coppinandrewcop...@btinternet.com wrote:
I've been working hard this week, and I'm stumbled upon something which is
probably of absolutely no surprise to anybody but me.
Consider the following expression:
(foo True, foo 'x')
Is this expression
Robert Greayer wrote:
f0 _ = (foo True, foo 'x') where foo = id
is well-typed.
Really? That actually works? How interesting... This suggests to me that
where-clauses also do strange things to the type system.
whereas
f1 foo = (foo True, foo 'x')
requires 'foo' to be polymorphic in
It's not where -- let also works
let { foo Prelude let { foo x = x } in (foo 1, foo True)
(1,True)
Can you send the code you're trying that doesn't work?
-Ross
On Jul 16, 2009, at 3:40 PM, Andrew Coppin wrote:
Robert Greayer wrote:
f0 _ = (foo True, foo 'x') where foo = id
is well-typed.
On Thu, Jul 16, 2009 at 12:40 PM, Andrew Coppin andrewcop...@btinternet.com
wrote:
Robert Greayer wrote:
f0 _ = (foo True, foo 'x') where foo = id
is well-typed.
Really? That actually works? How interesting... This suggests to me that
where-clauses also do strange things to the type
Ross Mellgren wrote:
It's not where -- let also works
Prelude let { foo x = x } in (foo 1, foo True)
(1,True)
Awesome. So by attempting to implement Haskell's type system, I have
discovered that I actually don't understand Haskell's type system. Who'd
have thought it?
Clearly I must go
Andrew Coppin wrote:
Awesome. So by attempting to implement Haskell's type system, I have
discovered that I actually don't understand Haskell's type system.
Who'd have thought it?
Clearly I must go consult the Report and check precisely what the
rules are...
I just read section 4.5 of the
On Thu, Jul 16, 2009 at 2:52 PM, Andrew
Coppinandrewcop...@btinternet.com wrote:
Ross Mellgren wrote:
It's not where -- let also works
Prelude let { foo x = x } in (foo 1, foo True)
(1,True)
Awesome. So by attempting to implement Haskell's type system, I have
discovered that I actually
Is everything an acceptable answer?
-Ross
On Jul 16, 2009, at 6:38 PM, Derek Elkins wrote:
On Thu, Jul 16, 2009 at 2:52 PM, Andrew
Coppinandrewcop...@btinternet.com wrote:
Ross Mellgren wrote:
It's not where -- let also works
Prelude let { foo x = x } in (foo 1, foo True)
(1,True)
On Thu, Jul 16, 2009 at 08:52:40PM +0100, Andrew Coppin wrote:
Ross Mellgren wrote:
It's not where -- let also works
Prelude let { foo x = x } in (foo 1, foo True)
(1,True)
Awesome. So by attempting to implement Haskell's type system, I have
discovered that I actually don't understand
17 matches
Mail list logo