I have the following functions:
makePair :: (String, String) - IO PairBox
parseFile :: String - [(String, String)]
importFile :: Editor - String - IO ()
importFile ed path = do
s - readFile path
ps - mapM (\x - makePair (x, )) (lines s)
es - return $ V.fromList ps
writeIORef ed es
Hi,
Am Dienstag, den 29.11.2011, 07:43 +0200 schrieb Michael Snoyman:
Since the release of deepseq 1.2, we've had a bit of a problem: when
using the newest versions of packages on Hackage, there is no NFData
instance available for the containers types. When GHC 7.4 comes out
with its newer
Martin,
importFile :: Editor - String - IO ()
importFile ed path = do
s - readFile path
ps - mapM (\x - makePair (x, )) (lines s)
es - return $ V.fromList ps
writeIORef ed es
loadFile :: Editor - String - IO ()
loadFile ed path = do
s - readFile path
ps - mapM makePair
On Tue, Nov 29, 2011 at 10:29 AM, Joachim Breitner
m...@joachim-breitner.de wrote:
Hi,
Am Dienstag, den 29.11.2011, 07:43 +0200 schrieb Michael Snoyman:
Since the release of deepseq 1.2, we've had a bit of a problem: when
using the newest versions of packages on Hackage, there is no NFData
On Tue, Nov 29, 2011 at 12:35 AM, Stefan Holdermans
ste...@vectorfabrics.com wrote:
Have you considered abstracting over the bits in which importFile and
loadFile differ? For example:
processFile :: (String - IO [PairBox]) - Editor - String - IO ()
processFile f ed path = do
s -
Martin,
(The trick with `flip` is tempting, but again at the
cost of having to peer rather too closely at the implementation of
processFile when reading the code).
That trick is of course completely orthogonal. One could just as well write:
processFile :: (String - [a]) - (a - (String,
On Tue, Nov 29, 2011 at 12:55 AM, Stefan Holdermans
ste...@vectorfabrics.com wrote:
Martin,
(The trick with `flip` is tempting, but again at the
cost of having to peer rather too closely at the implementation of
processFile when reading the code).
That trick is of course completely
Ivan Lazar Miljenovic ivan.miljeno...@gmail.com writes:
On 29 November 2011 07:28, Daniel Díaz Casanueva dhelta.d...@gmail.com
wrote:
Hi Cafe,
I only feel curious about what would be the consequences of becoming the
Overloaded Strings feature (currently, an extension) to be default in
Hi,
Am Dienstag, den 29.11.2011, 10:36 +0200 schrieb Michael Snoyman:
On Tue, Nov 29, 2011 at 10:29 AM, Joachim Breitner
m...@joachim-breitner.de wrote:
Am Dienstag, den 29.11.2011, 07:43 +0200 schrieb Michael Snoyman:
Since the release of deepseq 1.2, we've had a bit of a problem: when
On Tue, Nov 29, 2011 at 12:11 PM, Joachim Breitner
m...@joachim-breitner.de wrote:
Hi,
Am Dienstag, den 29.11.2011, 10:36 +0200 schrieb Michael Snoyman:
On Tue, Nov 29, 2011 at 10:29 AM, Joachim Breitner
m...@joachim-breitner.de wrote:
Am Dienstag, den 29.11.2011, 07:43 +0200 schrieb
Am 29.11.2011 um 09:16 schrieb Martin DeMello:
I have the following functions:
makePair :: (String, String) - IO PairBox
parseFile :: String - [(String, String)]
importFile :: Editor - String - IO ()
importFile ed path = do
s - readFile path
ps - mapM (\x - makePair (x, )) (lines
Martin,
Quick question: what's the difference between
importFile ed = readfile = fromRawFile = setEditor ed
and
importFile = readfile = fromRawFile = setEditor
that the former compiles but the latter doesn't?
Note that, in Haskell, function application has higher priority then any
2011/11/29 Stefan Holdermans ste...@vectorfabrics.com:
Martin,
(The trick with `flip` is tempting, but again at the
cost of having to peer rather too closely at the implementation of
processFile when reading the code).
That trick is of course completely orthogonal. One could just as well
Message: 22
Date: Tue, 29 Nov 2011 12:18:41 +0200
From: Michael Snoyman mich...@snoyman.com
Subject: Re: [Haskell-cafe] containers-deepseq?
By the way, this is the part of situation that cabal-src is coming to
solve, and it *is* solved... except that the result is a lot of
re-compiling.
On Tue, Nov 29, 2011 at 2:41 PM, John Lato jwl...@gmail.com wrote:
Message: 22
Date: Tue, 29 Nov 2011 12:18:41 +0200
From: Michael Snoyman mich...@snoyman.com
Subject: Re: [Haskell-cafe] containers-deepseq?
By the way, this is the part of situation that cabal-src is coming to
solve, and it
15 matches
Mail list logo