[Haskell-cafe] cab 0.1.2

2011-04-07 Thread 山本和彦
Hello cafe, Let me announce "cab version 0.1.2". This version integrates "cabal-dev" as well as "cabal/ghc-pkg". So, you can use a sandbox for your development. http://www.mew.org/~kazu/proj/cab/en/ Here is the short explanation from the page above: "cab" is a MacPorts-like mainten

Re: [Haskell-cafe] Stateful iteratees

2011-04-07 Thread Ertugrul Soeylemez
Gregory Collins wrote: > On Thu, Apr 7, 2011 at 7:35 PM, Ertugrul Soeylemez wrote: > > > > Why can't you use #1 and do this when you call "run_"? > > > > Because that runs the iteratee and leaves me with a StateT.  Even > > though I use a CPS-based StateT, I doubt that it can be converted > > ba

Re: [Haskell-cafe] Is there a way to find out the type inferred for a local function inside another function? :)

2011-04-07 Thread Henning Thielemann
http://www.haskell.org/haskellwiki/Determining_the_type_of_an_expression ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Is there a way to find out the type inferred for a local function inside another function? :)

2011-04-07 Thread Daniel Fischer
On Thursday 07 April 2011 21:52:29, KC wrote: > There are probably better ways, but: module Infer where foo :: Num a => [a] -> a foo = go 0 0 where go :: b go i s (x:xs) = go (i+1) (s+i*x) xs go _ s _ = s $ ghc Infer [1 of 1] Compiling Infer( Infer.hs, Infer.o ) Infe

Re: [Haskell-cafe] DSL for task dependencies

2011-04-07 Thread S. Doaitse Swierstra
Eelco Dolstra has written a thesis about something like that. Unfortunataly not in Haskell. See http://nixos.org/ Doaitse On 17 mrt 2011, at 21:00, Serge Le Huitouze wrote: > Hi Haskellers! > > I think I remember reading a blog post or web page describing a > EDSL to describe tasks and their

[Haskell-cafe] Is there a way to find out the type inferred for a local function inside another function? :)

2011-04-07 Thread KC
-- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Stateful iteratees

2011-04-07 Thread Gregory Collins
On Thu, Apr 7, 2011 at 7:35 PM, Ertugrul Soeylemez wrote: >> Why can't you use #1 and do this when you call "run_"? > > Because that runs the iteratee and leaves me with a StateT.  Even though > I use a CPS-based StateT, I doubt that it can be converted back to > Iteratee easily. > > With the firs

Re: [Haskell-cafe] 'Progress bar' enumeratee

