Re: [Haskell-cafe] Constructing a datatype given just its constructor as a string?

2007-06-25 Thread Benja Fallenstein
Hi Hugh, 2007/6/25, Donald Bruce Stewart [EMAIL PROTECTED]: hughperkins: Just noticed that all my responses have been going only to Neil, not to the group. Anyway, the jist of our conversation was that it's not possible to create arbitrary datatypes/constructors from

Re: [Haskell-cafe] Practical Haskell question.

2007-06-25 Thread Daniil Elovkov
2007/6/25, Michael T. Richter [EMAIL PROTECTED]: Now I've got a situation I can't figure out how to resolve. I want to have a set of actions which are executed sequentially, but which, before I even start to execute the first one, have been inspected for legality and/or plausibility.

Re: [Haskell-cafe] Practical Haskell question.

2007-06-25 Thread Tomasz Zielonka
On Mon, Jun 25, 2007 at 10:29:14AM +0200, Henning Thielemann wrote: Imagine all performActions contain their checks somehow. Let performActionB take an argument. do x - performActionA y - performActionB x z - performActionC return $ calculateStuff x y z Now

Re: [Haskell-cafe] Practical Haskell question.

2007-06-25 Thread Henning Thielemann
On Mon, 25 Jun 2007, Tomasz Zielonka wrote: On Mon, Jun 25, 2007 at 10:29:14AM +0200, Henning Thielemann wrote: Imagine all performActions contain their checks somehow. Let performActionB take an argument. do x - performActionA y - performActionB x z - performActionC

Re: [Haskell-cafe] Practical Haskell question.

2007-06-25 Thread Wouter Swierstra
Hi Michael, On 25 Jun 2007, at 06:39, Michael T. Richter wrote: do x - performActionA y - performActionB z - performActionC return $ calculateStuff x y z I don't know about you're exact example, but here's what I'd do. Control.Monad has functions like when, unless, and guard that

Re: [Haskell-cafe] Practical Haskell question.

2007-06-25 Thread Pepe Iborra
There is a related discussion, with a lot of pointers, in a recent D.Piponi blog post: http://sigfpe.blogspot.com/2007/04/homeland-security-threat-level- monad.html On 25/06/2007, at 10:58, peterv wrote: I'm baffled. So using the Arrow abstraction (which I don't know yet) would solve

Re: [Haskell-cafe] Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-25 Thread Dave Bayer
On Jun 22, 2007, at 3:11 PM, Brandon S. Allbery KF8NH wrote: (1) any way to flag a pattern match as I know this is okay, don't warn about it without shutting off pattern match warnings completely? GHC doesn't issue warnings about patterns on the left of = For example, the following code

RE: [Haskell-cafe] Practical Haskell question.

2007-06-25 Thread Michael T. Richter
OK, just to prevent this getting side-tracked: I'm absolutely uninterested in the results of performActionA before determining if performActionB is permitted/possible/whatever. Think more in terms of security permissions or resource availability/claiming than in terms of chaining results. I want

Re: [Haskell-cafe] Practical Haskell question.

2007-06-25 Thread Benja Fallenstein
Hi Peter, 2007/6/25, peterv [EMAIL PROTECTED]: I'm baffled. So using the Arrow abstraction (which I don't know yet) would solve this problem? How can (perfectActionB x) be checked with without ever executing performActionA which evaluates to x? This can only be done when x is a constant

RE: [Haskell-cafe] Practical Haskell question.

