Re: [Haskell-cafe] a little parsec enhancement

2013-09-06 Thread Antoine Latter
The exported `mkPT` is equivalent to the old 'ParsecT' data constructor from parsec 3.0.x. I wouldn't mind exporting a similar alias for the new 'ParsecT' constructor from 3.1.x. On Fri, Sep 6, 2013 at 2:21 PM, Petr Pudlák petr@gmail.com wrote: Dne 09/05/2013 01:38 PM, Roman Cheplyaka

Re: [Haskell-cafe] Generating Haskell Code out of Haskell AST (GHC API)

2013-07-18 Thread Antoine Latter
The package haskell-src-exts is a lot less intimidating if all you are trying to do is programmatically generate Haskell source: http://hackage.haskell.org/package/haskell-src-exts The base types are here:

[Haskell-cafe] Fwd: Basic Parsec float integer parsing question

2013-07-05 Thread Antoine Latter
Forwarding to the list. -- Forwarded message -- From: Fredrik Karlsson dargo...@gmail.com Date: Fri, Jul 5, 2013 at 11:42 AM Subject: [Haskell-cafe] Basic Parsec float integer parsing question To: haskell-cafe@haskell.org Dear list, Sorry for asking a simple parsec question,

Re: [Haskell-cafe] Layer on a layer of record syntax in the type synonym?

2012-12-23 Thread Antoine Latter
You could look into the Generic Monoid solution proposed in your other thread, then you wouldn't need your Socket types - you would use the Generic Monoid machinery to make a Monoid instance for whatever type needed it. This approach loses some type-safety, as you might pass on version of a

Re: [Haskell-cafe] SOX - play simple

2012-11-29 Thread Antoine Latter
The example is assuming you have an import statement like this: import qualified Sound.Sox.Option.Format as Option On Wed, Nov 28, 2012 at 8:48 AM, Gary Klindt gary.kli...@googlemail.com wrote: Dear Cafe, after installing the Sox library (cabal install sox) I wanted to let run a minimal

Re: [Haskell-cafe] How do I specify language literals in hsparql?

2012-10-21 Thread Antoine Latter
On Sun, Oct 21, 2012 at 10:41 AM, Andrew Pennebaker andrew.penneba...@gmail.com wrote: If the raw SPARQL is rdfs:label D (programming language)@en, what would the hsparql syntax be? The docs don't include any language literal examples. Have you emailed the maintainer of the package? Not all

Re: [Haskell-cafe] How to correctly benchmark code with Criterion?

2012-10-18 Thread Antoine Latter
On Thu, Oct 18, 2012 at 4:23 AM, Janek S. fremenz...@poczta.onet.pl wrote: Dear list, during past few days I spent a lot of time trying to figure out how to write Criterion benchmarks, so that results don't get skewed by lazy evaluation. I want to benchmark different versions of an

Re: [Haskell-cafe] How to correctly benchmark code with Criterion?

2012-10-18 Thread Antoine Latter
On Thu, Oct 18, 2012 at 9:06 AM, Janek S. fremenz...@poczta.onet.pl wrote: So the evaluation will be included in the benchmark, but if bench is doing enough trials it will be statistical noise. When I intentionally delayed my dataBuild function (using delayThread 100) the estimated time

Re: [Haskell-cafe] ANNOUNCE: uuid-1.2.6

2012-09-21 Thread Antoine Latter
On Fri, Sep 21, 2012 at 12:30 AM, David Fox dds...@gmail.com wrote: I was wondering about this: -- My goal with this instance was to make it work just enough to do what -- I want when used with the HStringTemplate library. instance Data UUID where toConstr uu = mkConstr uuidType

Re: [Haskell-cafe] What is the good way to work with list comprehension and UTCTime?

2012-09-16 Thread Antoine Latter
On Sun, Sep 16, 2012 at 5:04 PM, Richard O'Keefe o...@cs.otago.ac.nz wrote: On 15/09/2012, at 5:14 AM, Chris Heller wrote: You might want to have a look at the time-recurrence package: http://hackage.haskell.org/package/time-recurrence For your simple cases you would do something like:

Re: [Haskell-cafe] Data structure containing elements which are instances of the same type class

2012-08-11 Thread Antoine Latter
It should be pretty easy to write an adapter function of type String - (Show a = a). On Aug 11, 2012 12:34 PM, Patrick Palka patr...@parcs.ath.cx wrote: On Sat, Aug 11, 2012 at 4:14 AM, o...@okmij.org wrote: I'd like to point out that the only operation we can do on the first argument of

Re: [Haskell-cafe] parsec: parserFail multiple error messages

2012-08-08 Thread Antoine Latter
On Wed, Aug 8, 2012 at 8:26 PM, silly silly8...@gmail.com wrote: Inserting a character into the stream can be expensive if for example the stream is a ByteString. I tried the following crazy solution and it seems that it works: succeed :: Parser () succeed = mkPT $ \st - return $

Re: [Haskell-cafe] Capturing the parent element as I parse XML using parsec

2012-07-29 Thread Antoine Latter
On Sun, Jul 29, 2012 at 1:21 AM, C K Kashyap ckkash...@gmail.com wrote: Hi, With the help of the cafe I've been able to write up the xml parser using parsec - https://github.com/ckkashyap/really-simple-xml-parser/blob/master/RSXP.hs I am struggling with an idea though - How can I capture