2011-04-07 Thread David Hotham
Very interesting - thanks! "Gregory Collins" wrote in message news:banlktikeh7aqfe2-jdq6docz+syw5mj...@mail.gmail.com... My enumerator style may not be the best (I'm long-winded), but personally when the stream types are the same on input and output I often skip the Enumeratee stuff and just

Re: [Haskell-cafe] Stateful iteratees

2011-04-07 Thread Ertugrul Soeylemez
Gregory Collins wrote: > > I'm trying to solve a very practical problem:  I need a stateful > > iteratee monad transformer.  Explicit state passing is very > > inconvenient and would destroy the elegance of my library. > > > > There are two approaches to this: > > > > 1. type MyT a m = Iteratee

Re: [Haskell-cafe] Stateful iteratees

2011-04-07 Thread Gregory Collins
On Thu, Apr 7, 2011 at 7:04 PM, Ertugrul Soeylemez wrote: > Hello fellow Haskellers, > > I'm trying to solve a very practical problem:  I need a stateful > iteratee monad transformer.  Explicit state passing is very inconvenient > and would destroy the elegance of my library. > > There are two app

[Haskell-cafe] Stateful iteratees

2011-04-07 Thread Ertugrul Soeylemez
Hello fellow Haskellers, I'm trying to solve a very practical problem: I need a stateful iteratee monad transformer. Explicit state passing is very inconvenient and would destroy the elegance of my library. There are two approaches to this: 1. type MyT a m = Iteratee a (StateT MyConfig m)

Re: [Haskell-cafe] parsec - source position information

2011-04-07 Thread Ozgur Akgun
Thanks! On 7 April 2011 16:27, Christopher Done wrote: > On 7 April 2011 17:22, Ozgur Akgun wrote: >> >> Is there a way to get source position[1] information from parsec while >> defining a >> parser? It surely knows about source positions, as they are used while >> reporting a parsing error. >

Re: [Haskell-cafe] parsec - source position information

2011-04-07 Thread Daniel Fischer
On Thursday 07 April 2011 17:22:56, Ozgur Akgun wrote: > Hi, > > Is there a way to get source position[1] information from parsec while > defining a > parser? It surely knows about source positions, as they are used while > reporting a parsing error. > > data Identifier = Identifier String Source

Re: [Haskell-cafe] parsec - source position information

2011-04-07 Thread Christopher Done
On 7 April 2011 17:22, Ozgur Akgun wrote: > > Is there a way to get source position[1] information from parsec while > defining a > parser? It surely knows about source positions, as they are used while > reporting a parsing error. > http://hackage.haskell.org/packages/archive/parsec/3.0.0/doc/ht

[Haskell-cafe] parsec - source position information

2011-04-07 Thread Ozgur Akgun
Hi, Is there a way to get source position[1] information from parsec while defining a parser? It surely knows about source positions, as they are used while reporting a parsing error. data Identifier = Identifier String SourcePos pIdentifier :: Parser Identifier pIdentifier = do pos <- ??

Re: [Haskell-cafe] Local copy of hackageDB

2011-04-07 Thread Vo Minh Thu
2011/4/7 José Pedro Magalhães : > Hi all, > > I want to use cabal-install on a machine without internet access. I tried > downloading http://hackage.haskell.org/cgi-bin/hackage-scripts/archive.tar, > unpacking it and setting the local-repo field in the config file to this > location but that doesn'

Re: [Haskell-cafe] Local copy of hackageDB

2011-04-07 Thread Markus Läll
This could be a nice feature and not hard to implement, maybe someone could take it up? 2011/4/7 José Pedro Magalhães > Yes, I have that tarball. I just don't know how to tell cabal-install to > use it. Going to each package, individually unpacking and installing it is > what I've been doing so

Re: [Haskell-cafe] ANNOUNCE: swish 0.3.0.0

2011-04-07 Thread Doug Burke
--- On Thu, 4/7/11, Graham Klyne wrote: > From: Graham Klyne > Subject: Re: ANNOUNCE: swish 0.3.0.0 > To: "Doug Burke" > Cc: Haskell-Cafe@haskell.org, vigalc...@gmail.com > Date: Thursday, April 7, 2011, 3:31 AM > Excellent, thanks for running with > this! > > I have an RDF/XML parser (based

Re: [Haskell-cafe] Local copy of hackageDB

2011-04-07 Thread José Pedro Magalhães
Yes, I have that tarball. I just don't know how to tell cabal-install to use it. Going to each package, individually unpacking and installing it is what I've been doing so far, but I was hoping that could be automated. Cheers, Pedro On Thu, Apr 7, 2011 at 14:18, Magnus Therning wrote: > On Thu

Re: [Haskell-cafe] Local copy of hackageDB

2011-04-07 Thread Magnus Therning
On Thu, Apr 7, 2011 at 11:21, Marc Weber wrote: > Local copy ? > You know that hackage is hosting several thausands of source archives - > also old versions you don't want? > > Do you want to mirror everything locally? > > Fetching "latest" versions only to generate hashes takes many hours. > (Exp

Re: [Haskell-cafe] Local copy of hackageDB

2011-04-07 Thread Marc Weber
Local copy ? You know that hackage is hosting several thausands of source archives - also old versions you don't want? Do you want to mirror everything locally? Fetching "latest" versions only to generate hashes takes many hours. (Experience from hack-nix). Marc Weber __

Re: [Haskell-cafe] Local copy of hackageDB

2011-04-07 Thread Yitzchak Gale
José Pedro Magalhães wrote: > Thanks, but I don't really need a functional server or anything; I just want > to have a local copy of Hackage on disk (latest versions only will do) and > tell cabal-install to use that instead of the web. If you have the package tarball, you can unpack it manually a

Re: [Haskell-cafe] Local copy of hackageDB

2011-04-07 Thread José Pedro Magalhães
Hi Yitz, Thanks, but I don't really need a functional server or anything; I just want to have a local copy of Hackage on disk (latest versions only will do) and tell cabal-install to use that instead of the web. Regarding yackage, I don't think I can open ports on that machine either... Thanks,

Re: [Haskell-cafe] Local copy of hackageDB

2011-04-07 Thread Yitzchak Gale
José Pedro Magalhães wrote: > I want to use cabal-install on a machine without internet access. Work is ongoing for a version of hackage that you can just install on your own server. Perhaps the people working on that can comment about the status. If all you want is a barebones server that you ca

Re: [Haskell-cafe] ANNOUNCE: DocTest-0.2.0

2011-04-07 Thread Michael Snoyman
On Thu, Apr 7, 2011 at 11:43 AM, Simon Hengel wrote: > > I like the idea of a getDocTests function. In theory, it could take a > cabal > > file as an argument, and use the Cabal library to get a list of all > modules to > > be checked. It would also be convenient if it automatically passed in GHC

Re: [Haskell-cafe] ANNOUNCE: DocTest-0.2.0

2011-04-07 Thread Simon Hengel
> I like the idea of a getDocTests function. In theory, it could take a cabal > file as an argument, and use the Cabal library to get a list of all modules to > be checked. It would also be convenient if it automatically passed in GHC > options correlating to each LANGUAGE pragma found on a module.

Re: [Haskell-cafe] ANNOUNCE: swish 0.3.0.0

2011-04-07 Thread Graham Klyne
Excellent, thanks for running with this! I have an RDF/XML parser (based on a fork of HaXML) that I'd like to integrate at some time, and it's remotely possible that I might have a little time to work on this in the coming months.. #g -- Doug Burke wrote: I am pleased to announce an update

Re: [Haskell-cafe] ANNOUNCE: DocTest-0.2.0

2011-04-07 Thread Michael Snoyman
On Wed, Apr 6, 2011 at 11:53 PM, Simon Hengel wrote: > Hello Michael, > > > I would like to integrate DocTest into my normal test suite procedures. > Do you > > have a recommended approach for this? I think I have projects using all > of > > test-framework[1], HTF[2] and hspect[3], so I'm not pick

[Haskell-cafe] Local copy of hackageDB

2011-04-07 Thread José Pedro Magalhães
Hi all, I want to use cabal-install on a machine without internet access. I tried downloading http://hackage.haskell.org/cgi-bin/hackage-scripts/archive.tar, unpacking it and setting the local-repo field in the config file to this location but that doesn't work, as cabal-install says that it is mi

Re: [Haskell-cafe] mtlx has a nice design but is slow

2011-04-07 Thread Simon Peyton-Jones
GHC's goal is to be good enough at inlining and optimisation that you shouldn't take a performance hit for adding layers of abstraction. Sometimes it needs help (eg inlining pragmas). So as Don implies, it might be worth digging a bit to see where the performance hit comes from. Simon |