The problem is that you might have:
instance Poly Double where ...
and then when you say:
po 5
it doesn't know whether this is an Int or a Double.
writing
po (5::Int)
should be sufficient.
--
Hal Daume III
"Computer science is no more about computers| [EMAIL PROTECTED]
than astrono
Hi,
I am trying to create an overloaded function "à la Java" to be able to
call it either with a string or a number.
Ex :
definePort "http"
definePort 80
but I have problem with restrictions in Haskell's type system (or with
my lack of experience with it).
The program :
data PolyType = MkPolyLef
Dear friends,
Although final confirmation is awaited, Kevin Hammond and Steve Linton expect
shortly to be in a position to advertise a three year post-doctoral fellowship
to work on a research project entitled: "Computational Algebra for Commodity
Parallel Machines".
The goal of this project is
On Wednesday 26 June 2002 04:19 am, Colin Runciman wrote:
> Could it be that the string-comparison sort simply has less sorting to do
> than the int-comparison sort? The default definition of sortBy uses
> insertion sort, so if the string-sort input happens to be already sorted
> it takes linear
Ketil Z. Malde wrote:
| (writing his own O(n log n) sortBy as we speak)
It might be useful to look at Ralf Hinze's collection of
sorting routines, available on his homepage:
http://www.cs.uu.nl/~ralf/software.html#sort
/Koen.
___
Haskell mailing
> And in the olden days (Before Haskell) there was:
>
> Kewley and Glynn1989
> J.M. Kewley and K. Glynn.
> Evaluation Annotations for Hope+.
> In Glasgow Workshop on Functional Programming, Workshops in Computing,
> pages 329-337, Fraserburgh, Scotland, 1989. Springer-Verlag.
Now r
[EMAIL PROTECTED] (Ketil Z. Malde) writes:
> for 90K values to sort, I get 7M string comparisons and 321M integer
..and with different parameters giving 127K values, ie. a factor of
1.4, I get 12M and 614M comparisons, *very* close to the expected
O(n²) behavior of insertion sort.
>> The defaul
Koen Claessen <[EMAIL PROTECTED]> writes:
> Another reason might be that the ints in the list are not
> evaluated yet; and sorting the list on the ints forces
> evaluation of them which maybe takes time?
Yes, I've thought of that, but (and correct me if I'm wrong!) I was
under the impression tha
Colin Runciman <[EMAIL PROTECTED]> writes:
> Could it be that the string-comparison sort simply has less sorting to do
> than the int-comparison sort?
Not quite improbable, hang on while I print the profiling (with
comparison in its own function): Yes, that seems to be the case, for
90K values
Ketil Z. Malde wrote:
| I have what I think is a really strange problem. I
| have a fair sized problem, which involves sorting a
| data set, first on labels (which are Strings) and then
| on scores (which are Ints).
|
| The strange thing is that string sorting is *vastly*
| faster than in
Ketil Z. Malde wrote:
>I have what I think is a really strange problem. I have a fair sized
>problem, which involves sorting a data set, first on labels (which are
>Strings) and then on scores (which are Ints).
>
>The strange thing is that string sorting is *vastly* faster than int
>scoring! No
Hi,
I have what I think is a really strange problem. I have a fair sized
problem, which involves sorting a data set, first on labels (which are
Strings) and then on scores (which are Ints).
The strange thing is that string sorting is *vastly* faster than int
scoring! Now, I've tried modifying
12 matches
Mail list logo