2007-06-25 Thread peterv
I'm baffled. So using the Arrow abstraction (which I don't know yet) would solve this problem? How can (perfectActionB x) be checked with without ever executing performActionA which evaluates to x? This can only be done when x is a constant expression no? -Original Message- From: [EMAIL

Re: [Haskell-cafe] Practical Haskell question.

2007-06-25 Thread Henning Thielemann
On Mon, 25 Jun 2007, Daniil Elovkov wrote: 2007/6/25, Michael T. Richter [EMAIL PROTECTED]: Now I've got a situation I can't figure out how to resolve. I want to have a set of actions which are executed sequentially, but which, before I even start to execute the first one, have been

[Haskell-cafe] SYB with class, simplified

2007-06-25 Thread Benja Fallenstein
Hi all, The scrap your boilerplate with class sytstem [1] has two big advantages over the plain SYB system from Data.Generics, IMHO: One, it lets you declare an 'open' generic function as a type class, to which new cases can be added by adding new instances (emphasized in the paper); and two, it

Re: [Haskell-cafe] Practical Haskell question.

2007-06-25 Thread Benja Fallenstein
2007/6/25, Michael T. Richter [EMAIL PROTECTED]: OK, just to prevent this getting side-tracked: I'm absolutely uninterested in the results of performActionA before determining if performActionB is permitted/possible/whatever. Think more in terms of security permissions or resource

[Haskell-cafe] Re: Practical Haskell question.

2007-06-25 Thread apfelmus
Wouter Swierstra wrote: I don't think you really want arrows here. The right idiom is applicative functors (see Control.Applicative). You could then write the above as: calculateStuff $ x * y * z I think you mean calculateStuff $ performActionA * performActionB * performActionC Regards,

RE: [Haskell-cafe] Practical Haskell question.

2007-06-25 Thread Henning Thielemann
On Mon, 25 Jun 2007, Michael T. Richter wrote: OK, just to prevent this getting side-tracked: I'm absolutely uninterested in the results of performActionA before determining if performActionB is permitted/possible/whatever. Think more in terms of security permissions or resource

[Haskell-cafe] Re: Practical Haskell question.

2007-06-25 Thread apfelmus
Benja Fallenstein wrote: Hi Peter, 2007/6/25, peterv [EMAIL PROTECTED]: I'm baffled. So using the Arrow abstraction (which I don't know yet) would solve this problem? How can (perfectActionB x) be checked with without ever executing performActionA which evaluates to x? This can only be done

Re: [Haskell-cafe] Practical Haskell question.

2007-06-25 Thread Dan Mead
Micheal, I think you mean do x - if .. then .. else .. y - if ... then.. else... etc etc On 6/25/07, Michael T. Richter [EMAIL PROTECTED] wrote: Now I've got a situation I can't figure out how to resolve. I want to have a set of actions which are executed sequentially,

Re: [Haskell-cafe] Practical Haskell question.

2007-06-25 Thread Claus Reinke
Now I've got a situation I can't figure out how to resolve. I want to have a set of actions which are executed sequentially, but which, before I even start to execute the first one, have been inspected for legality and/or plausibility. Consider this kind of sequence: do x - performActionA y

[Haskell-cafe] Re: Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-25 Thread apfelmus
Claus Reinke wrote: apfelmus wrote: True enough, in a sense, a dynamically typed language is like a statically typed language with only one type (probably several by distinguishing function types) and many incomplete pattern matches. So, you can embed a dynamically typed language into a

Re: [Haskell-cafe] Practical Haskell question.

2007-06-25 Thread Michael T. Richter
On Mon, 2007-25-06 at 12:19 +0300, Benja Fallenstein wrote: 2007/6/25, Michael T. Richter [EMAIL PROTECTED]: OK, just to prevent this getting side-tracked: I'm absolutely uninterested in the results of performActionA before determining if performActionB is

[Haskell-cafe] Re: Practical Haskell question.

2007-06-25 Thread apfelmus
Michael T. Richter wrote: It looked to me like there were people arguing about whether the x returned from one action was going to be used in the next action. Let me try and rephrase the question. :) [rephrase] Yes, and that's an important constellation your problem description does not

Re: [Haskell-cafe] Re: Practical Haskell question.

2007-06-25 Thread Henning Thielemann
On Mon, 25 Jun 2007, apfelmus wrote: Michael T. Richter wrote: It looked to me like there were people arguing about whether the x returned from one action was going to be used in the next action. Let me try and rephrase the question. :) [rephrase] Yes, and that's an important

