RE: [Haskell] Building from source

2004-10-06 Thread Simon Marlow
On 06 October 2004 10:10, Christian Maeder wrote: > after checking out fptools from cvs. The simple sequence > > $ autoreconf > $ ./configure > $ make > > failed in the directory hood, because the target boot is unknown > there. Could/Should this be fixed? > > I know how to use mk/build.mk and t

RE: [Haskell] Hyperlinking problem in Haddock

2004-07-22 Thread Simon Marlow
On 20 July 2004 19:40, Adrian Hey wrote: > Does anybody know how you hyperlink your Haddock to functions > whose name ends with a prime. e.g. foldl' > > I've tried.. > 'foldl\'' > and > 'foldl'' > > But neither works. In each case I get a link to foldl (unprimed > version) followed b

RE: [Haskell] GHC fixes for alternative main module/function on general release?

2004-07-16 Thread Simon Marlow
On 14 July 2004 16:02, Graham Klyne wrote: > I recall there was a problem with the options for specifying > alternative main module/function names in the last release of GHC > that I tested with. Is this now fixed in a generally released > version? The -main-is fixes were in 6.2.1. Cheers,

RE: [Haskell] modern language design, stone age tools

2004-06-24 Thread Simon Marlow
On 24 June 2004 11:54, MR K P SCHUPKE wrote: > With reference to "mapException", I thought this seemed a good idea. > I like the 'AnnotatedException' idea... this is much better than > concatenating strings... However for not I thought I would test it > as is, but it doesn't work as I thought - pe

RE: [Haskell] modern language design, stone age tools

