I am learning Haskell, so I decided to implement everyone's favorite,
overused Unix command -- cat. Below is my simple implementation,
comments about style, implementation, etc. are welcomed.
In particular, is my untilEOF idiomatically ok? Is there a better way to
accomplish this? Also, while
On Fri, 2005-02-18 at 01:58 -0800, Sean Perry wrote:
I am learning Haskell, so I decided to implement everyone's favorite,
overused Unix command -- cat. Below is my simple implementation,
comments about style, implementation, etc. are welcomed.
In particular, is my untilEOF idiomatically ok?
Hi Sean,
I'm not expert, but since you asked for idiomatic comments, here are a
few...
On 18 Feb 2005, at 09:58, Sean Perry wrote:
Also, while talking about untilEOF, it is slightly
annoying that hIsEOF returns IO Bool and that functions like 'not' only
want Bool. Sure makes the logic tests feel
I am learning Haskell, so I decided to implement everyone's favorite,
overused Unix command -- cat. Below is my simple implementation,
comments about style, implementation, etc. are welcomed.
In particular, is my untilEOF idiomatically ok? Is there a better way to
accomplish this? Also, while
Here's an alternative:
module Main where
import System.IO
import System(getArgs)
catFile :: FilePath - IO ()
catFile fp = do contents - readFile fp
putStr contents
main :: IO ()
main = do hSetBuffering stdin (BlockBuffering Nothing)
args - getArgs
if not
Did you import Foreign.GreenCard?
Now, I replaced import StdDIS by import Foreign.GreenCard.
The warning concerning missing import file does not occur any more, but
the marshall errors are still there.
Here is make's output:
make-output
make -C src
make[1]: Entering directory
On Fri, 18 Feb 2005 20:37:35 +0100, Dmitri Pissarenko
[EMAIL PROTECTED] wrote:
Did you import Foreign.GreenCard?
Now, I replaced import StdDIS by import Foreign.GreenCard.
The library apparently wasn't designed for newer versions of GreenCard
and it may be too old to fix easily.
--
Hello!
I'm curious what experienced Haskellers think about using literate
Haskell in daily work.
It seems to me like a good idea, since during coding it often helps to
write down one's thoughts (often, I find a solution to a complicated
problem in this way).
What are your experiences with
Hello,
I am trying to send a simple SOAP message to an Apache server. I got
the HTTP library from the XML-RPC library and thought this would make an
easy client. However, I'm having two problems.
First, even though I am sending an accurate Content-Length header with
my POST message, the server
On 2005-02-18, John Goerzen [EMAIL PROTECTED] wrote:
First, even though I am sending an accurate Content-Length header with
my POST message, the server is timing out and returning a 500 Internal
Server Error document.
Looks like that was a server bug.
Second, after reading that error
On Fri, Feb 18, 2005 at 11:36:57PM +0100, Bjorn Bringert wrote:
John Goerzen wrote:
It turns out that Network.Socket.recv raises an EOF error when it gets
back 0 bytes of data. HTTP is expecting it to return an empty list for
some reason.
The below patch fixed it for me.
[...]
Hmm,
I was introducing a fresh set of students to lambda abstraction in Haskell yesterday and had the following inspiration about a possible alternative syntax. I didn't end up showing the idea to the students -- too confusing -- but I thought I would float it here, as long as nobody takes it too
On Fri, 18 Feb 2005, Dmitri Pissarenko wrote:
I'm curious what experienced Haskellers think about using literate
Haskell in daily work.
It seems to me like a good idea, since during coding it often helps to
write down one's thoughts (often, I find a solution to a complicated
problem in this
John Goerzen [EMAIL PROTECTED] writes:
Here's an alternative:
module Main where
(snip john's version)
And what list would be complete without a points-free version. It
doesn't operate on stdin, though like John's does:
pointsFreeCat :: IO ()
pointsFreeCat = getArgs = mapM readFile =
At 5:27 PM -0800 2/18/05, Isaac Jones wrote:
John Goerzen [EMAIL PROTECTED] writes:
Here's an alternative:
module Main where
(snip john's version)
And what list would be complete without a points-free version. It
doesn't operate on stdin, though like John's does:
pointsFreeCat :: IO ()
On Fri, Feb 18, 2005 at 09:21:00PM +0100, Dmitri Pissarenko wrote:
I'm curious what experienced Haskellers think about using literate
Haskell in daily work.
This isn't a deep answer, but I find both of Haskell's literate syntaxes
more trouble than they're worth. The leading syntax makes a
16 matches
Mail list logo