[EMAIL PROTECTED] wrote:
Also ... I've been using the graphics libs with HUGS,
but I can't find the equivalent in GHC ... what is
the recomended library for writing GUIs in GHC Haskell?
And where do I get it?
My current favourite way to make GUI's is to use the GUI
painter Glade and have
Juan Ignacio Garcia Garcia wrote:
*P2 (fromRational ((toRational 4) - ( toRational 5.2 )))
-1.2002
I can't explain this one, how would fromRational
know that it has to create a Double ?
Jan
___
Glasgow-haskell-users mailing list
[EMAIL
Jose Romildo Malaquias wrote:
Any sugestion on how to implement the 'not starting with
A: or B:' problem?
Hi,
I'm not familiar with Parsec, but in ParseLib it's
fairly straightforward, first you add a new combinator:
ifnot :: Parser a - Parser b - Parser b
ifnot (P p1) (P p2) =
P ( \s -
Janis Voigtlaender wrote:
It would also seem that one needs to write
fast = memo slow
instead, because otherwise a new memo-version of slow might be created
for every call with some n (subject to let-floating?).
However, the version:
module Fib where
import Memo
slow 0
Taesch, Luc wrote:
do u isolate just the datatype, or a few related with, in a very small file (header
like, i would say)
or some basic accessor function with it ?
isnt it leading to massiv quantities of small files ?
Asuming you have some typed AST with many mutually recursive
luc wrote:
I tried FranTk with ghc 4.08 and got :
(this is the "fixed" FrankTk, alledged working with 4.06, if im not
wrong)
are there any difference with 4.06 and 4.08 ?
Below is a list of fixes to get FranTk working with ghc4.08.
Jan
Run configure like normal, i.e.:
./configure
I implemented the programs for hash1 and hash2, but I had to
make a lot of changes to FiniteMap to get them to work:
- I changed foldl to foldl' (as defined in Hugs).
- I made foldFM strict (like foldl').
- I made the datatype FiniteMap strict (put !'s everywhere).
I put the programs below,
Simon Peyton-Jones wrote:
A String is a [Char] and a Char is a heap object. So
a file represented as a string takes a massive 20 bytes/char
(12 for the cons cell, 8 for the Char cell). Then it's all sucked
through several functions.
It's entirely possible, though, that the biggest
Andy Gill's Monad Template Library is good for that, but the link
from the Haskell library page is broken:
http://www.cse.ogi.edu/~andy/monads/doc.htm
Jan
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
"Julian Seward (Intl Vendor)" wrote:
I tried this, with ghc-4.08.1 -O both with and without
profiling, on a Sparc box of I believe around 300 MHz,
and I can't reproduce it at all. Without profiling,
it allocates about 505 k of heap and runs in 0.02
seconds.
Ummm ?
J
I didn't use
Hi,
I noticed ghc (version 4.08.1) floating point performance is
really slow on my computer: a 270Mhz sun ultra5. The program
below does 1 milion floating point multiplications and takes
2 seconds to run. I made a profile and it says most of the
time (93%) is spent in the function bar. Any idea
Simon Marlow wrote:
I don't forsee any problems with the C stack - the stack pointer stays
static during execution of Haskell code, and only moves when we do a C
call or return to the RTS.
But how do I get the address of the bottom of the stack ? It seems I can
define a C main so I can get
Hi,
I'm trying to write an interface for a C library that
uses a Boehm type garbage collector. So, I need to get
the address of the bottom of the C stack. In a C
application this would look something like:
main()
{
int bottomOfStack;
}
Where "bottomOfStack" would be the thing I need.
Simon Marlow wrote:
Arguably, readFile is too strict: why is the file opened, if there
aren't any characters needed. What is the motivation for opening the
file eagerly?
Once we've started reading lazilly, it's hard to generate errors. The file
is opened eagerly so that any errors
Hi,
The following program:
module Main(main) where
main:: IO()
main = do {
xs - mapM readFile (take 1000 (repeat "tmp"));
return ();
}
Results in the error:
Fail: resource exhausted
Action: openFile
Reason: process file table full tmp
This doesn't work either:
myreadFile
I compiled a program using ghc version 4.06 and it goes into a loop, I
tried
figuring out what goes on with "trace", but it looks as if this is a ghc
bug. Wether it loops or not depends on the length of the list: if you
remove
1 "Int 1" line in the code below it will finish immediatly.
I need a
Simon Marlow wrote:
Jan Kort writes:
It seem that any record, no matter how trivial, can't be much
longer than about 200 lines in Haskell. If a try to compile a
300 line record containing just:
data X = X {
f1 :: String,
f2 :: String,
f3 :: String
Hi,
When I use deriving Read and Show on many datatypes,
both ghc and hugs don't work.
I've attached an example, to get the error, do:
hugs Main.hs
or:
ghc Main.hs
Hugs quits with the error message:
ERROR "Main.hs": Type constructor storage space exhausted
And ghc quits with:
Hi,
It seem that any record, no matter how trivial, can't be much
longer than about 200 lines in Haskell. If a try to compile a
300 line record containing just:
data X = X {
f1 :: String,
f2 :: String,
f3 :: String,
...
f300 :: String
}
It needs about 90M
Hi,
It seems that FFI no longer accepts "ByteArray Int" in ghc 4.06 (it
does in ghc 4.04), it looks intentional ? If so, is there another
way to pass a String to a C function ? If not, I have attached
a small example, to see the result do:
tar -xf abc.tar
make
The result should be:
Marcin 'Qrczak' Kowalczyk wrote:
My preference is still (B). (A) is not *very* bad, but should really
replicate (-7) "foo" be []?
Mine too.
Actually after writing my own version of "drop" it turns out that
in my case n 0 is a programmer error and n length xs a user error.
So what you end up
Hi,
I'm using the FFI on a sparc. Everything works fine except
when I return a float or double from C to Haskell. My config is:
SunOS 5.6
cpu0: SUNW,UltraSPARC-IIi (upaid 0 impl 0x12 ver 0x12 clock 270 MHz)
SUNW,m64B0 is /pci@1f,0/pci@1,1/SUNW,m64B@2
stdout is /pci@1f,0/pci@1,1/SUNW,m64B@2
Hi,
This minor inconsistency has been bothering me for some time:
Prelude drop 10 "test"
""
Prelude drop (-1) ""
""
Prelude drop (-1) "a"
"
Program error: Prelude.drop: negative argument
I got these results from Hugs, but the code is identical to that
specified in the Haskell98 standard.
Why
Sigbjorn Finne (Intl Vendor) wrote:
Jan Kort [EMAIL PROTECTED] writes:
Thanks, I can get a lot further now, everything apart from
compiling the assembler files and linking the hsc works, but
that will have to wait till tommorow :)
Jan
Great, if you should get stuck while
"$(GhcWithHscBuiltViaC)" "NO"
24 SUBDIRS = utils driver includes rts docs compiler lib
25 else
26 SUBDIRS = utils driver includes rts docs lib compiler
27 endif
Shouldn't this be 'ifeq "$(GhcWithHscBuiltViaC)" "YES"' ?
Jan
--
Jan Kort
Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1
Which I don't understand, am I missing some hc files ?
Regards,
Jan
--
Jan Kort
26 matches
Mail list logo