RE: Magically growing files

2000-09-25 Thread Simon Marlow
Thanks for a great bug report. There was indeed a bug (at least one), which I've just fixed in the CVS sources. The read buffer was being accidentally flushed as a write buffer by the hClose. I'm still not quite sure why this caused the file to grow, however. Workaround: don't use

test

2000-09-25 Thread root
1 2 3

SAX, XML, Haskell

2000-09-25 Thread Chris Angus
Hi, I looked at HaXml a while ago and it seemed to offer a very Dom-like interface. I was wondering if anyone had thought of making a Sax-like interface based on lazy evaluation. where tokens are processed and taken from a (potentially) infinite stream Chris

If you like Copper

2000-09-25 Thread simondudley2000
If you like copper, you will love DRC Resources: http://www.drcresources.com ***

Extensible data types?

2000-09-25 Thread Jose Romildo Malaquias
Hello. Is there any Haskell implementation that supports extensible data types, in which new value constructors can be added to a previously declared data type, like data Fn = Sum | Pro | Pow ... extend data Fn = Sin | Cos | Tan where first the Fn datatype had only

Re: Extensible data types?

2000-09-25 Thread S.J.Thompson
Erik Poll ([EMAIL PROTECTED]) did some nice theoretical work on this a couple of years ago. I took a quick look on his web site but couldn't see anything on it there. Maybe he can help? Simon

Re: Extensible data types?

2000-09-25 Thread Peter Ljunglof
Perhaps the subtyping of O'Haskell is interesting: http://www.cs.chalmers.se/~nordland/ohaskell/ /Peter Ljunglöf On Mon, 25 Sep 2000, Jose Romildo Malaquias wrote: Is there any Haskell implementation that supports extensible data types, in which new value constructors can be added to

Re: Extensible data types?

2000-09-25 Thread Axel Simon
On Mon, 25 Sep 2000, Jose Romildo Malaquias wrote: Is there any Haskell implementation that supports extensible data types, in which new value constructors can be added to a previously declared data type? I think this is what the TREX (extensible records) in Hugs are about. Take a look at

Re: Extensible data types?

2000-09-25 Thread Jose Romildo Malaquias
On Mon, Sep 25, 2000 at 11:37:24AM +0100, Chris Angus wrote: I've not seen this before, out of interest, why would you want/need such a thing? Is there any Haskell implementation that supports extensible data types, in which new value constructors can be added to a previously

Re: Extensible data types?

2000-09-25 Thread Jose Romildo Malaquias
On Mon, Sep 25, 2000 at 01:01:25PM +0200, Axel Simon wrote: On Mon, 25 Sep 2000, Jose Romildo Malaquias wrote: Is there any Haskell implementation that supports extensible data types, in which new value constructors can be added to a previously declared data type? I think this is what

Re: Extensible data types?

2000-09-25 Thread Ch. A. Herrmann
Hi, Jose I am working on an Computer Algebra system to transform Jose mathematic expressions, possibly simplifing them. There is a Jose data type to represent the expressions: Jose data Expr = Int Integer | Cte String | Var String | App Fn [Expr] Jose An expression may be

Re: Extensible data types?

2000-09-25 Thread Rob MacAulay
There is an interesting paper which includes a method of performing this extension in Gofer: "Monad Transformers and Monad Interpreters" by Liang, Hudak and Jones I think this should be available from Mark Jones' web site at OGI. Rob MacAulay Is there any Haskell implementation that

Re: Extensible data types?

2000-09-25 Thread Axel Simon
Is there any Haskell implementation that supports extensible data types, in which new value constructors can be added to a previously declared data type? I think this is what TREX (extensible records) in Hugs are about. Take a look at

RE: Extensible data types?

2000-09-25 Thread Chris Angus
Just wondering if you'd seen the dynamic datatype which basically gives you an "Any" in ghc/hugs -Original Message- From: Jose Romildo Malaquias [mailto:[EMAIL PROTECTED]] Sent: 25 September 2000 12:14 To: Chris Angus Cc: [EMAIL PROTECTED] Subject: Re: Extensible data types?

Re: Extensible data types?