2004-06-24 Thread Simon Marlow
On 24 June 2004 10:31, Alastair Reid wrote: >> [...] >> 2. Use the mapException trick to annotate exceptions as they >> travel up the stack (see Alastair Reid's message). [...] >> (2) requires that you add lots of annotations to your code, so it's >> not entirely satisfactory for that rea

RE: [Haskell] modern language design, stone age tools

2004-06-24 Thread Simon Marlow
On 23 June 2004 18:39, Fergus Henderson wrote: > On 23-Jun-2004, MR K P SCHUPKE <[EMAIL PROTECTED]> wrote: >> This may not be the right answer to the question (which is of >> course lets write a debugger) - But I have never used a debugger, >> and find them more or less the most unfriendly and use

RE: [Haskell] modern language design, stone age tools

2004-06-23 Thread Simon Marlow
On 23 June 2004 09:27, Robert Ennals wrote: > I wrote such a debugger as part of my PhD work. It is called > "hsdebug" and you can read the Haskell Workshop paper on it here: > > http://www.cambridge.intel-research.net/~rennals/hw2003.pdf > > Unfortunately, HsDebug depends on Optimistic Evaluati

RE: [Haskell] comment on language shootout

2004-06-18 Thread Simon Marlow
On 18 June 2004 13:50, Gour wrote: > Any comment from some experienced Haskell programmer about the latest > language shootout published on: > > http://shootout.alioth.debian.org/index.php > > regarding Haskell (ghc-6.2.1) score? I submitted improved versions for some of the benchmarks. My f

RE: [Haskell] Re: sizeFM type

2004-04-28 Thread Simon Marlow
On 26 April 2004 19:45, Don Groves wrote: > Hello, Haskell newbie here. > > Some languages handle the Int/Integer question automatically, > determined by the size of the integer in question. Int is used > until the integer excedes what the underlying architecture can > handle, then the switch is

[Haskell] ANNOUNCE: Happy version 1.14

2004-04-14 Thread Simon Marlow
A new version of Happy, the parser generator for Haskell, has been released. Version 1.14 is a small increment relative to 1.13, whose purpose is mainly to introduce one new feature which will be reuqired to compile future versions of GHC. >From the release notes: * New meta-veriable $>

RE: [Haskell] overuse of maybe and [] in prelude and libs

2004-04-13 Thread Simon Marlow
> But, either way, I'm assuming I can't do this > (making up syntax): > >import Data.FiniteMap using MyPrelude as Prelude > > So that every place in FiniteMap that Prelude > functions are called, MyPrelude functions are > called instead? Then I could simply redefine just > and nothing as r

RE: [Haskell] Dynamically loading wxhaskell?

2004-04-01 Thread Simon Marlow
> Has anyone succeeded in getting wxhaskell to work under ghci on Linux? > On my system, I get an error message > > Loading package unix ... ghc-6.2: can't load .so/.DLL for: dl > (libdl.so: cannot open shared object file: No such file or directory) > > This sounds like it has nothing to do wi

RE: [Haskell] Programming language shootout (completing the Haskell entry)

2004-03-31 Thread Simon Marlow
> On Tue, 30 Mar 2004, Simon Marlow wrote: > > > The upshot of what he found is that we could benefit from some > > prefetching, perhaps on the order of 10-20%. Particularly > prefetching > > in the allocation area during evaluation, to ensure that > memory ab

RE: [Haskell] Programming language shootout (completing the Haskell entry)

2004-03-30 Thread Simon Marlow
> >From: John Hughes <[EMAIL PROTECTED]> > >Actually the cache behaviour of code generated by GHC isn't > at all bad. > >I know because I ran a student project a couple of years ago to > >implement cache-friendly optimisations. The first thing they did was > >cache profiling of some benchmark

RE: [Haskell] reasons for non-portability

2004-03-22 Thread Simon Marlow
> Thanks for the info. > > Well, according to that explanation, all modules would be > non-portable since > the Prelude is normally implemented using non-standard > features. I think, > this is solved by declaring all modules described in the > Haskell 98 Report > portable. > > One quest

RE: [Haskell] GHC binary for Cygwin

2004-03-22 Thread Simon Marlow
> The other day, I tried to compile the Fudgets library with > GHC-MinGW. It > didn't work, of course, and having GHC for Cygwin would presumably > significantly reduce the amount of pain required to port it. (Support > for certain Posix system calls and symbolic links would be helpful.) > >

[Haskell] ANNOUNCE: GHC version 6.2.1

2004-03-22 Thread Simon Marlow
The (Interactive) Glasgow Haskell Compiler -- version 6.2.1 We are pleased to announce a new patchlevel release of the Glasgow Haskell Compiler (GHC), version 6.2.1.

[Haskell] RE: Win32 process spawning, POpen and Hugs, revisited

2004-03-17 Thread Simon Marlow
On a related note, I recently implemented a System.Process library on Unix. Source code attached. The Windows implementation should be relatively straightforward. Porting it to Hugs will require System.Posix.forkProcess, but I don't see any great difficulties there. One warning: if you want t

RE: [Haskell] System.Random

2004-03-02 Thread Simon Marlow
> Now, I don't understand this at all... > > All the development of the Random stuff in all languages has nothing > of random whatsoever. Perhaps *some* people like to seed the generator > with the clock time, but most *real* developers *known to me* > usually choose > the seed deterministicall

RE: [Haskell] System.Random

2004-03-02 Thread Simon Marlow
> why is the Random module situated under System? Wouldn't > something like Data be more adequate? There is usually an external source of randomness, which is why the library in placed in System rather than Data. A purely functional random library would be rather less useful... Cheers,

RE: [Haskell] regular expression syntax - perl ain't got nothin on haskell

2004-02-24 Thread Simon Marlow
> At 18:07 23/02/04 -0800, John Meacham wrote: > >It provides regular and monadic versions, a very overloaded > and useful > >interface, as well as extensibility. although currently the only > >instance is based on Text.Regex, it generalizes to matching lists of > >arbitrary type, not just stri

RE: [Haskell] non-ASCII characters in Haddock documentation

2004-02-17 Thread Simon Marlow
> >It may seem so to western europeans, but others may differ. > >A case could be made for UTF-8. > > I tend to agree. Further, the choice of defaulting to > Latin-1 seems a > strange one when much of the rest of the world (well, the > networking world) > seems to be moving towards more uni

RE: [Haskell] non-ASCII characters in Haddock documentation

2004-02-16 Thread Simon Marlow
> On Mon, Feb 16, 2004 at 10:20:30AM -0000, Simon Marlow wrote: > > Wolfgang Jeltsch <[EMAIL PROTECTED]> writes: > > > I meant non-ASCII characters in source code comments like this: > > > {-| > > > The execution time of this function is /

RE: [Haskell] non-ASCII characters in Haddock documentation

2004-02-16 Thread Simon Marlow
> Am Freitag, 13. Februar 2004 01:23 schrieben Sie: > > wolfgang: > > > Hello, > > > > > > how do I insert non-ASCII and maybe even non-Latin-1 characters in > > > Haddock documentation? > > > > > > Wolfgang > > > > Looks like it might be difficult. The haddock lexer src has: > > > > $alp

RE: [Haskell] GHC 64bit?

2004-02-13 Thread Simon Marlow
> Dell's poweredge server with the max 12gb RAM costs $15k. > Moore's law says that > 1. you only need an extra bit/year. > 2. processing that extra bit will cost 50% less next year > > Though perhaps processing time is not linear with > the number of bits for historical/architectural > reasons.

RE: [Haskell] GHC 64bit?

2004-02-13 Thread Simon Marlow
> alex: > > Is there a maximum memory GHC can use/reach? > > Specifically, can GHC address more than 4gb of > > memory? > > SimonM may want to comment, but at the moment I think GHC is > limited to > 4G, but only due to lack of 64bit machines/demand on the developers. > > If you look in ghc/rt

[Haskell] Call for Workshop Proposal:GPCE'04 -- Generative ProgrammingandComponent Engineering

2004-02-13 Thread Simon Marlow
[ posted on behalf of Benaissa, Zino <[EMAIL PROTECTED]> ] CALL FOR WORKSHOP PROPOSALS - Third International Conference on Generative Programming and Component E

RE: [Haskell] Haddock index

2004-02-02 Thread Simon Marlow
> Am Sonntag, 1. Februar 2004 23:57 schrieb Wolfgang Jeltsch: > > Hello, > > > > I've generated Haddock HTML documentation for some modules. > There are > > doc-index-.html files for 15 letters. > Surprisingly, doc-index.html > > shows only the letters C, D, F, G, I and T. What's wrong here?

RE: [Haskell] Re: Use of tab characters in indentation-sensitive code

2004-01-26 Thread Simon Marlow
> Wolfgang Thaller writes (to the Haskell mailing list): > > > IMHO, there should only be warnings about tabs when their > > size makes a difference to the meaning of the program, > > I agree and would suggest an even more stringent test to > warn against > > > a = let x = 1 > > y = 2

RE: Haddock and fixity declarations

2004-01-15 Thread Simon Marlow
> could Haddock be made to document also fixity declarations? Yes, it's on the ToDo list. Cheers, Simon ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

RE: class ??? with Haddock

2004-01-08 Thread Simon Marlow
> > Am Donnerstag, 8. Januar 2004 11:02 schrieben Sie: > > > [...] > > > > > Anyway, you can use GHC to preprocess your source files > > before feeding > > > them to Haddock: > > > > > >$ ghc -E -cpp -D__HADDOCK__ Foo.hs -o Foo.raw-hs > > > > This only replaces all __HADDOCK__ occurences w

RE: class ??? with Haddock

2004-01-08 Thread Simon Marlow
> Am Donnerstag, 8. Januar 2004 11:02 schrieben Sie: > > [...] > > > Anyway, you can use GHC to preprocess your source files > before feeding > > them to Haddock: > > > >$ ghc -E -cpp -D__HADDOCK__ Foo.hs -o Foo.raw-hs > > This only replaces all __HADDOCK__ occurences with 1 but > doesn't

RE: class ??? with Haddock

2004-01-08 Thread Simon Marlow
> How do I instruct Haddock to preprocess the Haskell files. > From your mail I > thought that Haddock would do so by default but it complains > at the first > #ifdef it sees. Unfortunately, I didn't find any Haddock > option similar to Hugs' -F. I should really put this in the manual, si

RE: Haddock and man pages

2004-01-05 Thread Simon Marlow
> I think there is some software to translate some DocBook > derivate to man > pages. Maybe one could use the DocBook export mechanism of > Haddock for man > page production. Just and idea. Haddock's DocBook output support needs a lot of work - I originally started on the DocBook output be

RE: safe array freezing?

2004-01-05 Thread Simon Marlow
> so, A common idiom when using Control.Monad.ST is to do some > complicated, state using computation to compute a big array which is > then used purely functionally as a read-only array in the rest of the > program. > > to avoid the cost of copying the array at the end, we are > forced to use

RE: haddock (and -- $)

2003-12-18 Thread Simon Marlow
> hello. a few comments and questions on haddock > (www.haskell.org/haddock/) > > 1. haddock is great Thanks ;) > 2. haddock's interpretation of "-- $" is un-great: > > I have two types of "-- $" occurences in my code > that conflict with haddock's idea of "named doc chunks" > > a. CVS macr

ANNOUNCE: GHC version 6.2

2003-12-16 Thread Simon Marlow
The (Interactive) Glasgow Haskell Compiler -- version 6.2 We are pleased to announce a new major release of the Glasgow Haskell Compiler (GHC), version 6.2. Highlig

RE: Why are strings linked lists?

2003-12-09 Thread Simon Marlow
> > GHC 6.2 (shortly to be released) also supports toUpper, toLower, and > the > > character predicates isUpper, isLower etc. on the full Unicode > character > > set. > > > > There is one caveat: the implementation is based on the C library's > > towupper() and so on, so the support is only as g

RE: Why are strings linked lists?

2003-12-08 Thread Simon Marlow
> But then... what trick does GHC use to prevent CAF leaks? No tricks really, the garbage collector traces references from code as well as references from the heap to find all the live data. Of course, it doesn't actually examine the code; each code segment comes with a list of top-level closur

RE: Why are strings linked lists?

2003-12-08 Thread Simon Marlow
> Even in unoptimized, byte-code compiled code? > > Take this module: > > module A where > > t :: IO () > t = sequence_ (repeat (return ())) > > If I :load it into ghci as interpreted, or if I compile it without > optimisation options, and I run t, then the process grows, and grow

RE: Why are strings linked lists?

2003-12-08 Thread Simon Marlow
> On Sat, Nov 29, 2003 at 11:10:57AM -0500, Wojtek Moczydlowski wrote: > > > > (though it still bothers me that I don't have an answer yet to the > > memory leak I posted some time ago) > > If you are talking about StateT space leak, then I think I have given > you an answer. My guess was that

RE: Why are strings linked lists?

2003-12-08 Thread Simon Marlow
> Unless I'm missing something, the only "support" that GHC provides is > that Char is 4 bytes. GHC 6.2 (shortly to be released) also supports toUpper, toLower, and the character predicates isUpper, isLower etc. on the full Unicode character set. There is one caveat: the implementation is based o

RE: How to best add logging/debugging code?

2003-11-27 Thread Simon Marlow
> Manuel M T Chakravarty wrote: > > > There is `Debug.Trace.trace' for this: > > > > http://haskell.org/ghc/docs/latest/html/base/Debug.Trace.html > > > > However, if you want to log as opposed to debug, you may > > want to have the output go to somewhere else but stdout. > > Hence, it might

RE: ANNOUNCE: Haddock version 0.6

2003-11-24 Thread Simon Marlow
> In article <[EMAIL PROTECTED]>, > "Simon Marlow" <[EMAIL PROTECTED]> wrote: > > > There is a new release of Haddock, version 0.6. This > version has several > > improvements over the previous release; the full list is below. > > Exce

RE: Haddock and DocBook

2003-11-21 Thread Simon Marlow
> the Haddock documentation says: > -S, --docbook > Reserved for future use (output documentation in SGML > DocBook format). > I would appreciate very much if the output wouldn't be just > in SGML DocBook > but in XML DocBook format. Would it be possible to implement > it this way?

RE: Haddock and Template Haskell

2003-11-21 Thread Simon Marlow
> is Haddock compatible with Template Haskell or does it get > confused by $(...) > syntax? If it is compatible, how does the documentation of > TH-generated code look? There are two issues: Q. Will Haddock parse a file containing Template Haskell code? A. No, the parser doesn't currently

RE: ANNOUNCE: Haddock version 0.6

2003-11-12 Thread Simon Marlow
> On Tue, 11 Nov 2003 11:01:00 -, "Simon Marlow" > <[EMAIL PROTECTED]> wrote: > > > There is a new release of Haddock, version 0.6. > > Are interface files binary-incompatible with those of > previous releases? > > With a Cygwin-compiled

ANNOUNCE: Haddock version 0.6

2003-11-11 Thread Simon Marlow
There is a new release of Haddock, version 0.6. This version has several improvements over the previous release; the full list is below. Source and binary distributions can be obtained from Haddock's homepage: http://www.haskell.org/haddock/ Enjoy! Simon Changes in version 0.6: * Impl

RE: Calling an external command from a Haskell program

2003-10-21 Thread Simon Marlow
> PS. why the differences in default access to standard modules? > should GHC be more restrictive there? No, this is a feature. See http://www.haskell.org/ghc/docs/latest/html/users_guide/x1097.html#GHCI-SCOPE in particular section 3.4.1.1. Cheers, Simon __

RE: About Haskell Thread Model

2003-10-21 Thread Simon Marlow
> On Mon, Oct 13, 2003 at 11:13:56AM +0200, Wolfgang Thaller wrote: > > The reason why we currently do not take advantage of SMP is > that the > > Haskell Heap is a shared data structure which is modified > whenever a > > thunk (an unevaluated expression) is evaluated. Using > synchronisatio

RE: IO behaves oddly if used nested

2003-10-03 Thread Simon Marlow
Alastair Reid writes: > ... Thus, we have Show instances for -> and IO ... Actually, you have to explicitly import Text.Show.Functions to get the Show instance for (->). Cheers, Simon ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskel

RE: "interact" behaves oddly if used interactively

2003-10-01 Thread Simon Marlow
> Pardon? Haskell is a non-strict language. Using 'interact' is one of > numerous situations where one takes advantage of non-strict semantics. > (Keith just gave a different example.) > > Non-strict semantics does not prescribe the evaluation order, although > usually lazy evaluation is used. I

RE: "interact" behaves oddly if used interactively

2003-10-01 Thread Simon Marlow
Malcolm Wallace writes: > But the whole purpose of 'interact' is to use its argument as the > demanding function which drives lazy consumption of the input. It is > *designed* to reveal the evaluation behaviour, by hoisting it into > the I/O monad. This is why interact is bad, IMO: it forces you

RE: "interact" behaves oddly if used interactively

2003-09-30 Thread Simon Marlow
> For GHC (6.0.1) > > "main=interact id" basically echoes every line of my input, whereas > "main=interact show" correctly waits for EOF before > outputting something. Which of these are you claiming is wrong? This is the behaviour I'd expect in both cases (although I'd have to go and careful

RE: Library Infrastructure Proposal & Home Page

2003-09-26 Thread Simon Marlow
I think the proposal is great. Here's some random comments: It might be worth saying earlier on that the library infrastructure is expected to be a layer underneath the platform's native package support (if such support exists). For example, I've never used Python's Distutils, but I have a bunch

RE: echoing of getChar, getLine, getContents

2003-09-22 Thread Simon Marlow
> The report states about getChar, getLine, and getContents: > > "By default, these input functions echo to standard output." > > In version 1.3 of the report, it used to continue > "Functions in the I/O library provide full control over echoing." > > Apparently, this has been removed and the

RE: Syntax extensions (was: RE: The Future of Haskell discussionat the Haskell Workshop)

2003-09-17 Thread Simon Marlow
>{-# LANGUAGE #-} > > where is one or more (if compatible) of keywords like > > Haskell98 Pure Haskell 98, no extensions. > SharedExtenisons (Haskell02???) A set of agreed-upon extensions > implemented by all "major"

RE: lexer puzzle

2003-09-15 Thread Simon Marlow
> I agree with Marcin, > > A... should be split into "A.." and "." > > As I read the (on-line) report the "maximal munch" rule says that you > should read the longest lexeme. It does not say that two > operators have > to be separated by whitespace. > > Because A... is not a lexeme, the lon

RE: lexer puzzle

2003-09-15 Thread Simon Marlow
Iavor Diatchki writes: > what do people think should be the tokens produced by a haskell lexer > when applied to the following input: > >A... This has been discussed before (a while back, admittedly). See: http://www.mail-archive.com/[EMAIL PROTECTED]/msg04054.html GHC (still) gets thi

RE: Syntax extensions (was: RE: The Future of Haskell discussion at the Haskell Workshop)

2003-09-11 Thread Simon Marlow
Mark Jones writes: > As a solution to that problem, the many-command-line-options > scheme described seems quite poor! It's far too tool specific, > not particularly scalable, and somewhat troublesome from a software > engineering perspective. We're not talking about a choice between > two poin

Syntax extensions (was: RE: The Future of Haskell discussion at the Haskell Workshop)

2003-09-10 Thread Simon Marlow
> > I also think that having backwards compatability is not much of an > > issue. After all, ghc has introduces a number of not backward > > compatable changes to haskell, and I never heard any complaints. > > Oh no? > > Implicit parameters: I'm sure it is a great thing, but I'd already > us

RE: Haskell for non-Haskell's sake

2003-09-05 Thread Simon Marlow
> I implemented a trivial "database", stored in ordinary files, > and had to > ensure mutual exclusion of database access between > simultaneously running > CGI scripts. Since each CGI run is short, I simply locked the entire > database for the entire run. Claiming a lock on a file is > easy i

RE: Haskell-report, chapter 3 - Expressions

2003-08-28 Thread Simon Marlow
> I do not completely understand the first part of chapter 3 of the > Haskell-report. > Concretely I am stumbling about the notation of nonterminals > indexed by > their precedence > level. This should be a number ranging from 0 to 9. But what > about this exp^{10} production rule? The gramm

RE: Exhaustive Pattern-Matching

2003-08-27 Thread Simon Marlow
> I have a question about pattern-matching. In the Haskell-report it is > not postulated, that > pattern matching has to be exhaustive. Would it be possible at all to > implement an > algorithm, which checks Haskell-style patterns for > exhaustiveness? What > kinds of > complication can be ex

RE: more unsafePerformIO questions ([...])

2003-08-19 Thread Simon Marlow
> On Tuesday, 2003-08-19, 13:18, Simon Marlow wrote: > > [...] > > > Yes, I agree that one shouldn't rely on the "no duplication of work" > > property. However, folloing this argument we arrive at the > conclusion that > > hGetContents is

RE: more unsafePerformIO questions (is it safe to use with ReadMode Handles)?

2003-08-19 Thread Simon Marlow
> >> Isn't there the possibility of inlining causing a read to > >> happen twice even if it only appears to happen once? > > > >In theory that would be a valid transformation, but in practice no > >compiler would duplicate arbitrary computations. GHC > certainly doesn't. > > I was thinking of

RE: more unsafePerformIO questions (is it safe to use with ReadMode Handles)?

2003-08-19 Thread Simon Marlow
> >If the databases *do* change over time, then there are two > >possibilities: > > > > 1. the contents change due to external factors only > > 2. the contents change because this program doing the writing > > > >in (1), you can still pretend the interface is pure, by > imagining that > >all t

RE: more unsafePerformIO questions (is it safe to use with ReadMode Handles)?

2003-08-19 Thread Simon Marlow
> I'm finishing up my Haskell interface to WordNet > (http://www.cogsci.princeton.edu/~wn/) and have a standard > unsafePerformIO question :). > > Basically, the interface functions by first calling an initialization > function, 'initializeWordNet :: IO WordNetEnv'. WordNetEnv is > essentially

ANNOUNCE: Alex version 2.0

2003-08-14 Thread Simon Marlow
and enjoy, Simon Marlow: [EMAIL PROTECTED] Chris Dornan: [EMAIL PROTECTED] Isaac Jones: [EMAIL PROTECTED] ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

RE: literate scripts.

2003-08-14 Thread Simon Marlow
> Ghc should not accept this code, because, no matter how the > unliterating > is achieved, it is illegal for a literal string to contain a > literal newline character. Known bug in GHC. In the testsuite, but unfortunately not documented. Cheers, Simon __

RE: exceptions

2003-07-30 Thread Simon Marlow
> just out of curiosity, which is the proper idiom? > > trace a = r <- catch a (\e -> putStr "exceptional\n" >> throw e) > trace a = r <- catch a (\e -> putStr "exceptional\n" >> ioError e) > > I am worried that one might subtly change the semantics of an > execption > depending on how it wa

ANNOUNCE: GHC version 6.0.1

2003-07-30 Thread Simon Marlow
= The (Interactive) Glasgow Haskell Compiler -- version 6.0.1 = We are pleased to announce a new patchlevel release of the Glasgow Haskell Compiler (GHC), version 6.0.

ANNOUNCE: Haddock version 0.5

2003-07-28 Thread Simon Marlow
Haddock version 0.5 is released. Get it from here: http://www.haskell.org/haddock Not a great deal has changed from version 0.4, but you need the new version if you want to build it using recent versions of GHC. Also, several bugs have been fixed. This is the version of Haddock that we are

RE: Proposal for a new I/O library design

2003-07-28 Thread Simon Marlow
[ replies to [EMAIL PROTECTED] ] On the whole, I think this is a good direction to explore. I like the separation of Files from Streams: indeed it would remove much of the complication in the existing system caused by having Handles which can be both read and written. Also, it gives a nice way t

RE: Problems with working with Handles (PS)

2003-06-13 Thread Simon Marlow
> (moderator, can you please include this mail at the bottom of my > previous mail?) > > PS: I think the next example shows pretty well what goes wrong when > you're not closing the read-handle: > > --- > test = do writeFile' "123.txt" "blaat" > > appendFile' "123.txt" " 1" > z

RE: Typesafe MRef with a regular monad

2003-06-09 Thread Simon Marlow
Simon P.J. writes: > ... So it's reasonable that there should be some language extension. > I'm just looking for the minimal such extension. unsafeCoerce# is quite a minimal extension :-) Cheers, Simon ___ Haskell mailing list [EMAIL PROTECTE

RE: Haddock module description

2003-06-05 Thread Simon Marlow
> The Haddock document [1] section 3.3 gives a very simple > specification for > the module description, but the accompanying examples [2][3] > suggest that > certain common layout in the module description is picked up > and formatted > specially. Is there a description of this? Haddock

RE: ANNOUNCE: GHC version 6.0

2003-05-30 Thread Simon Marlow
> Congratulations on the new release. But out of curiosity, I've got to > ask... > > Why is the test suite now driven by a python script? Is this a > niche where a 'scripting' language was deemed more suitable than > haskell? The test driver makes use of 'eval'-style scripting

ANNOUNCE: GHC version 6.0

2003-05-30 Thread Simon Marlow
The (Interactive) Glasgow Haskell Compiler -- version 6.0 We are pleased to announce a new major release of the Glasgow Haskell Compiler (GHC), version 6.0. As with

RE: Two minor reports concerning GHC

2003-05-30 Thread Simon Marlow
> (1) unhelpful error message from GHCi: > > [[ > Compiling ParsecPrim ( F:\Haskell\Lib/ParsecPrim.hs, > interpreted ) > WARNING: ignoring polymorphic case in interpreted mode. > Possibly due to strict polymorphic/functional constructor args. > Your program may leak space unexpect

RE: Performance Timing

2003-03-27 Thread Simon Marlow
> timer f a = do > t1 <- get current time > evaluate (f a) > t2 <- get current time > return (different in t2 and t1) > > where evaluate is from Control.Exception. could someone tell me how > evaluate compares to seq and deepSeq? The documentation explains the difference, but it's a bit

RE: Web server code in Haskell by Simon Marlow?

2003-03-20 Thread Simon Marlow
> I am very interested in writing server programs in haskell. > > There is a link to a paper and code of haskell web server > in the following page. > > http://www.haskell.org/practice.html > > I can see the case study paper, but there is no code at > the link location. I think inspecting through

RE: flock and sockets

2003-03-19 Thread Simon Marlow
> I am planning a Haskell project and I need to access files. Since the > program will be automatically started whenever a mail comes > in I will need > to be able to lock the access to files. Is there any support > for this in some library? Yes, the Posix library distributed with GHC has suppor

RE: Problem with hierarchical libraries.

2003-03-12 Thread Simon Marlow
> > IIRC, something very similar was suggested a while back on > the libraries > > list, except that the form beginning with a dot was the > relative module > > name (actually I think I prefer it that way). > > this seems exactly the opposite of what all file systems do. i know > lateral think

ANNOUNCE: GHC vesrion 5.04.3 released

2003-03-11 Thread Simon Marlow
== The (Interactive) Glasgow Haskell Compiler -- version 5.04.3 == We are pleased to announce a new patchlevel release of the Glasgow Haskell Compiler (GHC), version 5

RE: Persistant (as in on disk) data

2003-03-06 Thread Simon Marlow
> a recent post reminded me of a feature i'd like. > for all i know it is already implemenetd in GHC so pointers > are welcome. > > i'd like to be able to dump data structures to disk, and later load > them. A Binary library was discussed recently on the libraries list. The thread starts here

RE: URI handling code in Haskell available

2003-03-06 Thread Simon Marlow
> Oops. I didn't find that. Thanks for the pointer. (Thinks: > does it work with HUGS?) It works with the latest hugs, November 2002 (use "hugs +N" to get the hierarchical libraries). > A significant amount of my work went into the test cases and > matching the > parsing code against the (

RE: HTTP protocol libraries

2003-03-05 Thread Simon Marlow
> From: Bayley, Alistair [mailto:[EMAIL PROTECTED] > > On a related note, what happened to the source code for the > Haskell Web > Server? > > http://research.microsoft.com/~simonmar/hws.tar.gz > > Is it no longer suitable for public consumption? (I have a > copy at home somewhere, though).

RE: Happy Alex

2003-02-28 Thread Simon Marlow
> I have successfully used the the excellent haskell tools > Happy and Alex in a > couple of parsing projects, but I have failed when trying to > combine a > monadic Happy grammar (using the %monad and %lexer > directives) together with > an Alex generated okenizer, nor are there any such e

RE: Yet another weakly defined bug report

2003-02-17 Thread Simon Marlow
> You should do the counting strictly: > > Just n -> case n+1 of n1 -> addToFM f w n1 Careful - that case expression doesn't actually force n to be evaluated. It's exactly equivalent to let n1 = n+1 in addToFM f w n1 You need to use seq to force evaluation. Cheers,

RE: Yet another weakly defined bug report

2003-02-14 Thread Simon Marlow
> What is the limit on open files, and why? I think it'd be nice to > just schedule a huge amount of IO operations, and have them all be > performed when required (i.e. when the FM is first accessed). > Apparently, my addDir took the trouble to open the files, but not > generate the FMs -- any ide

RE: Yet another weakly defined bug report

2003-02-14 Thread Simon Marlow
> > These things are always tricky to understand, which is why > I recommend > > not using lazy I/O. File reading is not a pure operation: > running out > > of file descriptors is a good counter-example. > > Without saying wether I agree with lazy I/O or not, I suggest that > this particular p

RE: Yet another weakly defined bug report

2003-02-13 Thread Simon Marlow
> The following code runs out of file handles, so I am seeking > enlightenment as to why. > > > -- | add data from a file to the histogram > > addFile :: FiniteMap String Int -> String -> IO (FiniteMap > String Int) > > addFile fm name = do > > x <- readFile name > > r

RE: time since the epoch

2003-02-11 Thread Simon Marlow
[snip] > It is always a problem to lump things with different semantics into > the same type :-) What I'm arguing is that there should be only one > fixed-duration offset datatype and it should be in terms of (seconds, > picoseconds). > Other fixed durations can be easily defined in terms of this >

RE: Evaluation Question

2003-01-13 Thread Simon Marlow
> For each call, I believe. An exception might be if the call to nco is > inlined into the calling function, but this is unlikely as nco is > recursive. > > So, you're probably better off with: > > > nco wn = nco' > > where wn' = cis wn > > nco' = 1 : map (wn'*) nco' > > In which

RE: Interpret haskell within haskell.

2002-12-20 Thread Simon Marlow
> 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

RE: Urgent Help: URI parser

2002-12-19 Thread Simon Marlow
> 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 (f

RE: IO confusion

2002-12-18 Thread Simon Marlow
> With "Foo" in the file c.out and the module > > \begin{code} > module Main (main) where > > import IO (openFile, hGetContents, hClose, IOMode(ReadMode)) > import System (getArgs) > import Monad (when) > > main :: IO () > main = do [x] <- getArgs > let you_want_it_to_work = read x >

RE: Running out of memory in a simple monad

2002-12-18 Thread Simon Marlow
> Simon Marlow <[EMAIL PROTECTED]> writes: > > Also, GHCi retains CAFs in the same way as Hugs, the difference is > > that GHCi can be configured to throw away the results after > > evaluation (:set +r). > > If I set this flag, does GHCi discard CAFs dur

RE: Running out of memory in a simple monad

2002-12-17 Thread Simon Marlow
Alastair Reid writes: > The workaround is simple enough: add a dummy argument to the CAF (so > that it is not a CAF any more): > >main _ = loop 5 > > and then specify the extra argument when invoking it: > >main () > > (This is a pretty standard optimisation technique: we're tradin

<    1   2   3   4   5   >