Re: [Haskell-cafe] Is it possible to represent such polymorphism?

2011-10-04 Thread Andrew Coppin
On 04/10/2011 07:08 AM, Dominique Devriese wrote: All, In case anyone is interested, I just want to point out an interesting article about the relation between Haskell type classes and C++ (overloading + concepts): http://sms.cs.chalmers.se/publications/papers/2008-WGP.pdf Dominique Thanks f

Re: [Haskell-cafe] DSL for data definition (e.g. compiling Haskell type defs into Google's protocol buffers type defs)

2011-10-04 Thread wren ng thornton
On 10/4/11 12:02 PM, Karel Gardas wrote: Hello, I'm trying to find out if it's possible to use Haskell data type definition capability to define types and compile defined types into other languages, for example into Google's protocol buffers data definition language. So basically speaking I'm t

[Haskell-cafe] ANN: hledger-web 0.16.3

2011-10-04 Thread Simon Michael
I believe this release of hledger-web is really and truly installable from hackage. Thanks for the problem reports! Details at http://hledger.org/NEWS.html . On Oct 1, 2011, at 10:22 AM, Simon Michael wrote: > I'm pleased to announce version 0.16 of the hledger packages. This is a > stability/

Re: [Haskell-cafe] ANN: hit a reimplementation of git storage in haskell.

2011-10-04 Thread Conrad Parker
Hi Vincent, great stuff! I've also got an in-progress toy git clone called ght: http://github.com/kfish/ght. It only reads, no write support and no revspec parsing. I tried to keep close to the git design, using mmap and Ptr-based binary search to read pack indices etc. Doing so seems fairly un-H

Re: [Haskell-cafe] Fwd: LZMA for Haskell?

2011-10-04 Thread Nathan Howell
lzma.h is part of the xz-utils package, which is available here: http://tukaani.org/xz/ If you have any problems with the package let me know. On Tue, Oct 4, 2011 at 3:34 PM, Paulo Pocinho wrote: > (Thought it would be better to put this in the haskell-cafe list). > > Hello list. > > I'd like t

[Haskell-cafe] Fwd: LZMA for Haskell?

2011-10-04 Thread Paulo Pocinho
(Thought it would be better to put this in the haskell-cafe list). Hello list. I'd like to use LZMA to create/extract archives and compare CRC from archived files. What do I need to use LZMA in Haskell? There is a page called "Library/Compression" in the wiki [1] but it is from 2005, using LZMA

Re: [Haskell-cafe] ANN: hit a reimplementation of git storage in haskell.

2011-10-04 Thread Jason Dagit
On Tue, Oct 4, 2011 at 2:15 PM, Vincent Hanquez wrote: > Any comments welcome, Nice! Have you looked at Petr Rockai's hashed-storage? http://hackage.haskell.org/package/hashed-storage-0.5.8 Jason ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.or

Re: [Haskell-cafe] DSL for data definition (e.g. compiling Haskell type defs into Google's protocol buffers type defs)

2011-10-04 Thread Erik Hesselink
On Tue, Oct 4, 2011 at 20:33, Karel Gardas wrote: > data PersonType = Person { >        id :: Int >        , name :: String >        , email :: Maybe String >        } >        deriving (Show, Data, Typeable) > > > so I have `PersonType' as type constructor and Person as value constructor > (or da

[Haskell-cafe] ANN: hit a reimplementation of git storage in haskell.

2011-10-04 Thread Vincent Hanquez
Hi Haskellers, I just want to announce the hit project [1], which is a reimplementation of low level git operations to read *AND* write to a git repository. It support reading from anything i threw at it (loose objects, packed objects, deltas), a subset of revisions specifier (man gitrevisions

Re: [Haskell-cafe] DSL for data definition (e.g. compiling Haskell type defs into Google's protocol buffers type defs)

2011-10-04 Thread Antoine Latter
On Tue, Oct 4, 2011 at 1:33 PM, Karel Gardas wrote: > > Hello, > > thanks a lot to Edward, Jose, Ryan and Stephen for fast reply in this > thread. I see I've not been that precise in specification of what I need > exactly so I need to add this: I've changed a little bit definition of > person to:

Re: [Haskell-cafe] DSL for data definition (e.g. compiling Haskell type defs into Google's protocol buffers type defs)

2011-10-04 Thread Karel Gardas
Forgotten note: GHC's Generics as described here: http://haskell.org/ghc/docs/latest/html/libraries/ghc-prim-0.2.0.0/GHC-Generics.html#t:Datatype -- is not yet clear to me, I'm searching for more information about this in the meantime... Karel On 10/ 4/11 08:33 PM, Karel Gardas wrote: Hel

Re: [Haskell-cafe] DSL for data definition (e.g. compiling Haskell type defs into Google's protocol buffers type defs)

2011-10-04 Thread Karel Gardas
Hello, thanks a lot to Edward, Jose, Ryan and Stephen for fast reply in this thread. I see I've not been that precise in specification of what I need exactly so I need to add this: I've changed a little bit definition of person to: data PersonType = Person { id :: Int , name

Re: [Haskell-cafe] ANN: OpenCL 1.0.1.3 package

2011-10-04 Thread Jason Dagit
On Tue, Oct 4, 2011 at 12:54 AM, Luis Cabellos wrote: > I understand your point. I didn't know the problems with cross module > inlining that Haskell suffers. I learned the BSD3, I think is a good  and > I'll change it on github and I'll put in the next release. Oh cool. Thanks! I think that's

Re: [Haskell-cafe] Composing a list of Enumeratees into an Enumerator using ($=)

2011-10-04 Thread Román González
Hello guys, After some playing around trying to compose enumerators, I went through a different approach and tried instead to compose through Iteratees. The following code does compile correctly import Data.List (foldl') import Data.Enumerator hiding (foldl') import qualified Data.Enumerator.Lis

Re: [Haskell-cafe] DSL for data definition (e.g. compiling Haskell type defs into Google's protocol buffers type defs)

2011-10-04 Thread Stephen Tetley
On 4 October 2011 17:02, Karel Gardas wrote: > > Hello, [SNIP] > So > basically speaking I'm thinking about using Haskell sub-set as a > data-definition DSL together with some functions which will generate some > code based on supplied defined data types. ... This seems reminiscent of ASDL - th

Re: [Haskell-cafe] DSL for data definition (e.g. compiling Haskell type defs into Google's protocol buffers type defs)

2011-10-04 Thread Ryan Newton
An interesting and semi-related project was just presented at ICFP by Kathleen Fisher. It's called "Forest" and uses template haskell to create schema's for "FileStores" from Haskell definitions. But they're not plain-old-haskell type definitions... -Ryan On Tue, Oct 4, 2011 at 12:11 PM, Edw

Re: [Haskell-cafe] DSL for data definition (e.g. compiling Haskell type defs into Google's protocol buffers type defs)

2011-10-04 Thread José Pedro Magalhães
Hi Karel, You can use SYB's toConstr/dataTypeOf [1] to obtain information about the name of the constructor and datatype. Alternatively, you can also use the new generic programming framework of ghc-7.2 [2]. Cheers, Pedro [1] http://hackage.haskell.org/packages/archive/base/latest/doc/html/Data

Re: [Haskell-cafe] DSL for data definition (e.g. compiling Haskell type defs into Google's protocol buffers type defs)

2011-10-04 Thread Edward Z. Yang
Just making sure: have you looked at the Data.Data module yet? Edward Excerpts from Karel Gardas's message of Tue Oct 04 12:02:34 -0400 2011: > > Hello, > > I'm trying to find out if it's possible to use Haskell data type > definition capability to define types and compile defined types into

[Haskell-cafe] DSL for data definition (e.g. compiling Haskell type defs into Google's protocol buffers type defs)

2011-10-04 Thread Karel Gardas
Hello, I'm trying to find out if it's possible to use Haskell data type definition capability to define types and compile defined types into other languages, for example into Google's protocol buffers data definition language. So basically speaking I'm thinking about using Haskell sub-set as

Re: [Haskell-cafe] ANN: OpenCL 1.0.1.3 package

2011-10-04 Thread Ketil Malde
Luis Cabellos writes: > * The main reason is that I'm not comfortable with the license > you're using. The original code by Jeff Heard was BSD3 with an > additional copyright notice. Your code is AGPL3. The GPL is known to > cause problems with Haskell code due to cross module inlining. I >

Re: [Haskell-cafe] Is it possible to represent such polymorphism?

2011-10-04 Thread oleg
sdiyazg at sjtu.edu.cn wrote: > >> generalizedFilterMap (\[x,y,z]-> if(x==1&&z==1)then [y*10] else > >> [0]) (3,1) [1,2,3,4,1,2,1,3,1,4,1,5,2] > [0,0,0,0,20,0,30,0,40,0,0] > > Of course, I could have simply used [Int] , (Num a)=>[a] or > (Int,Int,Int), but I'm trying to write code as generic as

Re: [Haskell-cafe] ANN: OpenCL 1.0.1.3 package

2011-10-04 Thread Luis Cabellos
On Mon, Oct 3, 2011 at 6:04 PM, Jason Dagit wrote: > On Mon, Oct 3, 2011 at 3:56 AM, Luis Cabellos > wrote:Your bindings are a higher quality than the the OpenCLRaw bindings and > you're doing good technical work, but I stopped using your bindings > for a couple reasons: > * The main reason is

Re: [Haskell-cafe] Composing a list of Enumeratees into an Enumerator using ($=)

2011-10-04 Thread Román González
Hello Conrad, Thanks for taking the time to answer back. Actually I don't want to do anything fancy, I just want to compose a list of Enumeratees together into an Enumerator, using the same type for both ao and ai, I suspect it doesn't matter what the type of this ao and ai are, I would obtain th