Hello, cafe!
I made a package
xml-conduit-generichttps://github.com/odr/xml-conduit-generic to
provide conversion from ADT to xml and vice versa.
Conversion works as Conduit (ToXml) or Consumer (FromXml).
Example:
data T4 = T4 {v4 :: Int, n4 :: Maybe T4} deriving (Eq, Show, Generic)
instance
Did you see expression parser in parsec
packagehttp://hackage.haskell.org/packages/archive/parsec/3.1.3/doc/html/Text-Parsec-Expr.html?
Is it not enough?
2013/2/20 Martin Drautzburg martin.drautzb...@web.de
Hello all,
this was previously asked on haskell-beginners, but only partially
Just another definition of calculateSeq:
calculateSeq = zipWith ($) (cycle [sin,cos]) . map sqrt
2012/11/15 Janek S. fremenz...@poczta.onet.pl
Do you really mean to calculate the 'sin . sqrt' of just the head of the
list, or do you mean:
calculateSeq = map (sin . sqrt) ?
Argh.. of
I didn't analyze it but anytime I see M.insertWith I am just in doubt -
do you know about a strict version M.insertWith' ?
2012/10/24 Stefan Klinger all-li...@stefan-klinger.de
On 2012-Oct-22 14:23 (-0700), Eugene Kirpichov wrote with possible
deletions:
fwd = foldr (\(x,y) -
Hello,
if you change from
test2 = [expr| test |]
to
test2 = [expr| $test |]
then it will be compile.
Do you want that or what?
2012/10/2 Jake Wheat jakewheatm...@gmail.com
Hello,
I have a parser which parses to an ast which contains Text values. I
am trying to use this parser with
s1 ~ sum $ map (sum . flip map [0..n] . gcd) [0..n]
s2 ~ sum $ concatMap (flip map [0..n] . gcd) [0..n]
There are some posts from Joachim Breitner investigated fusion for
concatMap:
http://www.haskell.org/pipermail/haskell-cafe/2011-December/thread.html#97227
2012/6/25 Johannes Waldmann
]]
From the links posted by Dmitry, it might be that the code generated is
made of 2 recursive calls: in fact, what I observe is a stack space
overflow error on runtime...
L.
On Mon, Jun 25, 2012 at 10:09 AM, Dmitry Olshansky
olshansk...@gmail.comwrote:
s1 ~ sum $ map (sum . flip map [0
I transfered my code from 0.3 to 0.4 without any changes. There are type
synonyms in Conduit for that.
Changes were from 0.2 to 0.3. Michael discribed it here
http://www.yesodweb.com/blog/2012/03/announcing-conduit-0-3
Actually, in 0.4
no changes with Control.Monad.Trans.Resource.
type Source m
As usual you can check:
Prelude Control.Applicative pure (||) * pure True * undefined
*** Exception: Prelude.undefined
Prelude Control.Applicative (||) True undefined
True
2012/3/16 Rouan van Dalen rvda...@yahoo.co.uk
Hi everyone.
I was wondering if I can make assumptions about the
Look also at safe package http://hackage.haskell.org/package/safe
2012/3/13 Chris Wong chrisyco+haskell-c...@gmail.com
On Tue, Mar 13, 2012 at 12:24 PM, Chris Smith cdsm...@gmail.com wrote:
On Mon, Mar 12, 2012 at 3:14 PM, Kevin Clees k.cl...@web.de wrote:
Now my function looks like this:
If I'm running register outside runWriterT everything will work.
Maybe just
lift $ register $ print freed2
or I didn't catch something?
2012/3/1 Alexander V Vershilov alexander.vershi...@gmail.com
Hello.
I'm trying to add monad stack into network-conduit, and everything
works except
.
2012/3/2 Alexander V Vershilov alexander.vershi...@gmail.com
I've found a solution, I should not use lift for runWriterT, and should
explicilty lift all computation of level I need, i.e. (lift.lift) for ask
and lift for register.
Thu, Mar 01, 2012 at 02:19:29PM +0400, Dmitry Olshansky wrote
Personally I prefer xml-enumerator. You can work with xml-stream or with
DOM through cursor (like XPath).
I think that in your case working with stream is preferrable.
You can just make an Enumeratee like
import qualified Data.Enumerator.List as EL
myEnum = EL.map f
where
f
For TH look also at
http://www.mail-archive.com/haskell-cafe@haskell.org/msg13057.html
2011/10/27 Magicloud Magiclouds magicloud.magiclo...@gmail.com
On Thu, Oct 27, 2011 at 1:57 AM, Brent Yorgey byor...@seas.upenn.edu
wrote:
On Wed, Oct 26, 2011 at 09:10:23PM +0400, MigMit wrote:
Can't
Hi,
for the first question you can look at combinators in
Data.Iteratee.ListLikehttp://hackage.haskell.org/packages/archive/iteratee/0.8.5.0/doc/html/Data-Iteratee-ListLike.html
for iteratee package or
If I've understood it correctly, concurrent is similar to functions
discussed here:
http://www.haskell.org/pipermail/haskell-cafe/2011-April/091474.html
and here
http://www.haskell.org/pipermail/haskell-cafe/2011-January/088319.html
2011/6/28 Ertugrul Soeylemez e...@ertes.de
Sævar Berg
Could you look at
http://hackage.haskell.org/packages/archive/time/1.2.0.5/doc/html/Data-Time-Format.html
?
Is it enough?
2011/6/14 Dmitri O.Kondratiev doko...@gmail.com
Sorry for typo - I need subtract dates (no 'abstracting') :
On Tue, Jun 14, 2011 at 3:49 PM, Dmitri O.Kondratiev
Hello,
Could anyone explain strange behavior of Takusen with OracleDB (OraClient
11.x)? Several sequential sessions give Seqmentation Fault error. In case
of nested sessions it works well.
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Database.Oracle.Enumerator
import
Thank you!
Working implementation is even more than I've expected.
2011/4/28 Felipe Almeida Lessa felipe.le...@gmail.com
On Thu, Apr 28, 2011 at 1:10 PM, Felipe Almeida Lessa
felipe.le...@gmail.com wrote:
On Thu, Apr 28, 2011 at 12:09 PM, Felipe Almeida Lessa
felipe.le...@gmail.com
In my case leftover is not important.
But in common case... Just an idea...
What if we provide
iterWhile :: Iteratee a m () - Iteratee a m b - Iteratee a m b
The first Iteratee only control when the result should be yeilded and feed
an input to second Iteratee.
Then we can change manyToOne to
Hello,
does somewhere exist function with type like this - manyToOne :: [Iteratee a
m b] - Iteratee a m [b] ?
I.e. I need to process one input through many Iteratees indepentently in
constant space and collect results.
It is similar by type with sequenceM but as far as I understand sequenceM
-- Forwarded message --
From: Dmitry Olshansky olshansk...@gmail.com
Date: 2011/4/2
Subject: Re: [Haskell-cafe] using IO monad in Iteratee
To: wren ng thornton w...@freegeek.org
Well, in my case I can use probably
withBinaryFile fn (\h- run $ enumHandle h ...)
2011/4/2 wren
Very interesting, thanks.
I didn't feel your classes yet... Do you think that provide these instances
for Iteratee is possible?
2011/4/2 Bas van Dijk v.dijk@gmail.com
On 1 April 2011 21:59, Dmitry Olshansky olshansk...@gmail.com wrote:
Is it possible to change enumFile to using MonadIO
, Dmitry Olshansky olshansk...@gmail.com wrote:
Is it possible to change enumFile to using MonadIO class?
No because it uses the control operation Control.Exception.finally ::
IO a - IO b - IO a internally. You can't lift control operations
with liftIO :: MonadIO m = IO a - m a.
However
Dear collegues,
I use Iteratee with Monad Transformer stack in this way:
type MyMonad a b = Iteratee a (StateT StateType IO) b
I've wrote some Enumeratees using this type. Then I want to compose it with
standard enumerator like Data.Enumerator.Binary.enumFile.
But enumFile use IO monad instead
Hello, cafe,
Is there a way to get BLOB fields from OracleDB using Takusen?
What about other possibilities (through HDBC - ODBC)?
Dima
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hello,
I have a problem with using Takusen in my current project because it uses
old QuickCheck 1.*. This leads to conflict with other packages which use
QuickCheck 2.*.
Could someone help me to decide this problem?
Best wishes,
Dmitry
___
Haskell-Cafe
Hello all,
It seems that I saw something like this in Cafe recevtly. But I am not sure...
In GHC 6.12.1 (Platform 2010 on Windows Vista) I have
Prelude [1,1+2/3..10]
ivan.miljeno...@gmail.com:
Dmitry Olshansky olshansk...@gmail.com writes:
Hello all,
It seems that I saw something like this in Cafe recevtly. But I am not
sure...
In GHC 6.12.1 (Platform 2010 on Windows Vista) I have
Prelude [1,1+2/3..10
Thanks, it's clear now.
2010/5/19 Serguey Zefirov sergu...@gmail.com:
2010/5/19 Erik de Castro Lopo mle...@mega-nerd.com:
Dmitry Olshansky wrote:
It seems that I saw something like this in Cafe recevtly. But I am not
sure...
In GHC 6.12.1 (Platform 2010 on Windows Vista) I have
snip
Hello cafe,
Could you say can I determine in Template Haskell that datatype X has
instance of class Y?
Regards,
Dmitry
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hello,
ErrorT instance of MonadPlus define that in case of fail both arguments of
mplus a value of Error will be the Error of second computation:
m `mplus` n = ErrorT $ doa - runErrorT mcase a of
Left _ - runErrorT nRight r - return (Right
r)
Could it
be encoded and decoded as
XML. Its not pretty, has bugs, and is far from perfect but I can send that
to you if you'd like a way to get stared.
Max
On Aug 7, 2009, at 7:04 PM, Dmitry Olshansky wrote:
Well, great thanks for interesting links.
But definitely at first I need a time to try
Hi, Erik,
Did you try Network.HTTP? Is it not enough?
2009/8/12 Erik de Castro Lopo mle...@mega-nerd.com mle%2...@mega-nerd.com
Hi all,
I need to do a HTTP post of XML data (Content-type == text/xml) to
a HTTP (eventually HTTPS) server and to retrieve both the response
code and some
Like in Keith proposal I need it for working with web-services, maybe Xml
transformations and so on. And I tried to make it by self with a partial
success. To work with xml I only used xml package (Text.XML.Light).
Now I am going to work a little (?) on this task to provide more standard
and
Well, great thanks for interesting links.
But definitely at first I need a time to try to understand what Generic
Haskell and EMGM are.
Does it stronger than Template Haskell? Could it be explained briefly and
simplistic for first impression? Could it be compared with SYB or TH?
Would it be
My measurements show that
- using strict version of insertWith doesn't improve performance. - in case
of compilation with -O2 flag foldl' also is equal to foldl (-O2 gives approx
2 time impovements).- using RandomGen and State monad to generate a list
gives at least 4 times improvements (on 1 000
I got the impression Dmitry was using Haskell's standard RNG, not
Mersenne Twister. If so, then we'd get further improvements with MT,
but that's still a hit against Haskell, as I'd interpret it as meaning
that Haskell supplies as default a PRNG which costs noticeable
performance in order to
Hello all,
I need a convenient tool to generate Haskell types from XML W3C Schema
Definition (xsd) and vice versa - generate instances for Haskell ADT's to
make corresponding XML.
It is just the same that HaXml do with DTD.
I need
- using XSD
- support for unicode
- using xml-attributes as far as
39 matches
Mail list logo