This is completing the merger of the dbus-core and dbus-client
packages. The new package does everything they can do, but better.
Hackage: http://hackage.haskell.org/package/dbus
Homepage: https://john-millikin.com/software/haskell-dbus/
API reference:
There are currently several APIs for processing strict monoidal values
as if they were pieces of a larger, lazy value. Some of the most
popular are based on Oleg's left-fold enumerators, including the
iteratee, enumerator, iterIO. Other choices include comonads,
conduits, and pipes.
Despite
Hackage: http://hackage.haskell.org/package/options
Home page: https://john-millikin.com/software/haskell-options/
API reference:
https://john-millikin.com/software/haskell-options/reference/haskell-options/latest/
The options package lets library and application developers easily
work with
On Mon, Feb 6, 2012 at 10:05, Joey Hess j...@kitenet.net wrote:
John Millikin wrote:
That was my understanding also, then QuickCheck found a
counter-example. It turns out that there are cases where a valid path
cannot be roundtripped in the GHC 7.2 encoding.
The issue is that [238,189,178
Both packages now have much-improved support for non-UTF8 paths on
POSIX systems. There are no significant changes to Windows support in
this release.
system-filepath 0.4.5:
Hackage: http://hackage.haskell.org/package/system-filepath-0.4.5
API reference:
On Sun, Feb 5, 2012 at 18:49, Joey Hess j...@kitenet.net wrote:
John Millikin wrote:
In GHC 7.2 and later, file path handling in the platform libraries
was changed to treat all paths as text (encoded according to locale).
This does not work well on POSIX systems, because POSIX paths are byte
On Sun, Feb 5, 2012 at 19:17, John Millikin jmilli...@gmail.com wrote:
--
$ ~/ghc-7.0.4/bin/ghci
Prelude writeFile .txt test
Prelude readFile .txt
test
Prelude
Sorry, that got a bit mangled in the email. Corrected
http://hackage.haskell.org/packages/archive/directory/1.1.0.1/doc/html/System-Directory.html#v:removeDirectoryRecursive
The documentation says that removeDirectoryRecursive follows symlinks.
However, the implementation doesn't (in most cases, see below).
The presence of (Step b m r) is an artifact of Haskell's type system.
It can be removed through use of language extensions and 'forall' to
give a more aesthetically pleasing signature, but there should be no
behavioral difference.
On Wed, Dec 21, 2011 at 03:26, Michael Snoyman mich...@snoyman.com
On Tue, Dec 13, 2011 at 03:39, Magnus Therning mag...@therning.org wrote:
1. What to call files? I understand (C)WEB suggests using .w, and
that noweb uses .nw, what should I call anansi files?
I usually use .anansi, but it doesn't matter. You can use whatever
extensions you like, or even none
Anansi is a preprocessor for literate programs, in the model of NoWeb
or nuweb. Literate programming allows both computer code and
documentation to be generated from a single unified source.
Home page: https://john-millikin.com/software/anansi/
Hackage:
enumerator 0.4.15, which includes this change, is now published.
Hackage: http://hackage.haskell.org/package/enumerator-0.4.15
Home page: https://john-millikin.com/software/enumerator/
Important changes since 0.4.14:
* Fix an error in UTF-16 decoding, which could cause truncated output
if the
A user recently suggested changing the associativity of ($=) from [[
infixr 0 ]] to [[ infixl 1 ]]. This allows the following expressions
to be equivalent:
run $ enumerator $$ enumeratee =$ enumeratee =$ iteratee
run $ enumerator $= enumeratee $$ enumeratee =$ iteratee
run $ enumerator
The package summary is Type-safe ADT-database mapping library., which
gives some idea about what it does.
In my experience, any package that starts its source files with
{-# LANGUAGE GADTs, TypeFamilies, ExistentialQuantification,
StandaloneDeriving, TypeSynonymInstances,
http://hackage.haskell.org/package/knob
This is a small package which allows you to create memory-backed
handles. I found it as a pattern in a few of my test suites, so I
spent a day or so polishing it up before posting it to the internet.
Feel free to play around with it and tell me about any
Note that once you upgrade it (to =0.4), you'll still need to remove the
older version to fix the error.
I wish cabal-install defaulted to hiding every package it installs. The
current behavior of exposing every installed module is unreasonable and
confusing. Packages should be namespaces, not
The type signature
liftEnum :: (Monad m, MonadTrans t) = Enumerator a m b -
Enumerator a (t m) b
expands to:
liftEnum :: (Monad m, MonadTrans t) = (Step a m b - Iteratee a m
b) - Step a (t m) b - Iteratee a (t m) b
So you could implement it iff you can define:
lower :: (Monad m,
I have, but it's not quite what I'm looking for:
- I don't want to silence HUnit's output, I just don't want anything
to show on the console when a test *passes*. Showing output on a
failure is good.
- I'm not interested in BDD. Not to say it's not useful, but it
doesn't match my style of
prefer
to do the second. There's usually a reason a library behaves as it
does, and this way both behaviors are available to users (even if I
find one frustrating).
On Wed, Aug 10, 2011 at 23:51, Max Bolingbroke
batterseapo...@hotmail.com wrote:
On 11 August 2011 05:17, John Millikin jmilli
On Thu, Aug 11, 2011 at 07:52, Greg Weber g...@gregweber.info wrote:
It silences HUnit's output, but will tell you what happens when there is a
failure- which I think is what you want. There are a few available output
formatters if you don't like the default output, or you can write your own
On Thu, Aug 11, 2011 at 08:17, Greg Weber g...@gregweber.info wrote:
I am confused also, as to both what output you don't like that motivated
chell and what exactly hspec silences :) Suffice to say I am able to get a
small relevant error message on failure with hspec. I am adding the hspec
Possible -- I ran into dependency conflicts between
t-f/t-f-q/quickcheck when trying to migrate to test-framework 0.4, so
I clamped all my test subprojects to 0.3.
On Thu, Aug 11, 2011 at 09:09, Nathan Howell nathan.d.how...@gmail.com wrote:
Is this different than the --hide-successes flag for
Homepage: https://john-millikin.com/software/chell/
Hackage: http://hackage.haskell.org/package/chell
This is just a quick package I whipped up out of frustration with
test-framework scrolling an error message out of sight, for the
millionth time.
Chell has the same general purpose
D-Bus implementation for Haskell (dbus-core_0.9)
This is the first significant release to dbus-core in a while, and it contains
some significant improvements to both the API and implementation. Users
I think I'm pretty close to releasing the next version of my D-Bus library,
dbus-core. This is a big release that changes a lot of the API, so I'd like
to see if anybody 1) has any problems with the new APIs or 2) has any
suggested improvements.
haddock:
Several libraries (notably Pandoc and Gtk2hs) have very complex Setup.hs
scripts, which import several external libraries. In my experience, these
imports are very fragile, because Cabal does not enforce package visibility
in Setup.hs. For example, a Setup.hs that imports Control.Monad.Trans
Is there any way to indicate to Hackage that it should not try to generate
Haddock documentation? I'm concerned for two use cases for packages using a
different docs system:
1) A user might see the commentless auto-generated haddock and believe the
package is undocumented.
2) A user might find
On Tuesday, April 26, 2011 7:19:25 AM UTC-7, John Lato wrote:
I'd be interested to see the results of a shootout between iteratee and
enumerator. I would expect them to be basically equivalent most of the
time, with maybe two or three operations with a small (but consistent)
difference
*sigh*
Another fine entry for john-millikin-is-an-idiot.txt
Thank you for the patch Felipe, and for the bug report Skirmantas. I
have uploaded 0.4.10 to Hackage.
My sincere apologies for the inconvenience.
On Mon, Apr 25, 2011 at 19:03, Felipe Almeida Lessa
felipe.le...@gmail.com wrote
My chief complaint is that it's built on patch theory, which is
ill-defined and doesn't seem particularly useful. The Bazaar/Git/Mercurial
DAG model is much easier to understand and work with.
Possibly as a consequence of its shaky foundation, Darcs is much slower than
the competition -- this
John Lato's iteratee package is based on IterateeMCPS.hs[1]. I used
IterateeM.hs for enumerator, because when I benchmarked them the non-CPS
version was something like 10% faster on most operations.
The new IterateeM.hs solves some problems with the old encoding, but I
haven't switched
On Thursday, April 21, 2011 4:16:07 PM UTC-7, John Meacham wrote:
Um, the patch theory is what makes darcs just work. There is no need
to understand it any more than you have to know VLSI design to
understand how your computer works. The end result is that darcs
repositories don't get
It's forbidden for an iteratee to yield extra input that it hasn't consumed;
however, this is unfortunately not enforced by the type system. ___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Since the document claims it is HTML, you should be parsing it with an HTML
parser. Try hxt-tagsoup -- specifically, the parseHtmlTagSoup arrow.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Use enumHandle.
enumFile deals with the common case of read from the filesystem in IO. It
can't deal with general MonadIO monads because there'd be no guarantee that
the handle would actually be closed (eg, an ErrorT IO might never run the
cleanup).
If you need a special monad, do something
On Wednesday, March 30, 2011 12:18:48 PM UTC-7, Bas van Dijk wrote:
It would also be great to have a package which combines the proper
encoding/decoding of filepaths of the system-filepath package with the
type-safety of the pathtype package:
http://hackage.haskell.org/package/pathtype
Does
On Wednesday, March 30, 2011 9:07:45 AM UTC-7, Michael Snoyman wrote:
Thanks to you (and everyone else) for the informative responses. For
now, I've simply hard-coded in UTF-8 encoding for all non-Windows
systems. I'm not sure how this will play with OSes besides Windows and
Linux (especially
On Wed, Mar 30, 2011 at 21:07, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
On 31 March 2011 14:51, John Millikin jmilli...@gmail.com wrote:
Linux, OSX, and (probably?) FreeBSD use UTF8.
For Linux, doesn't it depend upon the locale rather than forcing UTF-8?
In theory, yes
UTC-7, John Millikin wrote:
Since the release, a couple people have sent in feature requests, so I'm
going to put out 0.4.9 in a day or so.
New features will be:
- tryIO: runs an IO computation, and converts any exceptions into
``throwError`` calls (requested by Kazu Yamamoto
On Sunday, March 27, 2011 9:45:23 PM UTC-7, Ertugrul Soeylemez wrote:
For setting a global timeout on an entire session, it's better to wrap
the ``run_`` call with ``System.Timeout.timeout`` -- this is more
efficient than testing the time on every chunk, and does not require a
specialised
Since the release, a couple people have sent in feature requests, so I'm
going to put out 0.4.9 in a day or so.
New features will be:
- tryIO: runs an IO computation, and converts any exceptions into
``throwError`` calls (requested by Kazu Yamamoto)
- checkContinue: encapsulates a common
On Sunday, March 27, 2011 8:38:38 AM UTC-7, John A. De Goes wrote:
Enumeratees solve some use cases but not others. Let's say you want to
incrementally compress a 2 GB file. If you use an enumeratee to do this,
your transformer iteratee has to do IO. I'd prefer an abstraction to
If the receiver can only accept very small chunks, you can put a rechunking
stage in between the compression and iteratee:
---
verySmallChunks :: Monad m = Enumeratee ByteString ByteString m b
verySmallSchunks = sequence (take 10)
On Mar 26, 10:46 am, Michael Snoyman mich...@snoyman.com wrote:
As far as the left-over data in a yield issue: does that require a
breaking API change, or a change to the definition of = which would
change semantics??
It requires a pretty serious API change, as the definition of
'Iteratee'
On 2011-03-26, Gregory Collins g...@gregorycollins.net wrote:
Since the API is being broken anyway, I'm also going to take the
opportunity to change the Stream type so it can represent EOF + some
data. That should allow lots of interesting behaviors, such as
arbitrary lookahead.
The thing
Hello Ertugrul Söylemez,
Good idea -- I've added an ``enumSocketTimed`` and ``iterSocketTimed`` to
the network-enumerator package at
http://hackage.haskell.org/package/network-enumerator . ``enumSocketTimed``
is equivalent to your ``enumHandleTimeout``, but instead of Handle uses the
more
-
Enumerators are an efficient, predictable, and safe alternative to
lazy I/O. Discovered by Oleg Kiselyov, they allow large datasets to be
processed
When using c2hs, you can use the inline header commands to define global
variables:
--
#c
const int HSMYLIBRARY_SOME_VAR = C_MY_VAR;
const char *HSMYLIBRARY_OTHER_VAR = C_OTHER_VAR;
#endc
Is there any reasonable way to do this if I want to cast a monadic
value? For example:
castState :: (Typeable a, Typeable s, Typeable1 m, Typeable b) = a - Maybe
(StateT s m b)
castState = Data.Typeable.cast
None of the common monad transformers declare instances of Typeable,
so I don't know
On Tue, Jan 25, 2011 at 18:55, Chris Smith cdsm...@gmail.com wrote:
Licensing with the GPL has definite consequences; for example, that the
great majority of Haskell libraries, which are BSD3 licensed, may not
legitimately declare dependencies on it.
What are you talking about? Of course BSD3
On Tue, Jan 25, 2011 at 21:11, David Leimbach leim...@gmail.com wrote:
I am not an IP lawyer, but this is my understanding of the GPL and it's
transitive relationship with bodies of work that aren't GPL'd.
BSD3 doesn't really state anything about what it links with, but the GPL
injects itself
On Tue, Jan 25, 2011 at 21:51, Chris Smith cdsm...@gmail.com wrote:
On Tue, 2011-01-25 at 21:41 -0800, John Millikin wrote:
Licensing is a property of the code, not the package; Cabal's
licensing field is only a useful shorthand for most of the code here
is covered by
That would
On Tue, Jan 25, 2011 at 22:07, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
Voila: http://www.gnu.org/licenses/gpl-faq.html#IfLibraryIsGPL
(Note: in the past they said otherwise.)
Important: or a GPL-compatible license
BSD3, MIT, PublicDomain, Apache, etc, are all GPL-compatible.
On Tue, Jan 25, 2011 at 22:14, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
However, my understanding that this property is then transitive: if
Foo is GPL, Bar depends on Foo and Baz depends on Bar, then Baz must
also be released under a GPL-compatible license.
It's not really a
On Tue, Jan 25, 2011 at 22:20, Chris Smith cdsm...@gmail.com wrote:
On Tue, 2011-01-25 at 21:48 -0800, John Millikin wrote:
Please cite where the FSF claims the GPL applies to unrelated works
just because they can compile against GPL'd code. Keep in mind that if
your claim is correct
On Tue, Jan 25, 2011 at 22:52, Chris Smith cdsm...@gmail.com wrote:
On Tue, 2011-01-25 at 22:34 -0800, John Millikin wrote:
The specific claim I'm refuting is that if some library or application
depends on GPL'd code, that library/application must itself be
GPL-licensed. This claim is simply
Patch done and sent to the bytestring maintainers. For the interested,
here's the benchmark chart for binary, cereal, and
blaze-builder/bytestring:
http://i.imgur.com/xw3TL.png
On Wed, Jan 19, 2011 at 15:30, Johan Tibell johan.tib...@gmail.com wrote:
On Thu, Jan 20, 2011 at 12:16 AM, John
by library: http://i.imgur.com/PXW97.png
Benchmark source files attached, if you'd like to poke at them.
On Sun, Jan 23, 2011 at 17:21, Conrad Parker con...@metadecks.org wrote:
On 24 January 2011 07:29, John Millikin jmilli...@gmail.com wrote:
Patch done and sent to the bytestring maintainers
Most people who work with binary data have had to construct
bytestrings at some point. The most common solution is to use a
Builder, a monoid representing how to construct a bytestring. There
are currently three packages (that I know of) which include builder
implementations: binary, cereal, and
On Wed, Jan 19, 2011 at 12:04, Johan Tibell johan.tib...@gmail.com wrote:
On Wed, Jan 19, 2011 at 8:37 PM, Michael Snoyman mich...@snoyman.com wrote:
Isn't Simon Meier working on migrating his code from blaze-builder
into binary?
So I heard (although not directly from Simon). I think it would
On Wed, Jan 19, 2011 at 14:06, Johan Tibell johan.tib...@gmail.com wrote:
On Wed, Jan 19, 2011 at 10:30 PM, Michael Snoyman mich...@snoyman.com wrote:
What's the advantage to moving in into binary as opposed to bytestring?
To test that the implementation can indeed be ported to that
Lifting 'f' into StateT -- you get a list of (result, state) pairs. Since
the state is never modified, the second half of each pair is identical:
--
import Control.Monad.State
f :: Int - [Int]
f n = [0..n]
-- lifting 'f'
Haskell supports binary IO via openBinaryFile, hGetBuf, and hPutBuf .
Advanced types like ByteString or Binary are not part of Haskell 2010,
I assume because they're too complex to be part of the language
standard.
On Thu, Dec 9, 2010 at 23:14, Permjacov Evgeniy permea...@gmail.com wrote:
Does
On Thu, Dec 9, 2010 at 12:43, Michael Snoyman mich...@snoyman.com wrote:
For the record, enumerator (and I believe iteratee as well) uses
transformers, not mtl. transformers itself is Haskell98; all FunDep
code is separated out to monads-fd.
Michael
iteratee also uses 'transformers', but
I swear attoparsec-enumerator is going to give me grey hair; the error
you're receiving is because iterParser itself is divergent. Fixed in
0.2.0.3, with my sincere apologies.
On Sun, Dec 5, 2010 at 09:14, Crutcher Dunnavant crutc...@gmail.com wrote:
I have spent a good chunk of the past week
Use one of the Char8 modules, depending on whether you want a strict
or lazy bytestring:
---
import qualified Data.ByteString.Lazy.Char8 as BS
message :: BS.ByteString
message = BS.pack SOME STRING
On Thu, Oct 28, 2010 at 12:34, Andrew Coppin
andrewcop...@btinternet.com wrote:
Today I uploaded a package to Hackage, and rediscovered something that you
already know: I'm an idiot.
More specifically, I copied the Cabal description from another package and
then updated all the fields. Except
On Mon, Oct 4, 2010 at 01:51, Bulat Ziganshin bulat.zigans...@gmail.com wrote:
Hello John,
Monday, October 4, 2010, 7:57:13 AM, you wrote:
Sure it does; a 32-bit system can address much more than 2**30
elements. Artificially limiting how much memory can be allocated by
depending on a
On Sun, Oct 3, 2010 at 19:09, Bryan O'Sullivan b...@serpentine.com wrote:
On Sun, Oct 3, 2010 at 11:54 AM, Henry Laxen nadine.and.he...@pobox.com
wrote:
I am trying to create a (relatively) big array,
but it seems I cannot make anything larger
than 2^30 or so. Here is the code:
Use a
On Mon, Sep 27, 2010 at 10:55, cas...@istar.ca wrote:
Why can't libraries/frameworks like wxHaskell/gtk2hs/... be used with newer
versions of ghc/wxWidgets/GTK+/... ?
Haskell libraries statically link many parts of the Haskell runtime;
you can't combine two libraries compiled with different
On Mon, Sep 20, 2010 at 22:11, Conrad Parker con...@metadecks.org wrote:
I've been using unsafeCoerce:
getFloat64be :: Get Double
getFloat64be =
do n - getWord64be
return (unsafeCoerce n :: Double)
putFloat64be :: Double - Put
putFloat64be n = putWord64be (unsafeCoerce n ::
On Tue, Sep 21, 2010 at 12:08, Daniel Fischer daniel.is.fisc...@web.de wrote:
Endianness only matters when marshaling bytes into a single value --
Data.Binary.Get/Put handles that. Once the data is encoded as a Word,
endianness is no longer relevant.
I mean, take e.g. 2^62 :: Word64. If you
On Mon, Sep 20, 2010 at 03:22, Daniel Fischer daniel.is.fisc...@web.de wrote:
unsafeCoerce is not supposed to work for casts between Integral and
Floating types. If you try to unsafeCoerce# between unboxed types, say
Double# and Word64#, you're likely to get a compile failure (ghc panic).
If
On Sun, Sep 19, 2010 at 20:16, Conrad Parker con...@metadecks.org wrote:
Anyway, good work. Does this have any overlap with
data-binary-ieee754? There was some recent discussion here about the
encoding speed in that package.
I should probably make it more clear that data-binary-ieee754 is for
On Sun, Sep 19, 2010 at 21:17, Bryan O'Sullivan b...@serpentine.com wrote:
I've issued new releases of the text and text-icu packages, the fast,
comprehensive Unicode text manipulation libraries.
http://hackage.haskell.org/package/text
http://hackage.haskell.org/package/text-icu
What's new in
On Sun, Sep 19, 2010 at 21:43, Patrick Perry patpe...@gmail.com wrote:
I needed real IEEE754 binary support for round-trip parsing, where
(for example) maintaining the particular bit pattern of a NaN is
important. For 99% of people, the unsafe method will work fine.
How does a C-style cast
On Mon, Sep 6, 2010 at 22:49, Ben midfi...@gmail.com wrote:
Sorry to be late coming into this conversation.
Something that has bothered me (which I have mentioned to John Lato
privately) is that it is very easy to write non-compositional code due
to the chunking. For example, there is a
On Fri, Sep 3, 2010 at 23:02, David Menendez d...@zednenem.com wrote:
Yes, using foreign namespaces is one of the things recommended against
when serving XHTML as text/html. This says nothing about documents
following the recommendations in Appendix C.
I'm not debating that it's *possible* to
On Sat, Sep 4, 2010 at 14:46, Jeremy Shaw jer...@n-heptane.com wrote:
So the choices are:
1. only focus on getting the xhtml 1.0 served as application/xml
working correctly, and ie users get nothing..
2. create xhtml 1.0 that would work correctly if served as
application/xml, but serve it
On Fri, Sep 3, 2010 at 05:04, JP Moresmau jpmores...@gmail.com wrote:
I have replaced JSon by AttoJson (there was also JSONb, which seems quite
similar), which allows me to work solely with ByteStrings, bypassing the
calls to utf8-string completely. Performance has improved noticeably. I'm
On Fri, Sep 3, 2010 at 20:39, Albert Y. C. Lai tre...@vex.net wrote:
In theory, what does file extension matter? Media type is the dictator. The
normative Section 5.1 permits the choice of application/xhtml+xml or
text/html. While the latter entails extra requirements in the informative
On Thu, Sep 2, 2010 at 21:14, Mark Lentczner ma...@glyphic.com wrote:
I choose to switch Haddock's output from HTML to XHTML mostly because I have
found the consistency of rendering cross-browser to be greater and easier to
achieve with XHTML. I'm not alone in this opinion: Many well
Is there a summary of the API changes available? I see a new module,
but Precis is choking on Data.Text and Data.Text.Lazy, so I'm not sure
what existing signatures have been modified.
Don't forget, you can always improve the text library yourself. I love to
receive
patches, requests for
Define a custom element generator, which has characters with your
desired values:
myRange :: Gen Char
myRange = elements (['A'..'Z'] ++ ['a' .. 'z'] ++ ~...@#$%^*())
You can use forAll to run tests with a specific generator:
forAll myRange $ \c - chr (ord c) == c
On Mon, Aug 30, 2010 at
Update your cabal package list, and then install QuickCheck.
Optionally, you can use a version specifier:
cabal update
cabal install 'QuickCheck = 2'
This should make QuickCheck 2 the default in GHCI. If it doesn't, you
may need to specify the version:
ghci -package QuickCheck-2.2
On Thu, Aug 26, 2010 at 20:51, Richard O'Keefe o...@cs.otago.ac.nz wrote:
Maybe Linux is different. One thing is NOT different, and that is
Linux upgrades *DO* reliably break programs that use dynamic linking.
Dynamic libraries get
- left out
- changed incompatibly
- moved some place
On Wed, Aug 25, 2010 at 01:33, John Lato jwl...@gmail.com wrote:
Is this really true? Consider iteratees that don't have a sensible default
value (e.g. head) and an empty stream. You could argue that they should
really return a Maybe, but then they wouldn't be divergent in other
formulations
For debugging the error, we'll need to know what your locale's
encoding is. You can see this by echoing the $LANG environment
variable. For example:
$ echo $LANG
en_US.UTF-8
means my encoding is UTF-8.
Haskell doesn't currently have any decoding libraries with good error
handling (that I know
You're generating two random values, where you probably want to just
generate one and then calculate the second from it. Try this:
instance Arbitrary QCExample where
arbitrary = do
i1 - arbitrary
return (QCExample i1 (i1 * 2))
2010/8/25 Jürgen Nicklisch-Franken j...@arcor.de:
On Tue, Aug 24, 2010 at 05:12, John Lato jwl...@gmail.com wrote:
Oleg included the error state to enable short-circuiting of computation, and
I guess everyone just left it in. Recently I've been wondering if it should
be removed, though, in favor requiring explicit (i.e. explicit in the type
Here's my (uneducated, half-baked) two cents:
There's really no need for an Iteratee type at all, aside from the
utility of defining Functor/Monad/etc instances for it. The core type
is step, which one can define (ignoring errors) as:
data Step a b = Continue (a - Step a b)
After fielding some more questions regarding error handling, it turns
out that my earlier mail was in error (hah) -- error handling is much
more complicated than I thought.
When I gave each iteratee its own error type, I was expecting that
each pipeline would have only one or two sources of
On Sat, Aug 21, 2010 at 23:14, Paulo Tanimoto ptanim...@gmail.com wrote:
One question: enumFile has type
enumFile :: FilePath - Enumerator SomeException ByteString IO b
and iterParser has type
iterParser :: Monad m = Parser a - Iteratee ParseError ByteString m a
How do we use both
It's certainly a bug in iterFile -- I think it'll have to be modified
to close the file on EOF, not after returning a continuation.
Semi-working in the compiled version is probably just a quirk of the
garbage collector and/or OS.
___
Haskell-Cafe mailing
Well, now I know why the iteratee package never defined something
like iterFile -- it's not really possible. The only way to open
handles within an iteratee prevents exception-safe release.
enumerator-0.3 will remove the iterFile functions. iterHandle will
remain, to be used as in your second
I think the docs are wrong, or perhaps we're misunderstanding them.
Magnus is correct.
Attached is a test program which listens on two ports, 42000 (blocking
IO) and 42001 (non-blocking). You can use netcat, telnet, etc, to send
it data. The behavior is as Magnus describes: bytes from
On Sat, Aug 21, 2010 at 11:35, Gregory Collins g...@gregorycollins.net wrote:
John Millikin jmilli...@gmail.com writes:
I think the docs are wrong, or perhaps we're misunderstanding them.
Magnus is correct.
Attached is a test program which listens on two ports, 42000 (blocking
IO) and 42001
On Sat, Aug 21, 2010 at 11:58, Judah Jacobson judah.jacob...@gmail.com wrote:
You should note that in ghc=6.12, hWaitForInput tries to decode the
next character of input based on to the Handle's encoding. As a
result, it will block if the next multibyte sequence is incomplete,
and it will
On Sat, Aug 21, 2010 at 12:44, Magnus Therning mag...@therning.org wrote:
As an aside, has anyone written the code necessary to convert a parser, such
as e.g. attoparsec, into an enumerator-iteratee[1]?
This sort of conversion is trivial. For an example, I've uploaded the
attoparsec-enumerator
On Sat, Aug 21, 2010 at 14:17, Paulo Tanimoto ptanim...@gmail.com wrote:
Cool, but is there a reason it won't work with version 0.2 you just released?
build-depends:
[...]
, enumerator = 0.1 0.2
I noticed that when installing it.
Hah ... forgot to save the vim buffer. Corrected
1 - 100 of 183 matches
Mail list logo