Jared Updike wrote:
http://www.haskell.org/onlinereport/decls.html#default-decls
http://www.haskell.org/tutorial/numbers.html#sect10.4
I still don't see, why it works for show but not for my_show.
On 1/12/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
[...]
class (Show a) = My_show a where
On Thu, 12 Jan 2006 [EMAIL PROTECTED] wrote:
What does the Haskell type system do with expressions such as these . . .
?
show 1
show (1+2)
The type of the subexpressions 1 and 1+2 are ambiguous since they
have type (Num a) = a. I'm under the assumption before 1+2 is
evaluated, the 1 and
Am Freitag, 13. Januar 2006 01:31 schrieb Cale Gibbard:
On 12/01/06, Marc Weber [EMAIL PROTECTED] wrote:
I think one simple example like ((+1).(\x-x**2)) in continuation style
would make me understand a lot more..
Marc
The basic idea about the continuation monad is that the entire
Am Freitag, 13. Januar 2006 11:12 schrieb Christian Maeder:
Jared Updike wrote:
http://www.haskell.org/onlinereport/decls.html#default-decls
http://www.haskell.org/tutorial/numbers.html#sect10.4
I still don't see, why it works for show but not for my_show.
Says the report:
Ambiguities in
On 13/01/06, Daniel Fischer [EMAIL PROTECTED] wrote:
Am Freitag, 13. Januar 2006 11:12 schrieb Christian Maeder:
Jared Updike wrote:
http://www.haskell.org/onlinereport/decls.html#default-decls
http://www.haskell.org/tutorial/numbers.html#sect10.4
I still don't see, why it works for
Cale Gibbard wrote:
Snip
So long as we're going to have a defaulting mechanism, it seems a bit
odd to restrict it to Num, and to classes in the Prelude.
Instead of having literals such as 1 that could be Int, Integer, or Float
etc, why not just have one Number type declared as something
On 13/01/06, Brian Hulley [EMAIL PROTECTED] wrote:
Cale Gibbard wrote:
Snip
So long as we're going to have a defaulting mechanism, it seems a bit
odd to restrict it to Num, and to classes in the Prelude.
Instead of having literals such as 1 that could be Int, Integer, or Float
etc, why
Christian Maeder wrote:
Jared Updike wrote:
http://www.haskell.org/onlinereport/decls.html#default-decls
http://www.haskell.org/tutorial/numbers.html#sect10.4
I still don't see, why it works for show but not for my_show.
On 1/12/06, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
[...]
Hello,
I'd like to put forth two situations in which I miss the ability to use
inheritance in Haskell, and then see if maybe somebody has some insight
that I'm missing out on.
Situation #1: In HDBC, there is a Connection type that is more or less
equivolent to a class on a OOP language. In
Hi,
I'm trying to split a string into a list of substrings, where substrings
are delimited by blank lines.
This feels like it *should* be a primitive operation, but I can't seem
to find one that works. It's neither a fold nor a partition, since each
chunk is separated by a 2-character sequence.
On 13/01/06, John Goerzen [EMAIL PROTECTED] wrote:
Hello,
I'd like to put forth two situations in which I miss the ability to use
inheritance in Haskell, and then see if maybe somebody has some insight
that I'm missing out on.
Situation #1: In HDBC, there is a Connection type that is more
On 1/13/06, Adam Turoff [EMAIL PROTECTED] wrote:
Hi,
I'm trying to split a string into a list of substrings, where substrings
are delimited by blank lines.
This feels like it *should* be a primitive operation, but I can't seem
to find one that works. It's neither a fold nor a partition,
On 1/13/06, Sebastian Sylvan [EMAIL PROTECTED] wrote:
On 1/13/06, Adam Turoff [EMAIL PROTECTED] wrote:
Hi,
I'm trying to split a string into a list of substrings, where substrings
are delimited by blank lines.
This feels like it *should* be a primitive operation, but I can't seem
to
That works except it loses single newline characters.
let s = 1234\n5678\n\nabcdefghijklmnopq\n\n,,.,.,.
Prelude blocks s
[12345678,abcdefghijklmnopq,,,.,.,.]
Jared.
On 1/13/06, Sebastian Sylvan [EMAIL PROTECTED] wrote:
On 1/13/06, Sebastian Sylvan [EMAIL PROTECTED] wrote:
On 1/13/06, Adam
On 2006-01-13 at 13:32PST Jared Updike wrote:
That works except it loses single newline characters.
let s = 1234\n5678\n\nabcdefghijklmnopq\n\n,,.,.,.
Prelude blocks s
[12345678,abcdefghijklmnopq,,,.,.,.]
Also the argument to groupBy ought to be some sort of
equivalence relation.
blocks =
On Jan 13, 2006, at 4:35 PM, Jon Fairbairn wrote:
On 2006-01-13 at 13:32PST Jared Updike wrote:
That works except it loses single newline characters.
let s = 1234\n5678\n\nabcdefghijklmnopq\n\n,,.,.,.
Prelude blocks s
[12345678,abcdefghijklmnopq,,,.,.,.]
Also the argument to groupBy ought
On 1/13/06, Sebastian Sylvan [EMAIL PROTECTED] wrote:
blocks = map concat . groupBy (const (not . null)) . lines
Thanks. That's a little more involved than I was looking for, but that
certainly looks better than pattern matching on ('\n':'\n':rest). ;-)
For the record, lines removes the
I have HDBC running with Sqlite3, but I'm getting a SqlError due to a
locked table. Please excuse my SQL ignorance, but what may be causing
the problem? In SQL, are we not allowed to select, update, and delete
from a table within a single transaction? If not, what are the rules
for
Daniel Fischer wrote:
Now the question is, could that restriction be lifted, i.e., would it be
possible/worthwhile to let defaulting also take place if user defined classes
are involved?
The current defaulting mechanism in Haskell is very, very conservative.
You could easily relax the
19 matches
Mail list logo