Re: [Haskell-cafe] Need help with learning Parsec

2012-07-22 Thread Antoine Latter
On Sun, Jul 22, 2012 at 11:00 AM, C K Kashyap ckkash...@gmail.com wrote: What's the function to access it? The function 'runParser' returns either a result or a ParseError. You can extract the error position with the 'errorPos' function, and then you can extract the name of the file from the

Re: [Haskell-cafe] Fwd: hackage compile failure with QuickCheck 2.5

2012-07-17 Thread Antoine Latter
Cabal doesn't play well with version constraints on the template-haskell package - it doesn't know it can't reinstall template-haskell. The workaround is to figure out why QuickCheck has version constraints on template-haskell and solve that problem in the QuickCheck package a different way -

Re: [Haskell-cafe] strange hangs with -threaded runtime (now with test case)

2012-07-14 Thread Antoine Latter
Well, hPipeFrom does indeed call forkProcess internally. I don't fully understand when it is and is not safe to use 'forkProcess' with the threaded runtime of GHC. Which version of GHC are you using? Antoine On Sat, Jul 14, 2012 at 1:24 PM, Joey Hess j...@kitenet.net wrote: I've found a

Re: [Haskell-cafe] strange hangs with -threaded runtime (now with test case)

2012-07-14 Thread Antoine Latter
If the MVar was set up prior to the fork, I can imagine things going crazy trying to use it on the ther side of the fork - especially if their were waiting readers or writers while the fork was executing. On Jul 14, 2012 3:01 PM, Joey Hess j...@kitenet.net wrote: I've isolated the hang further

Re: [Haskell-cafe] Question on proper use of Data.IORef

2012-06-22 Thread Antoine Latter
On Fri, Jun 22, 2012 at 11:18 AM, Captain Freako capn.fre...@gmail.com wrote: Okay, I get it now. Thanks to all of you for your quick replies! So, here's what I need to do: My Haskell code gets called by a higher level C function and asked to initialize itself. As part of that

[Haskell-cafe] ANNOUNCE: uuid-1.2.6

2012-06-13 Thread Antoine Latter
Hi folks, I'm happy to announce a new point release of the uuid library, 1.2.6: http://hackage.haskell.org/package/uuid-1.2.6 The 'uuid' package implements most of RFC 4122[1] including random generation and generation based on hardware MAC addresses. I haven't announced a point-release in a

Re: [Haskell-cafe] Troubles understanding Parsec Error Handling

2012-06-11 Thread Antoine Latter
On Wed, May 30, 2012 at 5:47 PM, Roman Cheplyaka r...@ro-che.info wrote: With this patch your code prints:    parse error at (line 1, column 7):    unexpected Hallofb, expecting one of [Hello,Hallo,Foo,HallofFame] Hi folks, Roman's patch has been included in the newly-released parsec

Re: [Haskell-cafe] GHC 7.4 and TypeSynonymInstances