RE: [Haskell-cafe] Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-25 Thread Simon Peyton-Jones
The intention is that it should be straightforward to suppress warnings. Warning about defaulting is important, because it's a place where a silent choice affects the dynamic semantics of your program. You can suppress the warning by supplying a type signature. In your example: | main = |

[Haskell-cafe] Re: FFI and Excel VBA

2007-06-25 Thread Simon Marlow
We don't recommend calling shutdownHaskell() from DllMain(). Some information here: http://haskell.org/haskellwiki/GHC/Using_the_FFI#Debugging_Haskell_DLLs It should be safe to call shutdownHaskell() (aka hs_exit()) *before* unloading a DLL, and before exiting the program. Cheers,

Re[2]: [Haskell-cafe] Practical Haskell question.

2007-06-25 Thread Bulat Ziganshin
Hello Michael, Monday, June 25, 2007, 2:10:28 PM, you wrote: Does this make more sense now? And can it be done somehow in Haskell? runCheckedCode = checkBeforeRun [actionA x y, actionB z t, actionC] actionA x y b | b = -- check conditions | otherwise = -- perform action

Re: [Haskell-cafe] problem implementing an EDSL in Haskell

2007-06-25 Thread Daniil Elovkov
Hi Conal 2007/6/24, Conal Elliott [EMAIL PROTECTED]: By embedded DSL, we usually mean identifying meta-language (Haskell) expressions with object language (DSL) expressions, rather than having an Exp data type. Then you just use meta-language variables as object-language variables. The new

[Haskell-cafe] Question about HList possibilities