2000-09-25 Thread John Hörnkvist
If you use Hugs -- and possibly GHC -- you might be able to use the "Either" constructor for subtyping. I first saw this pattern in "Modular Monadic Interpreters" (or something like that) by Jones, Liang and Hudak. [Apologies if I didn't get the attribution right.] data Expr a = Int

Re: Extensible data types?

2000-09-25 Thread Peter Achten
At 07:46 25-9-00 -0300, Prof. José Romildo Malaquias wrote: Hello. Is there any Haskell implementation that supports extensible data types, in which new value constructors can be added to a previously declared data type, like data Fn = Sum | Pro | Pow ... extend data

RE: Extensible data types?

2000-09-25 Thread Chris Angus
Presumably this means differentiation/integeration would have to be typed as diff :: (FnExt a,FnExt b) = a - b Chris -Original Message- From: Peter Achten [mailto:[EMAIL PROTECTED]] Sent: 25 September 2000 23:34 To: Jose Romildo Malaquias Cc: [EMAIL PROTECTED] Subject: Re:

How to force evaluation entirely?

2000-09-25 Thread Michael Marte
Hello, I am trying to process a huge bunch of large XML files in order to extract some data. For each XML file, a small summary (6 integers) is created which is kept until writing a HTML page displaying the results. The ghc-compiled program behaves as expected: It opens one XML file after the

Re: Extensible data types?

2000-09-25 Thread Keith Wansbrough
In the Clean Object I/O library we encountered a similar challenge and solved it using type constructor classes. The solution can also be used in Haskell. The basic idea is as follows: I didn't read your message in detail, but I wonder if this is related to the trick TclHaskell / FranTk

Re: Extensible data types?

2000-09-25 Thread Carl R. Witty
Jose Romildo Malaquias [EMAIL PROTECTED] writes: Hello. Is there any Haskell implementation that supports extensible data types, in which new value constructors can be added to a previously declared data type, like data Fn = Sum | Pro | Pow ... extend data Fn = Sin

Re: SAX, XML, Haskell

2000-09-25 Thread Joe English
Chris Angus wrote: I looked at HaXml a while ago and it seemed to offer a very Dom-like interface. You could say that it's DOM-like in that it deals with trees instead of an event stream, but it's actually somewhere in between SAX and DOM. The main difference between HaXML and DOM is that

Overloading

2000-09-25 Thread Carlos Camarao de Figueiredo
Myself and Lucilia ([EMAIL PROTECTED]) have modified Mark Jones' program, "Typing Haskell in Haskell", (http://www.cse.ogi.edu/~mpj/thih) to support system CT (paper available at http://www.dcc.ufmg.br/~camarao/ct.ps.gz). (Thanks Mark.) The implementation is a prototype of system CT, mainly an

Re: SAX, XML, Haskell

2000-09-25 Thread Ketil Malde
Chris Angus [EMAIL PROTECTED] writes: I was wondering if anyone had thought of making a Sax-like interface based on lazy evaluation. where tokens are processed and taken from a (potentially) infinite stream Sure. While barely able to follow discussions about monadic parser combinators,

reusing vs. interact

2000-09-25 Thread Jose Emilio Labra Gayo
This is a simple question about reusing a piece of Haskell code I had an interactive program which used a function of type prg :: String - String prg = {- for example -} \(c:cs) - "first char = " ++ [c] To run that program I used run :: IO () run = interact prg Now, I want to reuse

RE: combinator parsers and XSLT

2000-09-25 Thread Doug Ransom
There is no need for "." or [^abc] as Haskell list operators can be used to "simulate" them. The following is from the C lexer and matches all visible characters and all characters except newline, respectively: visible = alt [' '..'\127'] anyButNL = alt (['\0'..'\255'] \\

Re: Intel is in the .NET?

2000-09-25 Thread Fergus Henderson
On 25-Sep-2000, Simon Peyton-Jones [EMAIL PROTECTED] wrote: I couldn't find a description of the virtual machine or its instruction set, though I downloaded the bits. Indeed, I concluded that it must, implicitly, be a JVM implementation, which is why they didn't specify it. Has anyone else

Re: Patterns Catalog

2000-09-25 Thread Keith Wansbrough
I have thought of a few "functional patterns" ... there may be repeats in these as they were rattled off last night when I was half asleep. I must have missed some though ... anyone? I have placed this list on the Haskell Wiki, at http://haskell.org/wiki/wiki?CommonHaskellIdioms Please,

Re: read from URL

2000-09-25 Thread Keith Wansbrough
hmm. Actually I wanted to write CGI scripts, interpreted by Hugs. Is this Socket.hi only a lib for GHC? I mean is there anything simular for Hugs? I would prefer to develop my CGI's with Hugs (for I don't have GHC on my system) and run them as scripts. OK, the `cheat' way to do it would

RE: combinator parser and XSLT

2000-09-25 Thread Doug Ransom
I think it would be useful if you could post the reparser stuff. I think it would be really cool if we could parse the xml in a lazy fashion so that the entire tree might not come into memory at once. i.e. let x=parse xml in (y,z)=processXml(someAlgebra,x) like the circular rep-min

Re: reusing vs. interact

2000-09-25 Thread Jeffrey Straszhiem
On Mon, Sep 25, 2000 at 05:17:15PM +0200, Jose Emilio Labra Gayo wrote: I had an interactive program which used a function of type prg :: String - String prg = {- for example -} \(c:cs) - "first char = " ++ [c] To run that program I used run :: IO () run = interact prg Now,

RE: combinator parsers and XSLT

2000-09-25 Thread Manuel M. T. Chakravarty
Doug Ransom [EMAIL PROTECTED] wrote, There is no need for "." or [^abc] as Haskell list operators can be used to "simulate" them. The following is from the C lexer and matches all visible characters and all characters except newline, respectively: visible = alt [' '..'\127']