2012-06-06 Thread Antoine Latter
On Fri, Apr 20, 2012 at 12:25 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: Has there been a change in the behaviour/requirement of TypeSynonymInstances as of GHC-7.4.1? (Not sure if this behaviour occurs with 7.2.1 as I don't have it installed) I had an instance for String for a

Re: [Haskell-cafe] Re-exports of resourcet in conduit

2012-06-02 Thread Antoine Latter
Is it possible that you are puuling in two different versions of the package that defines the MonadThrow class? That is, package a was built against version 1, but package b was built against version 2? This would make GHC think the type-class were incompatable. This is just a guess - I have not

Re: [Haskell-cafe] Troubles understanding Parsec Error Handling

2012-05-30 Thread Antoine Latter
On Wed, May 30, 2012 at 4:18 PM, Kevin Charter kchar...@gmail.com wrote: On Wed, May 30, 2012 at 3:11 PM, Kevin Charter kchar...@gmail.com wrote: What version of parsec 3 are you using? In version 3.1.1, I get (using Text.Parsec.String instead of Text.Parsec.Text): Ah, answered my own

Re: [Haskell-cafe] Template Haskell antiquotation in user-defined quasiquoters

2012-05-25 Thread Antoine Latter
On Fri, May 25, 2012 at 2:51 PM, Sam Lindley sam.lind...@ed.ac.uk wrote: Template Haskell supports antiquotation for built-in quasiquotes, e.g.:  [| \x - x + $([|3 * 4|]) |] However, as far as I can tell, there is no way of supporting antiquotation in user-defined quasiquoters, because the

Re: [Haskell-cafe] Problem with packet documentation generated by cabal on windows 7

2012-05-25 Thread Antoine Latter
On Fri, May 25, 2012 at 6:28 PM, Nicu Ionita nicu.ion...@acons.at wrote: I have Haskell Platform 2011.2.0.1 and I assumed that haddock comes with it. Now I checked the version - it is 2.9.2 and cabal info tells me that the last version is 2.10.0 and that I don't have the package installed

Re: [Haskell-cafe] Safe Haskell at the export symbol granularity?

2012-05-17 Thread Antoine Latter
On Thu, May 17, 2012 at 8:50 AM, Ryan Newton rrnew...@gmail.com wrote: Thanks David. I'm glad to see it was discussed in the wiki.  (Btw, my 2 cents is that I like the comment pragmas more than new keywords.) The issue that I think doesn't make it into the wiki is of splitting, not modules,

Re: [Haskell-cafe] Datapacker?

2012-05-09 Thread Antoine Latter
What is datapacker? Can you summarize the sort of problem you are having? On May 9, 2012 9:34 PM, sharon kimble boudic...@talktalk.net wrote: Is this the right place to ask questions about datapacker please? If not, can anyone tell me where is please? Thanks Sharon. -- A taste of linux =

Re: [Haskell-cafe] Datapacker?

2012-05-09 Thread Antoine Latter
On Wed, May 9, 2012 at 10:09 PM, sharon kimble boudic...@talktalk.net wrote: On Thursday 10 May 2012 04:01:56 you wrote: What is datapacker? Can you summarize the sort of problem you are having? https://github.com/jgoerzen/datapacker/wiki datapacker is a tool to group files by

Re: [Haskell-cafe] Uploading a new hsc2hs

2012-04-25 Thread Antoine Latter
On Wed, Apr 25, 2012 at 4:59 PM, Thomas DuBuisson thomas.dubuis...@gmail.com wrote: Warning: I, not the maintainer of hsc2hs, will be uploading a trivial fix for hsc2hs to hackage (new build deps).  Even after public attempts to contact anyone in charge of hsc2hs (last January) there still

Re: [Haskell-cafe] prettyprint with IO

2012-04-12 Thread Antoine Latter
Hi Warren, On Thu, Apr 12, 2012 at 6:31 PM, Warren Harris warrensomeb...@gmail.com wrote: I wrote a parsec parser that does symbols lookups during the parsing process (ParsecT String Store IO a). Now I'd like to write a pretty printer that does the reverse. Unfortunately there doesn't appear

Re: [Haskell-cafe] using FlexibleInstances and OverlappingInstances

2012-04-07 Thread Antoine Latter
On Sat, Apr 7, 2012 at 12:08 PM, TP paratribulati...@free.fr wrote: Hello, In a module I am writing, I would like to use FlexibleInstances and OverlappingInstances. But I get errors, so I am trying to reproduce the problems on a smaller program: Is your actual issue with Showing a list? If

Re: [Haskell-cafe] Is there a generic way to detect mzero?

2012-03-26 Thread Antoine Latter
On Mon, Mar 26, 2012 at 1:33 PM, Ting Lei tin...@hotmail.com wrote: Hi, I was writing a code trying to use MonadPlus to detect some error cases (representing missing values etc. in pure code). With the Maybe monad, I can do this: can0 :: (a - Maybe b) - a - Bool can0 f x = case f x of

Re: [Haskell-cafe] Is there a generic way to detect mzero?

2012-03-26 Thread Antoine Latter
On Mon, Mar 26, 2012 at 4:25 PM, Ting Lei tin...@hotmail.com wrote: Hi Antoine and Tobias (and everyone else), Thanks a lot for your answers. They are really helpful Can you please show me how to use the (Eq m) constraint to do this? Also, my general question (probably novice-level) is that

Re: [Haskell-cafe] Quickest way to pass Text to C code

2012-03-21 Thread Antoine Latter
On Wed, Mar 21, 2012 at 3:35 AM, Yves Parès yves.pa...@gmail.com wrote: Hello, I have to interact with a C++ library that accepts as string types (putting c++ strings aside) pointers of wchar_t (CWString in Haskell) or unsigned 32-bit int (Ptr Word32 for UTF-32 codepoints). I have read what

Re: [Haskell-cafe] cabal test-suite library recompilation

2012-03-13 Thread Antoine Latter
On Tue, Mar 13, 2012 at 11:16 AM, Ozgur Akgun ozgurak...@gmail.com wrote: While waiting for a build to finish [ :) ], I just wanted to write an email and check if this is intentional or only an oversight. Or maybe a technical limitation for the time being? If your library code and test code

Re: [Haskell-cafe] Impact of try on Parsec performance

2012-03-02 Thread Antoine Latter
On Fri, Mar 2, 2012 at 10:35 PM, Erik de Castro Lopo mle...@mega-nerd.com wrote: Omari Norman wrote: So my question is: what is the practical impact of using try? My experience is based mostly on trying to improve the error location reporting in Ben Lippmeier's DDC compiler. What I found was

Re: [Haskell-cafe] Impact of try on Parsec performance

2012-03-02 Thread Antoine Latter
On Fri, Mar 2, 2012 at 10:30 PM, Omari Norman om...@smileystation.com wrote: The Parsec documentation says that Parsec performs best on predictive grammars, and Parsec does not backtrack by default to improve performance (though this also improves error messages). A big thing that parsec

Re: [Haskell-cafe] Compressed Data.Map for more efficient RAM usage?

2012-02-16 Thread Antoine Latter
On Thu, Feb 16, 2012 at 3:51 PM, Jeremy Shaw jer...@n-heptane.com wrote: Sometimes we  want to store very large collection types in RAM -- such as a Data.Map or Data.IxSet. It seems like we could trade-off some speed for space savings by compressing the values in RAM. Lemmih has previously

Re: [Haskell-cafe] Compressed Data.Map for more efficient RAM usage?