2007-06-25 Thread Scott West
Hello all, Given an HList (http://homepages.cwi.nl/~ralf/HList/) would it be possible to do the following: Create a class/function/magicks that would essentially do what hOccursMany does, except it would not return a list of elements, but a new HList. For example, would this allow us to be able

Re: [Haskell-cafe] Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-25 Thread Dave Bayer
On Jun 25, 2007, at 4:48 AM, Simon Peyton-Jones wrote: The intention is that it should be straightforward to suppress warnings. Simply add a type signature for 'z', or for the naked 3 in z's definition. I constructed my example from larger modules peppered with small integer constants;

RE: [Haskell-cafe] Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-25 Thread Simon Peyton-Jones
| Unless I misunderstand and it is already possible, I'd now prefer a | language extension that allows the explicit declarations | | 2,3 :: Int | | once for each affected numeric literal. i2 = 2 :: Int i3 = 3 :: Int S ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Practical Haskell question.

2007-06-25 Thread Jon Cast
On Monday 25 June 2007, Michael T. Richter wrote: On Mon, 2007-25-06 at 01:05 -0500, Jon Cast wrote: What exactly are you trying to do? I'm trying to model a transactional system which could fail mid-transaction without an easy rollback on conditions which could be checked in advance. snip

Re: [Haskell-cafe] Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-25 Thread Dave Bayer
On Jun 25, 2007, at 8:15 AM, Simon Peyton-Jones wrote: i2 = 2 :: Int i3 = 3 :: Int The code {-# OPTIONS_GHC -Wall -Werror #-} module Main where i2 = 2 :: Int i3 = 3 :: Int main :: IO () main = putStrLn $ show (i2,i3) generates the errors Main.hs:5:0: Warning: Definition but no type

Re: [Haskell-cafe] Practical Haskell question.

2007-06-25 Thread Arie Peterson
As others have explained, you can't analyse your do-constructs, because functions are opaque -- at the value level. The canonical option would indeed seem to be to use arrows (or applicative functors), instead of monads. -- If you want to stick to monads, there is another possibility: carry

Re: [Haskell-cafe] Haskell version of ray tracer code is much slower than the original ML

2007-06-25 Thread Spencer Janssen
On Thu, 21 Jun 2007 11:55:04 +0100 Philip Armstrong [EMAIL PROTECTED] wrote: In odd spare moments, I took John Harrops simple ray tracer[1] made a Haskell version: http://www.kantaka.co.uk/cgi-bin/darcsweb.cgi?r=ray darcs get http://www.kantaka.co.uk/darcs/ray It's pretty much a

Re: [Haskell-cafe] Re: Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-25 Thread Derek Elkins
On Sun, 2007-06-24 at 13:33 +0100, Claus Reinke wrote: if you have a strongly and dynamically typed language, you can embed strongly and statically typed languages into it. by default, that means you get more type-checks than necessary and type-errors later than you'd wish, but you still get

Re: [Haskell-cafe] Practical Haskell question.

2007-06-25 Thread Arie Peterson
I wrote: If you want to stick to monads, there is another possibility: carry around the necessary checks *at the type level*. Below is a sketch of how you could do this. Importantly, the given code still requires you to specify the checks by hand, when running the action; it only checks that

Re: [Haskell-cafe] Question about HList possibilities

2007-06-25 Thread Jeff Polakow
Hello, Hello all, Given an HList (http://homepages.cwi.nl/~ralf/HList/) would it be possible to do the following: Create a class/function/magicks that would essentially do what hOccursMany does, except it would not return a list of elements, but a new HList. For example, would this

Re: [Haskell-cafe] Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-25 Thread Jaap Weel
I've been going over my code trying to get it all to compile with ghc -Wall -Werror I recently ran across what may be a good reason not to use -Wall in combination with -Werror (and similar combinations in other compilers), at least not as the standard build switches for software you intend to

[Haskell-cafe] Tools for Haskell and COM

2007-06-25 Thread Lewis-Sandy, Darrell
Are there any currently maintained tools for interfacing Haskell with COM objects? It appears that both Haskell script and Haskell direct haven't been updated since the turn of the century, and have fallen out of step with recent library changes.

Re: [Haskell-cafe] Re: Best idiom for avoiding Defaulting warningswith ghc -Wall -Werror ??

2007-06-25 Thread Claus Reinke
if you have a strongly and dynamically typed language, you can embed strongly and statically typed languages into it. by default, that means you get more type-checks than necessary and type-errors later than you'd wish, but you still get them. Are you sure this is true in a meaningful way?

Re: [Haskell-cafe] Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-25 Thread Ian Lynagh
On Fri, Jun 22, 2007 at 11:37:15AM -0700, Dave Bayer wrote: z = r Prelude.^ 3 I don't know if (^) in particular is what is causing you problems, but IMO it has the wrong type; just as we have (!!) :: [a] - Int - a genericIndex :: (Integral b) = [a] - b

Re: [Haskell-cafe] Parallel + exceptions

2007-06-25 Thread Andrew Coppin
Felipe Almeida Lessa wrote: On 6/23/07, Andrew Coppin [EMAIL PROTECTED] wrote: It's nice that you can have millions of threads if you want to do something very concurrent. What I tend to want is parallel - doing stuff that *could* be done in a single thread, but I want it to go faster using my

Re: [Haskell-cafe] Collections

2007-06-25 Thread Andrew Coppin
Lennart Augustsson wrote: If you don't run into graphs you are either solving very peculiar problems, or you don't recognize them when you see them. They are everywhere. I see lots of *trees*, but no general graphs. (As in, *data* structures having cycles in them. My *code* is often

Re: [Haskell-cafe] Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-25 Thread David Roundy
On Mon, Jun 25, 2007 at 07:31:09PM +0100, Ian Lynagh wrote: I don't know if (^) in particular is what is causing you problems, but IMO it has the wrong type; just as we have (!!) :: [a] - Int - a genericIndex :: (Integral b) = [a] - b - a we should also have

Re: [Haskell-cafe] Plugin Problem - Weirder

2007-06-25 Thread Andrea Rossato
On Fri, Jun 22, 2007 at 03:32:19PM +0200, Daniel Fischer wrote: Am Freitag, 22. Juni 2007 04:29 schrieb Donald Bruce Stewart: The file system was down here, sorry. Should be up now. Ah, just unlucky timing. darcs got, installed, all well. I Know I'm probably late, but with the darcs

[Haskell-cafe] Re: Collections

2007-06-25 Thread apfelmus
Andrew Coppin wrote: Lennart Augustsson wrote: If you don't run into graphs you are either solving very peculiar problems, or you don't recognize them when you see them. They are everywhere. I see lots of *trees*, but no general graphs. (As in, *data* structures having cycles in them. My

Re: [Haskell-cafe] directory tree?

2007-06-25 Thread Chad Scherrer
Bryan, I downloaded your FileManip library and Duncan's zlib library, but I kept getting a Too many open files exception (it matches over 9000 files). I tried to get around this using unsafeInterleaveIO as Greg had suggested, so now I have this: foo = namesMatching */*.z = fmap B.concat .

Re: [Haskell-cafe] Re: Collections

2007-06-25 Thread Andrew Coppin
apfelmus wrote: Andrew Coppin wrote: I see lots of *trees*, but no general graphs. (As in, *data* structures having cycles in them. My *code* is often cyclic...) So what does a compiler do to typecheck it? It represents your code as a graph and calculates strongly connected

Re: [Haskell-cafe] Parallel + exceptions

2007-06-25 Thread Andrew Coppin
Andrew Coppin wrote: Felipe Almeida Lessa wrote: Have you seen this paper? http://www.macs.hw.ac.uk/~dsg/gph/papers/html/Strategies/strategies.html It's probably want you want, I think. Well, it certainly looks interesting... thanks. Does anybody know where I can find a version of this

Re: [Haskell-cafe] Collections

2007-06-25 Thread Thomas Schilling
On 25 jun 2007, at 20.38, Andrew Coppin wrote: Lennart Augustsson wrote: If you don't run into graphs you are either solving very peculiar problems, or you don't recognize them when you see them. They are everywhere. I see lots of *trees*, but no general graphs. (As in, *data*

Re: [Haskell-cafe] Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-25 Thread Dave Bayer
On Mon, Jun 25, 2007 at 07:31:09PM +0100, Ian Lynagh wrote: I don't know if (^) in particular is what is causing you problems, but IMO it has the wrong type; just as we have (!!) :: [a] - Int - a genericIndex :: (Integral b) = [a] - b - a we should also have

[Haskell-cafe] runInteractiveProcess leaks memory, runInteractiveCommand does not

2007-06-25 Thread Andrea Rossato
Hi, after many test I found out that System.Process.runInteractiveProcess leaks memory while runInteractiveCommand does. The issue of memory leaks related to running external program was raised here: http://www.haskell.org/pipermail/haskell-cafe/2007-June/027234.html and Bryan noted that after a

Re: [Haskell-cafe] directory tree?

2007-06-25 Thread Chaddaï Fouché
I also tried gzipping a different, smaller file, and I changed the string in bar accordingly. No error in that case. So it seems to be a problem with myData.z, but why would it gunzip from the command line with no trouble in that case? Thanks, Chad Because gunzip is smarter than your program

Re: [Haskell-cafe] Parallel + exceptions

2007-06-25 Thread Andrew Coppin
Sebastian Sylvan wrote: On 25/06/07, Andrew Coppin [EMAIL PROTECTED] wrote: Does anybody know where I can find a version of this paper that actually has the diagrams in it?

Re: [Haskell-cafe] Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-25 Thread Henning Thielemann
On Mon, 25 Jun 2007, Ian Lynagh wrote: On Fri, Jun 22, 2007 at 11:37:15AM -0700, Dave Bayer wrote: z = r Prelude.^ 3 I don't know if (^) in particular is what is causing you problems, but IMO it has the wrong type; just as we have (!!) :: [a] - Int - a

[Haskell-cafe] Propositional logic question

2007-06-25 Thread Dave Tapley
Hopefully this is just about on topic enough.. (Oh and it's not home work, I just can't bring myself to let it go!) Taken from Simon Thompson: Type Theory and Functional Programming Section 1.1 Exercise 1.3 Question: Give a proof of (A = (B = C)) = ((A /\ B) = C). Now I can easily perform

Re[2]: [Haskell-cafe] directory tree?

2007-06-25 Thread Bulat Ziganshin
Hello Chad, Monday, June 25, 2007, 10:47:11 PM, you wrote: bar = fmap decompress $ B.readFile myData.gz try it with non-lazy bytestrings: import qualified Data.ByteString as B -- Best regards, Bulatmailto:[EMAIL PROTECTED]

Re: [Haskell-cafe] directory tree?

2007-06-25 Thread Chad Scherrer
Jedaï, Are you sure you're not confusing .z with .Z? http://kb.iu.edu/data/afcc.html And is it possible that gzip is smarter somehow? Doesn't Codec.Compression.GZip call the same C library used by gzip? Chad On 6/25/07, Chaddaï Fouché [EMAIL PROTECTED] wrote: Because gunzip is smarter than

Re: [Haskell-cafe] Propositional logic question

2007-06-25 Thread Jeff Polakow
Hello, But here I am only entitled to discharge (A /\ B) in the preceding proof and not A and B on their own. What proof which would allow me to discharge my assumptions A and B? I can see in my head how it makes perfect sense, but can't jiggle a way to do it using only the given

[Haskell-cafe] Re: Propositional logic question

2007-06-25 Thread Dave Tapley
Whoops, okay after two lines (thanks to oerjan) on #haskell I realise that yes, it is as easy as it should have been. For completeness: [A /\ B]1 (/\ E1) [A = (B = C)]2 A - (= E)

Re: Re[2]: [Haskell-cafe] directory tree?

2007-06-25 Thread Chad Scherrer
Bulat, I don't think I can. (1) (de)compress is defined for lazy bytestrings, and (2) my data comes to me compressed in order to fit it all on a single DVD. So even if I could uncompress each file strictly, I couldn't hold such a big strict bytestring in memory at once. On 6/25/07, Bulat

Re: [Haskell-cafe] Re: Propositional logic question

2007-06-25 Thread Eric
This seems rather complicated! What about this: A = (B = C) = { X = Y == ¬X \/ Y } ¬A \/ (¬B \/ C) = {associativity} (¬A \/ ¬B) \/ C = { DeMorgan } ¬(A /\ B) \/ C = { X = Y == ¬X \/ Y } A /\ B = C E. Dave Tapley wrote: Whoops, okay after two lines

Re: [Haskell-cafe] directory tree?

2007-06-25 Thread Stefan O'Rear
On Mon, Jun 25, 2007 at 12:48:27PM -0700, Chad Scherrer wrote: Jedaï, Are you sure you're not confusing .z with .Z? http://kb.iu.edu/data/afcc.html And is it possible that gzip is smarter somehow? Doesn't Codec.Compression.GZip call the same C library used by gzip? gzip: supports gzip,

Re: [Haskell-cafe] directory tree?

2007-06-25 Thread Bryan O'Sullivan
Chad Scherrer wrote: Now it doesn't complain about too many open files, but instead I get this runtime error: LPS *** Exception: user error (Codec.Compression.Zlib: incorrect header check) Are you sure you really have gzip files? If you're on a Linux or similar box, what does file

Re: [Haskell-cafe] Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-25 Thread Brandon Michael Moore
On Mon, Jun 25, 2007 at 08:53:18AM -0700, Dave Bayer wrote: It continues to appear to me that ghc -Wall -Werror doesn't support small Int constants without a per-use penalty, measured in code length. Why not use ghc -Wall -Werror -fno-warn-defaulting, maybe with default(Int)? It removes the

Re: [Haskell-cafe] directory tree?

2007-06-25 Thread Chad Scherrer
On 6/25/07, Bryan O'Sullivan [EMAIL PROTECTED] wrote: Are you sure you really have gzip files? If you're on a Linux or similar box, what does file myfile.z report to you? It should say something like gzip compressed data. Aarrgh, that's the problem - it does use compress. Is the distinction

Re: [Haskell-cafe] directory tree?

2007-06-25 Thread Stefan O'Rear
On Mon, Jun 25, 2007 at 02:13:05PM -0700, Chad Scherrer wrote: On 6/25/07, Bryan O'Sullivan [EMAIL PROTECTED] wrote: Are you sure you really have gzip files? If you're on a Linux or similar box, what does file myfile.z report to you? It should say something like gzip compressed data.

Re: [Haskell-cafe] directory tree?

2007-06-25 Thread Chad Scherrer
On 6/25/07, Stefan O'Rear [EMAIL PROTECTED] wrote: .z : always pack .Z : always compress .gz : always gzip gzip can handle all three, zlib only the last. (Are you *sure* your file is compress?) This means it's compress, doesn't it? $ file myData.z myData.z: compress'd data 16 bits I

Re: [Haskell-cafe] directory tree?

2007-06-25 Thread Stefan O'Rear
On Mon, Jun 25, 2007 at 02:42:18PM -0700, Chad Scherrer wrote: On 6/25/07, Stefan O'Rear [EMAIL PROTECTED] wrote: .z : always pack .Z : always compress .gz : always gzip gzip can handle all three, zlib only the last. (Are you *sure* your file is compress?) This means it's compress,

Re: [Haskell-cafe] directory tree?

2007-06-25 Thread Brandon S. Allbery KF8NH
On Jun 25, 2007, at 14:47 , Chad Scherrer wrote: LPS *** Exception: user error (Codec.Compression.Zlib: incorrect header check) Keep in mind that GNU gunzip also handles the old compress (.Z) and System V pack (.z) formats; I'd expect the Zlib codec to only handle gzip format and not

Re: [Haskell-cafe] directory tree?

2007-06-25 Thread Brandon S. Allbery KF8NH
On Jun 25, 2007, at 17:24 , Stefan O'Rear wrote: .z : always pack .Z : always compress ...unless it's gone through a Windows system or a CD somewhere along the way. Note that gunzip accepts a wide variety of extensions but recognizes the files by magic number, *not* by the extension.

Re: [Haskell-cafe] Propositional logic question

2007-06-25 Thread Derek Elkins
On Mon, 2007-06-25 at 20:41 +0100, Dave Tapley wrote: Hopefully this is just about on topic enough.. (Oh and it's not home work, I just can't bring myself to let it go!) Taken from Simon Thompson: Type Theory and Functional Programming Section 1.1 Exercise 1.3 Question: Give a proof of

[Haskell-cafe] Wikipedia archiving bot - code review

2007-06-25 Thread Gwern Branwen
Hey everyone. So I've been learning Haskell for a while now, and I've found the best way to move from theory to practice is to just write something useful for yourself. Now, I'm keen on editing Wikipedia and I've long wanted some way to stop links to external websites from breaking on me. So I

Re: [Haskell-cafe] Wikipedia archiving bot - code review

2007-06-25 Thread Neil Mitchell
Hi You may find that the slow down is coming from your use of the TagSoup library - I'm currently reworking the parser to make sure its fully lazy and doesn't space leak. I hope that the version in darcs tomorrow will have all those issues fixed. Thanks Neil On 6/26/07, Gwern Branwen [EMAIL

Re: [Haskell-cafe] Tools for Haskell and COM

2007-06-25 Thread shelarcy
Hello Darrell, On Tue, 26 Jun 2007 03:08:02 +0900, Lewis-Sandy, Darrell [EMAIL PROTECTED] wrote: Are there any currently maintained tools for interfacing Haskell with COM objects? It appears that both Haskell script and Haskell direct haven't been updated since the turn of the century, and

Re: [Haskell-cafe] Wikipedia archiving bot - code review

2007-06-25 Thread Donald Bruce Stewart
gwern0: Hey everyone. So I've been learning Haskell for a while now, and I've found the best way to move from theory to practice is to just write something useful for yourself. Now, I'm keen on editing Wikipedia and I've long wanted some way to stop links to external websites from breaking on