G'day all.
On Fri, Jul 11, 2003 at 04:28:19PM -0400, Dylan Thurston wrote:
Don't be silly [...]
Never!
Cheers,
Andrew Bromage
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
On 2003-07-12 at 20:20+1000 Andrew J Bromage wrote:
G'day all.
On Fri, Jul 11, 2003 at 04:28:19PM -0400, Dylan Thurston wrote:
Don't be silly [...]
Never!
Or only sometimes. I'm surprised that no-one has yet
answered the question How overload operator in Haskell?
with Overload operator
I come up a solution as this:
---
module Vector where
data Vector =Vector [Double]
fromVector :: Vector - [Double]
fromVector (Vector v) = v
fromList :: [Double] - Vector
fromList v = Vector v
toVector :: Double - Vector
toVector x = Vector (repeat
tor 2003-07-10 klockan 04.56 skrev Glynn Clements:
OTOH, existing implementations (at least GHC and Hugs) currently read
and write 8-bit binary, i.e. characters 0-255 get read and written
as-is and anything else breaks, and changing that would probably
break a fair amount of existing code.
On Thu, 10 Jul 2003 10:58:51 +1000, Andrew J Bromage [EMAIL PROTECTED]
wrote:
This suggests that wrapping each standard mathemtaical
function/operator in its own typeclass would have literally
no run-time performance penalty:
class Plus a b c | a b - c where
(+) :: a - b - c
==
FIRST CALL FOR PAPERS
CLIMA IV
Fourth International Workshop on Computational Logic in Multi-Agent Systems
On Fri, Jul 11, 2003 at 05:38:18PM +1000, Andrew J Bromage wrote:
G'day all.
On Thu, Jul 10, 2003 at 11:16:56PM -0700, Ashley Yakeley wrote:
As written, this is _not_ a good idea. Trust me, you end up having to
put type annotations everywhere. Even (3 + 4 :: Integer) is ambiguous,
I'm glad to hear there isn't a _serious_ cost (i.e. performance penalty)
for fine-grained hierarchies.
One cost which doesn't seem to have been mentioned is the programmer cost.
With the current Haskell Prelude, a matrix operation (say) might have type:
invert :: Num a = Matrix a -
In article [EMAIL PROTECTED],
Alastair Reid [EMAIL PROTECTED] wrote:
One way to overcome part of this problem would be to generalize the idea of
'type synonyms' to allow 'context synonyms'. For example, we have type
synonyms like:
type Point = (Int,Int)
we could have 'context
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Ketil Z. Malde) wrote:
I.e. for 3.14, allow any rational number in [3.14,3.15), or
perhaps (3.135,3.145]?
Specifically the simplest rational in the range (I prefer the second
one, round half even). One rational is simpler than another if both
In article
[EMAIL PROTECTED]
.com,
Simon Peyton-Jones [EMAIL PROTECTED] wrote:
Yes, sorry, as Ian says, type splices just aren't implemented at the
moment. The error message is uninformative.
This is useful info though -- someone wants type splices!
Ah, but what I really want is to be
Hi there,
I was almost certain that Haskell was a great language
until I wanted to make a real usefull program and got
the following problem.
I have
data Lesson = Lesson Teacher SomeOtherProperties
deriving Show
data Subject = Subject Name [Teacher]
SomeOtherProperties
deriving Show
Sarah Thompson [EMAIL PROTECTED] writes:
[...]
work that well for circuits because, for anything other than trivially
simple components, the connections between nodes need to be labelled.
it's been a while since i used it, but i thought erwig's graph library
had labels on edges. it's a really
On Sat, 12 Jul 2003 07:47:02 -0700 (PDT)
Ron de Bruijn [EMAIL PROTECTED] wrote:
It's ofcourse possible to put a list of Subjects that
a Teacher teaches in the data declaration of the
teacher. But then there is no way of saying
efficiently (O(1) Just a pointer or index):Give me a
list
A while ago I looked at Haskell. I got stuck on a problem which
basically caused me to stop using Haskell.
Realising that I never asked anyone else how they would approach the
deal, I decided to ask before I put the final chapter on Haskell.
I have a program that requires a lot of customisation.
On Sunday, July 13, 2003, at 06:54 AM, Thaddeus L. Olczyk wrote:
A while ago I looked at Haskell. I got stuck on a problem which
basically caused me to stop using Haskell.
Realising that I never asked anyone else how they would approach the
deal, I decided to ask before I put the final chapter on
G'day all.
On Sun, Jul 13, 2003 at 10:09:21AM +1000, Andrew Rock wrote:
I think that each being a customisation *is* sufficient for coherence
of one data structure to hold them all.
I agree, though using different data structures for each set of
configuration parameters which will be used
17 matches
Mail list logo