2012-02-16 Thread Antoine Latter
On Thu, Feb 16, 2012 at 4:29 PM, Johan Tibell johan.tib...@gmail.com wrote: On Thu, Feb 16, 2012 at 2:03 PM, Antoine Latter aslat...@gmail.com wrote: You could have a re-implemented HashMap which would un-pack the payload's ByteString constructor into the leaves of the HashMap type itself

Re: [Haskell-cafe] Haskell-Cafe Tag (was: Optimizations and parallel execution in the IO for a small spellchecker)

2012-02-15 Thread Antoine Latter
On Wed, Feb 15, 2012 at 1:49 PM, JP Moresmau jpmores...@gmail.com wrote: I was not aware that it was something a poster was supposed to do, but now I notice that while the messages I get from the list have [Haskell-Cafe] on their subject, the ones I post don't. The Haskell-Cafe info page

Re: [Haskell-cafe] [haskell-cafe] Some reflections on Haskell

2012-02-14 Thread Antoine Latter
On Tue, Feb 14, 2012 at 9:13 AM, Doug McIlroy d...@cs.dartmouth.edu wrote: Nevertheless, I share Jardine's concern about the central problem. It is hard to find one's way in this ecosystem.  It needn't be, as Java illustrates.  To my mind Java's great contribution to the world is its library

Re: [Haskell-cafe] Building a Haskell project which depends on an old version of base

2012-02-14 Thread Antoine Latter
On Tue, Feb 14, 2012 at 3:53 PM, Rogan Creswick cresw...@gmail.com wrote: On Tue, Feb 14, 2012 at 12:14 PM, Steven J. Murdoch steven.murd...@cl.cam.ac.uk wrote: $ ghc-pkg list base /Users/ghc6/homebrew/Cellar/ghc/6.12.3/lib/ghc/package.conf.d   base-3.0.3.2   base-4.2.0.2 I'm a bit fuzzy

Re: [Haskell-cafe] Hackage 2 maintainership

2012-02-13 Thread Antoine Latter
On Mon, Feb 13, 2012 at 5:44 PM, Ben Gamari bgamari.f...@gmail.com wrote: Hey all, Those of you who follow the Haskell subreddit no doubt saw today's post regarding the status of Hackage 2. As has been said many times in the past, the primary blocker at this point to the adoption of Hackage 2

Re: [Haskell-cafe] Hackage 2 maintainership

2012-02-13 Thread Antoine Latter
On Mon, Feb 13, 2012 at 10:17 PM, Antoine Latter aslat...@gmail.com wrote: On Mon, Feb 13, 2012 at 5:44 PM, Ben Gamari bgamari.f...@gmail.com wrote: Hey all, Those of you who follow the Haskell subreddit no doubt saw today's post regarding the status of Hackage 2. As has been said many times

Re: [Haskell-cafe] Stable pointers: use of cast to/from Ptr

2012-02-12 Thread Antoine Latter
On Sun, Feb 12, 2012 at 8:18 AM, Yves Parès yves.pa...@gmail.com wrote: Hello, According to the documentation (http://hackage.haskell.org/packages/archive/base/4.5.0.0/doc/html/Foreign-StablePtr.html), StablePtrs aims at being opaque on C-side. But they provide functions to be casted to/from

Re: [Haskell-cafe] Stable pointers: use of cast to/from Ptr

2012-02-12 Thread Antoine Latter
On Sun, Feb 12, 2012 at 3:09 PM, Yves Parès yves.pa...@gmail.com wrote: But then, In use case 1), how can a Haskell function modify the data addressed? http://hackage.haskell.org/packages/archive/base/latest/doc/html/Foreign-StablePtr.html#v:deRefStablePtr Antoine

Re: [Haskell-cafe] Happstack-state in non-happstack production apps

2012-02-10 Thread Antoine Latter
On Fri, Feb 10, 2012 at 3:56 PM, Tom Murphy amin...@gmail.com wrote: Hi,     Is it common to use happstack-state without happstack for real-world code (web or otherwise)? The package 'acid-state' is considered the successor to happstack-state, and it doesn't include 'happstack' in it's name

Re: [Haskell-cafe] Contributing to http-conduit

2012-02-07 Thread Antoine Latter
On Tue, Feb 7, 2012 at 10:28 PM, Myles C. Maxfield myles.maxfi...@gmail.com wrote: I have been looking around at possibly making a Browser module for Network.HTTP.Conduit on top of Control.Monad.State. I came across this roadbump: In order to implement redirection following, client code must

Re: [Haskell-cafe] The State of Testing?

2012-02-02 Thread Antoine Latter
On Thu, Feb 2, 2012 at 4:30 PM, Michael Craig mks...@gmail.com wrote: I've been picking up Haskell as a side project for the last few months, and I'm now considering publishing some useful code I've written and reused in several small projects. So far I've done relatively little with testing

Re: [Haskell-cafe] [Haskell] ANNOUNCE multiarg - parser combinators for command line parsing

2012-01-31 Thread Antoine Latter
On Mon, Jan 30, 2012 at 8:19 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Sun, 29 Jan 2012, Simon Meier wrote: I'm currently using Neil Mitchell's cmdargs package [1]. How does your package compare to that? Last time I checked cmdargs it was not referential transparent.

Re: [Haskell-cafe] help with safecopy + acid-state

