Run-time options in ghc on Linux
The +RTS options don't seem to be working for me on Linux (Redhat 7.2, ghc 5.04 and 5.04.1installed viathe .rpms). One of my programs will happily consume all available memory, even though I have +RTS -M64M, and another program fails with Stack space overflow: current size 1048576 bytes.Use `+RTS -Ksize' to increase it. even though I'm using +RTS -K10M. Anysuggestions ?
Urgent Help: URI parser
Hi, I wonder what happens to the port when URI parses http URL string. Is it possible to check for : and use the stated port instead of port 80? Anyone has experience doing it before? Thanks in advance. Cheers, Gek ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
RE: Urgent Help: URI parser
I wonder what happens to the port when URI parses http URL string. Is it possible to check for : and use the stated port instead of port 80? Anyone has experience doing it before? Thanks in advance. Cheers, Gek The Network.URI library will extract the host:port: authority (fromJust (parseURI http://www.haskell.org:80/;)) www.haskell.org:80 You have to split this string into the separate host and port parts yourself. Cheers, Simon ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Interpret haskell within haskell.
I was wondering if there is any project that aims to interpret haskell within haskell. Is it feasable that a program can import a user's .hs file that has something like: greeting :: String greeting = Something port :: Int port = 32 + 33 And the program can parse and execute the user's function. I'm looking for something similar to the eval command in Python. Thanks, David J. Sankel ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Parsing date and time specifications
Hi, I have written a parser that turns an RFC2822 date and time specification into a datatype usable in Haskell. While the parser is working just fine so far, I have a problem with the CalendarTime datatype. It appears that in order to construct one of those, I need _all_ the information it contains, including the weekday (Day) and the number of the day in the year. The problem now is that I do not have this information! Of course I could calculate these values by hand, but this is immensely complicated. I thought about using a TimeDiff instead, but apparently the functions provided in the Prelude do not handle TimeDiff for anything except for maths -- what doesn't really help me for what I am trying to do. I briefly looked at the Posix module that comes with GHC as well, and which seems to provide CTime. But then, the Posix module appears to be non-standard. *sigh* Any suggestions what I could do? -peter ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: Parsing date and time specifications
On 19 Dec 2002, Peter Simons wrote: (snip) datatype. It appears that in order to construct one of those, I need _all_ the information it contains, including the weekday (Day) and the number of the day in the year. The problem now is that I do not have this information! Of course I could calculate these values by hand, but this is immensely complicated. (snip) Any suggestions what I could do? I have some calendar calculation code in Haskell from which I could easily generate code to calculate the weekday (Day) and the number of the day in the year, if it turns out you do end up needing it. -- Mark ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: Interpret haskell within haskell.
--- David Sankel [EMAIL PROTECTED] wrote: I was wondering if there is any project that aims to interpret haskell within haskell. http://www.haskell.org/implementations.html quote type=partial GHC, the Glasgow Haskell Compiler The Glasgow Haskell compiler is a full implementation of Haskell. It is itself written in Haskell and is designed to act as a substrate for the research work of others. The source code is freely available. It produces fast code. /quote The GHC interpreter is ghci. (It's not as slow anymore.) http://www.haskell.org/ghc/ The other Haskell interpreters also load and interpret users' Haskell source code, as well. If you have defined functions in myprog.hs: :load myprog.hs then the functions defined in the file are available, or else you'll get error message(s) about problems found parsing myprog.hs. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: Interpret haskell within haskell.
[Christopher Milton [EMAIL PROTECTED]] --- David Sankel [EMAIL PROTECTED] wrote: I was wondering if there is any project that aims to interpret haskell within haskell. [... snipped intro to ghci ...] If you have defined functions in myprog.hs: :load myprog.hs then the functions defined in the file are available, or else you'll get error message(s) about problems found parsing myprog.hs. I'm not sure this is quite what he's asking for. For many projects it is useful to be able to dynamically (and programatically) load and evaluate arbitrary chunks of code for one reason or another. I previously inquired about using Haskell as an extension language, which is one application of this idea. There are many others. The ability to do this, and hopefully to do it in a simple, well-specified (and well-integrated into the rest of the language) way is perceived as a major benefit of using many high-level languages. The classic example, obviously, is lisp, where constructs to do exactly this are an integral part of the language's design. So it seems natural, especially to new users, to hope that Haskell and the ML variants, sharing many other features common to these languages, would offer this facility as well. The answer, in general, is that they do not. In many ways, this is a shame. In languages that support it cleanly, the ability to parse, manipulate and evaluate programs in an abstract, reflective way is wonderful. I suppose there's no need for examples, but I'd be happy to argue the point if there's disagreement. :) I know that I personally would love it if, as part of the language definition, Haskell and ML provided the ability to do these types of things. I'm not sure that I really understand all the reaons why this hasn't been done. I have some ideas, and I'd be very curious to know how far off the mark they are... In fact, I think this would make a wonderful Not-so-frequently Asked Question for the Wiki, if we could get together a good list of reasons why this is hard/inappropriate for Haskell. (If we can't, I nominate it to go into Haskell 2... :) In any case, here are my guesses at why Haskell doesn't have eval: - It is difficult to make the kind of run-time safety guarantees that we are used to with Haskell/ML if we introduce constructs of this kind. - It would seem to require considerable typing information to be carried around at run-time, which in general Haskell compilers seem to rely on being able to avoid. More generally, it may render unsafe a wide range of optimizing program transformations. - It would require the run-time for potentially every program to be considerably larger, carrying around an entire interpreter. - It has not, historically, been a priority for the community. The FP community has tended to focus more on safety and static analysis, as well as efficiency of compiled output. The general answer has been, Well, if you want that, you should be using lisp/scheme/etc. Are those reasons basically right, basically wrong, somewhere in the middle? If it's actually mostly the final reason, I wonder if the idea deserves more consideration. Has the idea been revisited in light of monadic control flow, type classes and other relatively recent developments? Would it be possible, in this case, to have our cake and eat it too? Matt -- Matt Hellige [EMAIL PROTECTED] http://matt.immute.net ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe