Re: Constant space infinite itteration ... solution?

2002-12-13 Thread Jan Kort
[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 it

Re: Using the Parsec library

2002-09-10 Thread Jan Kort
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

Re: Pretty printing (was: Standard Library for text formatting?)

2002-08-26 Thread Jan Kort
Dr Mark H Phillips wrote: > > Hi again, > > After doing some searching, it seems that "pretty printing" is > a prominant "Haskell way" of doing text output. I still am > interested in finding a library of standard text formatting > (String formatting) functions, but it seems like it might > be

Re: Beginner's question: Memo functions in Haskell

2002-06-05 Thread Jan Kort
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 >

Re: Strict foldl

2001-12-07 Thread Jan Kort
"Ch. A. Herrmann" wrote: > > Hi Haskellers, > > which compiler settings do I have to pass to ghc-5.02 > in order to achieve that the strictness analyzer > recognizes strictness of (+) in foldl and computes > sum in constant space? > > Prelude> sum [1..1000] > > had the following effect: >

Re: sharing datatypes : best practice ?

2001-05-10 Thread Jan Kort
"Taesch, Luc" wrote: > > i ve developped a datatype in a module P, and another module will use it, and most >probably a few others, and its quite central to the apps Im building. > > what is the best organisation ? > > -import module P everywhere > - isolate this datatype in a module, which wo

Re: FranTK

2001-02-08 Thread Jan Kort
Hi Petra, Since you are a system administrator, I asume that you will also want to install FranTk so other people can use it. I'm not sure this is possible. I did manage to get it working for myself localy, but a "make install" doesn't do anything. If you are in a hurry, you can use the fixes be

Re: AW: What does "Compiled code too complex" error message of Hugs mean?

2001-02-01 Thread Jan Kort
> > Christian > > > -Urspr> üngliche Nachricht- > > Von: Jan Kort [SMTP:[EMAIL PROTECTED]] > > Gesendet am: Mittwoch, 31. Januar 2001 13:34 > > An: Laaser Christian > > Cc: '[EMAIL PROTECTED]' > > Betreff: Re: What does "Compile

Re: What does "Compiled code too complex" error message of Hugs mean?

2001-01-31 Thread Jan Kort
Laaser Christian wrote: > > When loading some Haskell files with Hugs, I get the error message "Compiled code >too complex". However, the compilation with GHC 4.08.1 succeeds. > What does this message mean? What can I do about it? > You can grep for that sentence in "hugs98/src", it will point

Re: doubly linked list

2000-04-27 Thread Jan Kort
Keith Wansbrough wrote: > > > Good point! I have no idea... it looks like the Wiki has gone AWOL. If someone >would tell me where my article has gone, I'd be very grateful! > If you find it, maybe you could put it in the "Haskell bookshelf" ? I found very useful and Wiki has been "AWOL" for

Re: records in Haskell

2000-03-16 Thread Jan Kort
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 :: Stri

records in Haskell

2000-02-11 Thread Jan Kort
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 h

Re: drop & take [was: fixing typos in Haskell-98]

2000-01-28 Thread Jan Kort
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

prelude drop and take

2000-01-18 Thread Jan Kort
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. Wh