2012-01-31 Thread Antoine Latter
On Tue, Jan 31, 2012 at 8:27 AM, Johannes Waldmann waldm...@imn.htwk-leipzig.de wrote: Can I really rename  old.T = new.T_orig ? It looks as if then tries to load the wrong acid-state snapshot. The name of your data type doesn't matter as acid-state doesn't store that on the disk. I

Re: [Haskell-cafe] C++ Parser?

2012-01-24 Thread Antoine Latter
On Tue, Jan 24, 2012 at 4:06 AM, Christopher Brown cm...@st-andrews.ac.uk wrote: Hi, I have stumbled across language-c on hackage and I was wondering if anyone is aware if there exists a full C++ parser written in Haskell? I'm not aware of one. When it comes to parsing C++, I've always

Re: [Haskell-cafe] In-memory Handle for testing

2012-01-20 Thread Antoine Latter
On Fri, Jan 20, 2012 at 5:53 AM, Simon Hengel s...@typeful.net wrote: For testing I want to stub handles, performing all reads and writes in memory (and in process, so no mmap).  From looking at the documentation of mkFileHandle[1], I think this should be possible.  But it requires some work.  

Re: [Haskell-cafe] Not an isomorphism, but what to call it?

2012-01-19 Thread Antoine Latter
On Thu, Jan 19, 2012 at 3:24 PM, Sean Leather leat...@cs.uu.nl wrote: I have two types A and B, and I want to express that the composition of two functions f :: B - A and g :: A - B gives me the identity idA = f . g :: A - A. I don't need g . f :: B - B to be the identity on B, so I want a

Re: [Haskell-cafe] STM: nested atomically error

2012-01-12 Thread Antoine Latter
On Thu, Jan 12, 2012 at 6:48 AM, Johan Brinch brin...@gmail.com wrote: Hi all, I'm seeing the Control.Concurrent.STM.atomically was nested error, but I just can't figure out what's happening. I'm not using any unsafe IO (only for debug printing), and the test program is only running one

[Haskell-cafe] ANNOUNCE: quickcheck-instances

2012-01-12 Thread Antoine Latter
Hello! I'd like to announce the first release of the quickcheck-instances package, which aims to consolidate commonly needed class instances for use with QuickCheck. These instances are appropriate when your tests don't have strong requirements on the nature of the input data - for example, if

Re: [Haskell-cafe] When will constraint kinds roll out?

2012-01-10 Thread Antoine Latter
On Tue, Jan 10, 2012 at 1:04 PM, Nicholas Tung nt...@ntung.com wrote: Just a quick, logistical question: I see constraint kinds didn't make it to GHC 7.2.2; does anyone have guesses when the extension will roll out in an official release? Our research team is interested in using Haskell for an

Re: [Haskell-cafe] too many open files using snap

2012-01-08 Thread Antoine Latter
2012/1/8 Eric Wong wsy...@gmail.com: I run both of these commands and found out that there're sockets leaking. Most of them are TCP connections in CLOSE_WAIT state. There're also some socket with can't identify protocol. So, What's the problem? Is it related to the timeout in the server

