/projects/ghc/.
(without -fasm I get
Prologue junk?: .globl __stginit_CGI
.type __stginit_CGI,@function
__stginit_CGI:
pushl %ebp
movl%esp, %ebp
instead, which is probably caused by non-supported version of gas or gcc?)
Zdenek Dvorak
Hello,
[snip]
Try
intToFloat :: Int - Float
intToFloat n = fromInteger (toInteger n)
[snip]
Use the Prelude function realToFrac.
it sometimes happens to me that I must spend some time browsing
prelude to devise somethink like this; it might be useful to have
a library for this, that would
Hello,
Now, Haskell has a garbage collector, so Haskell must know how many
pointers there are to all objects in the heap (or?). Then, if a finite map
for example only has one single pointer to it, then it ought to be all
right to modify the finite map (or whatever datastructure we are
Hello,
Apparently I can't do this (in ghc or hugs -- haven't tried others):
class Space a where
distance :: a - a - Int
subtract :: a - a - a
class (Space a) = NormSpace a where
norm :: a - Int
distance a b = norm (subtract a b)
That is, I can't make (or redefine) a default for the
)
Zdenek Dvorak
_
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org
Hello,
Hello! I just Wanna Know, What should I do, to build a List of random
Numbers,
without IO type, just Float or Int
the answer for this is either you can't, read something about IO and monads
(good starting places are http://haskell.org/wiki/wiki?UsingIo and
of first list,
so it is constant in our case; summing it over all putCharMs, we get linear
time and we are happy :-)
If you want to do it the first way, define
putCharM c = M $ \o - ((), c : o)
and then reverse the list in runM.
Zdenek Dvorak
are doing the work monads would do
for you.
So in general you must choose -- either your programs will be nice and
functional,
but you will have to use structures with (some kind of) logarithmic slowdown
(FiniteMap, Trie), or some of their parts will be embedded in monads.
Zdenek Dvorak
it with profiling
(-prof -auto-all) and running with +RTS -xc will give you a stack dump
(pretty useful, well hidden feature :-)
Zdenek Dvorak
_
Chat with friends online, try MSN Messenger: http://messenger.msn.com
them to work like that). I have written following module that implements
stupid first-fit algorithm for these purposes; the interface is simmilar to
the pretty printing libraries.
Zdenek Dvorak
module ReportPrinter (
LowDoc,HighDoc,
(),(+),($$),($),
int, lowText, text, empty,
colon, comma, space
was forced
to write my own version (it is a bit faster, but still nothing great). My
suspicion about the result of your measuring is that it does the updates
in reversing the array one by one, thus leading to quadratic behavior.
Zdenek Dvorak
want to use it; also I may no longer use deriving Show
on types containing such structure.
Is there some better way how to do this?
Zdenek Dvorak
_
Send and receive Hotmail on your mobile device: http://mobile.msn.com
)
Especially, I would need class D above.
class C can be rewritten to
class C x y z | x - y, x - z
concerning class D, I used (in GHC)
class D x y z | x y - z
and it seemed to do what I wanted. I guess
class C x y z | x - y z
would work too.
Zdenek Dvorak
and e2 are obviously undefined.
Zdenek Dvorak
_
Chat with friends online, try MSN Messenger: http://messenger.msn.com
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org
14 matches
Mail list logo