G'day all.
Quoting Robert Dockins <[EMAIL PROTECTED]>:
> Eww! Be careful how far you depend on properties of typeclasses, and make
> sure you document it when you do.
The behaviour of NaN actually makes perfect sense when you realise that
it is Not a Number. Things that are not numbers are
Brian Hulley wrote:
John Meacham wrote:
[snip]
1. one really does logically derive from the other, Eq and Ord are
like this, the rules of Eq says it must be an equivalance relation
and that Ord defines a total order over that equivalance relation.
this is a good thing, as it lets you write code
On 4/6/06, Brian Hulley <[EMAIL PROTECTED]> wrote:
> What about:
>
> class Eq a where (==), (/=) :: ...
> class PartialOrd a where
> (<), (>) :: a->a->Bool
> x > y = y < x
>
> class (PartialOrd a) => TotalOrd a where x <= y = not (y < x)
>-- => not meaning inheritance but just a
John Meacham wrote:
On Thu, Apr 06, 2006 at 10:52:52PM +0100, Brian Hulley wrote:
[snip]
The problem of allowing classes (in Haskell) to inherit is that you
end up with heirarchies which fix the design according to some
criteria which may later turn out to be invalid, whereas if there
were no hi
On Apr 6, 2006, at 6:05 PM, Daniel Fischer wrote:I've also written a version using David F. Place's EnumSet instead of [Int], that takes less MUT time, but more GC time, so is slower on the 36,628 test, but faster for a single puzzle. That's a curious result. Did you compile with optimization? I
On Thursday 06 April 2006 06:44 pm, John Meacham wrote:
> On Thu, Apr 06, 2006 at 10:52:52PM +0100, Brian Hulley wrote:
[snip a question about Eq and Ord classes]
> well, there are a few reasons you would want to use inheritance in
> haskell, some good, some bad.
>
> 1. one really does logically
On Thu, Apr 06, 2006 at 10:52:52PM +0100, Brian Hulley wrote:
> >in haskell classes _do_ define interfaces, not concrete
> >representations so the problems with inherentence of non-abstract
> >classes in OO languages don't apply.
>
> What I was trying to argue was that inheritance of classes in Ha
Am Mittwoch, 5. April 2006 15:09 schrieb Chris Kuklewicz:
> Henning Thielemann wrote:
> > On Mon, 3 Apr 2006, Jared Updike wrote:
> >> or ambiguously) with your Sudoku solver? A rough mesaure of the
> >> difficulty of the unsolved puzzle could be how long the solver took to
> >> solve it (number of
John Meacham wrote:
On Thu, Apr 06, 2006 at 09:31:24PM +0100, Brian Hulley wrote:
I've been wondering for a long time if there is a reason why Ord
should inherit from Eq and not vice versa, or whether in fact there
is any justification for making either Ord or Eq inherit from the
other one.
Th
On Thu, 6 Apr 2006 21:31:24 +0100, you wrote:
>I've been wondering for a long time if there is a reason why Ord should
>inherit from Eq and not vice versa, or whether in fact there is any
>justification for making either Ord or Eq inherit from the other one.
Support for the concept of equality/in
On Apr 6, 2006, at 10:35 AM, Bulat Ziganshin wrote:
1) wordLength = bitSize (undefined::Word)
How'd I miss that one? Thanks.
2) your library will not work with Hugs 2003, what is the latest
official (non-beta) version. "Portability : portable" ?
Fixed by changing "portable" to "non-porta
On Thu, Apr 06, 2006 at 09:31:24PM +0100, Brian Hulley wrote:
> I've been wondering for a long time if there is a reason why Ord should
> inherit from Eq and not vice versa, or whether in fact there is any
> justification for making either Ord or Eq inherit from the other one.
The problem is that
Hi -
I've been wondering for a long time if there is a reason why Ord should
inherit from Eq and not vice versa, or whether in fact there is any
justification for making either Ord or Eq inherit from the other one.
For example, Ord and Eq could alternatively be defined as:
class Ord a where
(<
Thank you all for your excellent comments.
I was aware of Hughe's technique and the 'whyfp' paper.
I had often thought that some kind of iteration would be necessary to
reolve this, and to overcome initially this I was cheating and using
one of the values one step late in order to break the close
On Thu, 6 Apr 2006, Claus Reinke wrote:
Curry does not have a constraint solver of its own. It simply delegates all
constraints to the FD solver of SICStus Prolog.
or that of SWI Prolog (which prompted my attempt to install Curry).
which was implemented by..hi, again!-) (*)
The SWI-Pr
Curry does not have a constraint solver of its own. It
simply delegates all constraints to the FD solver of SICStus Prolog.
or that of SWI Prolog (which prompted my attempt to install Curry).
which was implemented by..hi, again!-) (*)
The all_different constraint subsumes the rules that
On Apr 6, 2006, at 11:25 AM, Michael Goodrich wrote:
Thanks so much for your help. I should have made clear that I was
aware that the definitions were mutually dependent. What I was
hoping was that Haskell could solve this for me without my having
to resort to effectively finessing any se
Hello David,
Wednesday, April 5, 2006, 9:30:33 PM, you wrote:
> Since there is some interest in my EnumSet module, I am reposting it
> here with a BSD license in anticipation of its rebirth as Data.Set.Enum.
pair of comments:
1) wordLength = bitSize (undefined::Word)
2) your library will not wo
> Thanks so much for your help. I should have made clear that I was aware that
> the definitions were mutually dependent. What I was hoping was that Haskell
> could solve this for me without my having to resort to effectively finessing
> any sequencing considerations.
Haskell is a functional lang
On 2006-04-06 at 11:25EDT "Michael Goodrich" wrote:
> Thanks so much for your help. I should have made clear that I was aware that
> the definitions were mutually dependent. What I was hoping was that Haskell
> could solve this for me without my having to resort to effectively finessing
> any sequ
Thanks so much for your help. I should have made clear that I was aware
that the definitions were mutually dependent. What I was hoping
was that Haskell could solve this for me without my having to resort to
effectively finessing any sequencing considerations.
Perhaps I am really asking it to do
Michael Goodrich wrote:
Also I know what strict means, but why are you saying that baz is strict?
Because otherwise the loop would be OK. For instance if baz were
baz x = 100 -- lazy
then the equations could be evaluated starting from
c0 = baz z0 = 100
rd0 = c0*c0*m = 100*100*m
-- etc.
22 matches
Mail list logo