Re: [Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

2012-01-07 Thread Antoine Latter
On Sat, Jan 7, 2012 at 10:12 PM, Aristid Breitkreuz arist...@googlemail.com wrote: 2012/1/8 Vincent Hanquez t...@snarc.org: What would you prefer ? At the moment, i'm inclined to someday move cryptohash apis to be similar to crypto-api. i.e. from a result type being a bytestring to an opaque

Re: [Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

2012-01-07 Thread Antoine Latter
On Sun, Jan 8, 2012 at 12:39 AM, Thomas DuBuisson thomas.dubuis...@gmail.com wrote: Why? I don't actually need the hash object for anything, usually. All I need is the ByteString, and then I need to learn how to use the cereal package to get it... What would you think if Crypto.Classes

[Haskell-cafe] Package for QuickCheck instances

2012-01-06 Thread Antoine Latter
Hi Haskell, I was writing some tests that involved a large number of quickcheck properties which don't ship with the library itself, so I thought I would package them all together and put the orphan instances on Hackage. Here's what I have so far:

Re: [Haskell-cafe] haxr standalone server?

2012-01-05 Thread Antoine Latter
On Thu, Jan 5, 2012 at 9:40 AM, Johannes Waldmann waldm...@imn.htwk-leipzig.de wrote: How could I use haxr (http://www.haskell.org/haskellwiki/HaXR) to build a stateful server? It should listen on some port, and fork threads (inside Haskell land) to handle incoming calls. Any of the Haskell

Re: [Haskell-cafe] [Haskell-beginners] WinRT and Haskell

2012-01-05 Thread Antoine Latter
++ projections rely on compiler extensions for the MS C/C++ compiler, so I don't think we could use those directly from Haskell. Antoine On Thu, Jan 5, 2012 at 8:11 PM, Antoine Latter aslat...@gmail.com wrote: On Thu, Jan 5, 2012 at 5:12 AM, AbdulSattar Mohammed codingta...@gmail.com wrote: I suppose

Re: [Haskell-cafe] (no subject)

2012-01-05 Thread Antoine Latter
On Thu, Jan 5, 2012 at 10:54 AM, Christoph Breitkopf chbreitk...@googlemail.com wrote: Hello, I'm trying to figure out how to handle versioning of my IntervalMap package. I've just read the package versioning policy: http://www.haskell.org/haskellwiki/Package_versioning_policy I don't quite

Re: [Haskell-cafe] Sudden monomorphism with -XTypeFamilies

2012-01-05 Thread Antoine Latter
On Thu, Jan 5, 2012 at 3:32 PM, Rian Hunter r...@thelig.ht wrote: hello i'm getting inconsistent monomorphism behavior with the same code only depending on whether or not -XTypeFamilies is enabled: Which version of GHC are you using? Starting with GHC 7.0, the TypeFamilies extension implies

Re: [Haskell-cafe] Solved but strange error in type inference

2012-01-04 Thread Antoine Latter
On Wed, Jan 4, 2012 at 9:08 AM, Thiago Negri evoh...@gmail.com wrote: Do not compile: f :: a - a f x = x :: a    Couldn't match type `a' with `a1'      `a' is a rigid type variable bound by          the type signature for f :: a - a at C:\teste.hs:4:1      `a1' is a rigid type variable

Re: [Haskell-cafe] Windows: openFile gives permission denied whenfilein use

2011-12-29 Thread Antoine Latter
On Thu, Dec 29, 2011 at 11:49 AM, Donn Cave d...@avvanta.com wrote: Quoth Antoine Latter aslat...@gmail.com, ... http://www.haskell.org/pipermail/libraries/2011-October/016978.html ... wherein Ian Lynagh proposed to remove this feature and let the programmer enforce locking

Re: [Haskell-cafe] On the purity of Haskell

2011-12-29 Thread Antoine Latter
On Thu, Dec 29, 2011 at 11:14 AM, Gregg Reynolds d...@mobileink.com wrote: On Dec 29, 2011, at 11:01 AM, Iustin Pop wrote: And to clarify better my original email: yes, (bar x) always gives you back the same IO action; More precisely: the same *type*. I'm confused - what do you mean by

Re: [Haskell-cafe] Windows: openFile gives permission deniedwhenfilein use

2011-12-29 Thread Antoine Latter
On Thu, Dec 29, 2011 at 12:28 PM, Donn Cave d...@avvanta.com wrote: Quoth Antoine Latter aslat...@gmail.com, ... Would this program then loop: append fromFilePath toFilePath = do   str - readFile fromFile   writeFile toFile str if 'from' and 'to' where the same file? Currently

Re: [Haskell-cafe] Windows: openFile gives permission denied whenfile in use

2011-12-29 Thread Antoine Latter
On Thu, Dec 29, 2011 at 10:53 AM, Donn Cave d...@avvanta.com wrote: Quoth Andrew Coppin andrewcop...@btinternet.com, On 29/12/2011 04:29 AM, Antoine Latter wrote: ... This bug and its discussion is similar, but not identical: http://hackage.haskell.org/trac/ghc/ticket/4363 This one has been

Re: [Haskell-cafe] Windows: openFile gives permission denied when file in use

2011-12-28 Thread Antoine Latter
On Wed, Dec 28, 2011 at 3:52 PM, Michael Snoyman mich...@snoyman.com wrote: Hi all, I just received a bug report from a client that, when an input file is open in FrameMaker, my program gives a permission denied error. This bug is reproducible with a simple Haskell program: import System.IO

Re: [Haskell-cafe] On the purity of Haskell

2011-12-28 Thread Antoine Latter
On Wed, Dec 28, 2011 at 3:45 PM, Steve Horne sh006d3...@blueyonder.co.uk wrote: On 28/12/2011 20:44, Heinrich Apfelmus wrote: Steve Horne wrote: This is just my view on whether Haskell is pure, being offered up for criticism. I haven't seen this view explicitly articulated anywhere before,

Re: [Haskell-cafe] Windows: openFile gives permission denied when file in use

2011-12-28 Thread Antoine Latter
On Wed, Dec 28, 2011 at 3:52 PM, Michael Snoyman mich...@snoyman.com wrote: Hi all, I just received a bug report from a client that, when an input file is open in FrameMaker, my program gives a permission denied error. This bug is reproducible with a simple Haskell program: This bug and its

Re: [Haskell-cafe] Non-exhaustive pattern match warning (incorrect?)

2011-12-26 Thread Antoine Latter
On Mon, Dec 26, 2011 at 1:21 PM, Michael Orlitzky mich...@orlitzky.com wrote: I'm cleaning up some old projects, and hit this:  src/Octet.hs:47:27:    Warning: Pattern match(es) are non-exhaustive    In a record-update construct: Patterns not matched: Octet.None But in the source, I've

Re: [Haskell-cafe] Non-exhaustive pattern match warning (incorrect?)

2011-12-26 Thread Antoine Latter
On Mon, Dec 26, 2011 at 2:19 PM, Michael Orlitzky mich...@orlitzky.com wrote: On 12/26/11 13:42, Antoine Latter wrote: Am I overlooking something, or did I already match Octet.None? What is your definition of the 'Octet' type? -- An Octet consists of eight bits. For our purposes, the most

Re: [Haskell-cafe] Images in Haddock documentation: best practices?

2011-12-24 Thread Antoine Latter
On Sun, Dec 25, 2011 at 12:04 AM, Brent Yorgey byor...@seas.upenn.edu wrote: Hi all, Although it doesn't seem to be documented in the user manual (!), Haddock supports inline images, using a url syntax.  I'd like to include some images in the documentation for a package I'm writing, but not

Re: [Haskell-cafe] Mitigating state-threading through an application loop

2011-12-20 Thread Antoine Latter
On Tue, Dec 20, 2011 at 11:08 AM, Michael Serra mk.se...@gmail.com wrote: Hello Haskellers,   I'm implementing a simple tree-manipulating (for sports tournaments) application prototype, with SDL for graphics and simple user interaction. For reference, I've posted the code on hpaste.  My

Re: [Haskell-cafe] [Alternative] change some/many semantics

2011-12-15 Thread Antoine Latter
On Thu, Dec 15, 2011 at 2:20 AM, Gregory Crosswhite gcrosswh...@gmail.com wrote: On Dec 15, 2011, at 6:19 PM, Gregory Crosswhite wrote: After all, we already have the Monad typeclass which gives them essentially the same functionality. Make that the *Monoid* typeclass.  :-) And this is an

Re: [Haskell-cafe] Splitting off many/some from Alternative

2011-12-14 Thread Antoine Latter
On Wed, Dec 14, 2011 at 8:03 PM, Ross Paterson r...@soi.city.ac.uk wrote: The current definition says that some and many should be the least solutions of the equations    some v = (:) $ v * many v    many v = some v | pure [] We could relax that to just requiring that they satisfy these

Re: [Haskell-cafe] [Alternative] change some/many semantics

2011-12-14 Thread Antoine Latter
On Wed, Dec 14, 2011 at 9:58 PM, Gregory Crosswhite gcrosswh...@gmail.com wrote: Hey everyone, This is even more out there than my previous posts, but the following just occurred to me:  is it absolutely necessary that some/many have produced the entire list of results before returning?  

Re: [Haskell-cafe] [Alternative] change some/many semantics

2011-12-14 Thread Antoine Latter
On Wed, Dec 14, 2011 at 10:33 PM, Gregory Crosswhite gcrosswh...@gmail.com wrote: On Dec 15, 2011, at 2:13 PM, Antoine Latter wrote: Isn't this what Ross previously suggested? I think his suggested instance methods for Maybe return the elements of the lists incrementally. Yes and no.  Yes

Re: [Haskell-cafe] [Alternative] change some/many semantics

2011-12-14 Thread Antoine Latter
On Wed, Dec 14, 2011 at 10:57 PM, Brandon Allbery allber...@gmail.com wrote: On Wed, Dec 14, 2011 at 23:49, Antoine Latter aslat...@gmail.com wrote: Or we could not use 'some' and 'many' with list and maybe :-) Yes, yes, we get the message, a wink and a nod is all that's needed to discard

Re: [Haskell-cafe] [Alternative] change some/many semantics

2011-12-14 Thread Antoine Latter
On Thu, Dec 15, 2011 at 1:23 AM, Gregory Crosswhite gcrosswh...@gmail.com wrote: On Dec 15, 2011, at 3:36 PM, Antoine Latter wrote: There are a lot of combinators you can build from (|) and empty that go terribly wrong for Maybe and List but are still quite useful. Yes, you *could* do

Re: [Haskell-cafe] [Alternative] change some/many semantics

2011-12-14 Thread Antoine Latter
On Thu, Dec 15, 2011 at 1:40 AM, Antoine Latter aslat...@gmail.com wrote: On Thu, Dec 15, 2011 at 1:23 AM, Gregory Crosswhite gcrosswh...@gmail.com wrote: On Dec 15, 2011, at 3:36 PM, Antoine Latter wrote: There are a lot of combinators you can build from (|) and empty that go terribly

Re: [Haskell-cafe] Splitting off many/some from Alternative

2011-12-12 Thread Antoine Latter
On Mon, Dec 12, 2011 at 4:30 PM, John Meacham j...@repetae.net wrote: Yes, they are major pains for frisby, which is a parser but needs to be cleverer about recursion, the many and some that come with applicative actually cause infinite loops. That's why 'many' and 'some' were promoted up to

Re: [Haskell-cafe] [ANNOUNCEMENT] xmobar 0.14

2011-12-11 Thread Antoine Latter
On Sun, Dec 11, 2011 at 8:48 AM, Peter Simons sim...@cryp.to wrote: Hi Jose,   Peter, would using parsec 3.x be an acceptable solution to you? well, we can link xmobar with parsec 3.x on NixOS. The situation is tricky, though, because the latest version of parsec that we have, 3.1.2,

Re: [Haskell-cafe] [ANNOUNCEMENT] xmobar 0.14

2011-12-11 Thread Antoine Latter
On Sat, Dec 10, 2011 at 5:31 PM, Brandon Allbery allber...@gmail.com wrote: On Sat, Dec 10, 2011 at 18:25, Peter Simons sim...@cryp.to wrote: previous versions of xmobar used to compile fine with GHC 6.10.4, but the new version no longer does:    src/Parsers.hs:163:52:        Couldn't match

Re: [Haskell-cafe] [ANNOUNCEMENT] xmobar 0.14

2011-12-11 Thread Antoine Latter
On Sun, Dec 11, 2011 at 10:10 AM, Brandon Allbery allber...@gmail.com wrote: On Sun, Dec 11, 2011 at 10:44, Antoine Latter aslat...@gmail.com wrote: On Sat, Dec 10, 2011 at 5:31 PM, Brandon Allbery allber...@gmail.com wrote: On Sat, Dec 10, 2011 at 18:25, Peter Simons sim...@cryp.to wrote

Re: [Haskell-cafe] [ANNOUNCEMENT] xmobar 0.14

2011-12-11 Thread Antoine Latter
On Sun, Dec 11, 2011 at 10:23 AM, Antoine Latter aslat...@gmail.com wrote: All of the imports in the ./src/Parsers.hs are from the Text.ParserCombinators.Parsec.* module space, which was intended to be a compatibility layer, and all of the parsers and parser-combinators in ./ser/Parsers.hs

Re: [Haskell-cafe] HaXml 1.13 - 1.22 upgrade

2011-12-10 Thread Antoine Latter
On Sun, Dec 11, 2011 at 12:08 AM, Michael Orlitzky mich...@orlitzky.com wrote: I'm trying to migrate one my programs from the old HaXml API to the new. Please, someone save me. I'm currently stuck with this, which works in 1.13. All of the filters work on Content, so I make some from the root

Re: [Haskell-cafe] Cabal issue

2011-12-09 Thread Antoine Latter
On Fri, Dec 9, 2011 at 5:20 AM, Kevin Jardine kevinjard...@gmail.com wrote: I understand that this may have been addressed before on this list in some form, so I'll be brief: Had problem with deprecated package, was told my only option was to wipe my Haskell install and start over. Is this

Re: [Haskell-cafe] Generating Code

2011-12-09 Thread Antoine Latter
On Fri, Dec 9, 2011 at 1:45 PM, L Corbijn aspergesoe...@gmail.com wrote: Hello, In an attempt to reduce the amount of boring repetitive work to update the OpenGLRaw package I've created a generator to do it partially for me. It currently uses haskell-src-exts for representing the haskell

Re: [Haskell-cafe] Generating Code

2011-12-09 Thread Antoine Latter
On Fri, Dec 9, 2011 at 2:17 PM, Erik Hesselink hessel...@gmail.com wrote: On Fri, Dec 9, 2011 at 20:45, L Corbijn aspergesoe...@gmail.com wrote: So I'm interested if there are other libraries that are more suitable to the task of generating haskell code for library use, and thus generate

Re: [Haskell-cafe] Generating Code

2011-12-09 Thread Antoine Latter
On Fri, Dec 9, 2011 at 6:32 PM, Brandon Allbery allber...@gmail.com wrote: On Fri, Dec 9, 2011 at 17:27, Antoine Latter aslat...@gmail.com wrote: On Fri, Dec 9, 2011 at 2:17 PM, Erik Hesselink hessel...@gmail.com wrote: Since you ask how other packages solve this problem, and since most

Re: [Haskell-cafe] Converting string to System.Time.ClockTime

2011-12-08 Thread Antoine Latter
On Thu, Dec 8, 2011 at 9:01 AM, dokondr doko...@gmail.com wrote: Now, when I have managed to convert UTCTime to seconds (see code below) I got stuck trying to convert from UTCTime to CalendarTime, how to do this? It might be easier to use 'diffUTCTime' and 'addUTCTime' instead of converting

Re: [Haskell-cafe] Converting string to System.Time.ClockTime

2011-12-08 Thread Antoine Latter
On Thu, Dec 8, 2011 at 9:13 AM, Antoine Latter aslat...@gmail.com wrote: On Thu, Dec 8, 2011 at 9:01 AM, dokondr doko...@gmail.com wrote: Now, when I have managed to convert UTCTime to seconds (see code below) I got stuck trying to convert from UTCTime to CalendarTime, how to do

Re: [Haskell-cafe] Converting string to System.Time.ClockTime

2011-12-08 Thread Antoine Latter
On Thu, Dec 8, 2011 at 9:30 AM, dokondr doko...@gmail.com wrote: Ok, maybe you could advise what packages to use for this simple scenario: I have two text strings with dates: s1 = Wed, 07 Dec 2011 10:09:21 + s2 = Wed, 07 Dec 2011 10:11:00 + I need: 1) Find how many seconds are

Re: [Haskell-cafe] ismzero operator possible without equal constraint

2011-12-03 Thread Antoine Latter
On Sat, Dec 3, 2011 at 10:55 AM, edgar klerks edgar.kle...@gmail.com wrote: Hi list, I am using MonadSplit (from http://www.haskell.org/haskellwiki/New_monads/MonadSplit )  for a project and now I want to make a library out of it. This seems to be straightforward, but I got stuck when I

Re: [Haskell-cafe] (no subject)

2011-11-28 Thread Antoine Latter
On Mon, Nov 28, 2011 at 4:12 PM, Willem Obbens dub...@hotmail.com wrote: Hello, I get this error when I try to derive an instance of the Show typeclass: Abc.hs:21:60:     Couldn't match expected type `Vector' with actual type `[Point]'     In the first argument of `show'', namely `xs'     In

Re: [Haskell-cafe] Lifted Spine View

2011-11-20 Thread Antoine Latter
2011/11/20 bob zhang bobzhang1...@gmail.com: Hi, all    I tried to follow the program of the paper Scrap your boilerpolate Revolutions. Unfortunately, I found the program in the section lifted spine view does not compile in my GHC, could anybody  point out where I am wrong? Many Thanks My

  1   2   3   4   5   6   >