Re: [Haskell-cafe] Type error when trying to adapt http-proxy to new conduit

2012-12-26 Thread Erik de Castro Lopo
Pieter Laeremans wrote: > Hi, > > The http-proxy package isn't compatible any longer with the latest > conduit. Since it is open source, I thought, I might as well try to adapt > it and submit a patch. Have you looked int git? It currently compiles from git but there is a space leak that I hav

Re: [Haskell-cafe] ANNOUNCE: haskell-docs - Given a module name and a name, it will find and display the documentation of that name.

2012-12-26 Thread Alfredo Di Napoli
Excellent work, Chris! Looking forward to using your tool! Ciao! Alfredo Sent from my iPad On 27/dic/2012, at 01:43, Christopher Done wrote: > Ahoy hoy, > > Just thought I'd announce a tool I whipped up these evening to take a > module name and a name and output the installed Haddock document

Re: [Haskell-cafe] Non polymorphic numerals option -- avoiding type classes

2012-12-26 Thread Rustom Mody
On Thu, Dec 27, 2012 at 1:48 AM, Roman Cheplyaka wrote: > * Rustom Mody [2012-12-26 20:12:17+0530] > > So is there any set of flags to make haskell literals less polymorphic? > > Yes, there is! > > % ghci -XRebindableSyntax > GHCi, version 7.6.1: http://www.haskell.org/ghc/ :? for help >

[Haskell-cafe] ANNOUNCE: haskell-docs - Given a module name and a name, it will find and display the documentation of that name.

2012-12-26 Thread Christopher Done
Ahoy hoy, Just thought I'd announce a tool I whipped up these evening to take a module name and a name and output the installed Haddock documentation for it. Examples with my GHCi session: λ> :doc Data.List.Split split Split a list according to the given splitting strategy. This is how to "run"

Re: [Haskell-cafe] Type error when trying to adapt http-proxy to new conduit

2012-12-26 Thread Brandon Allbery
On Wed, Dec 26, 2012 at 6:22 PM, Pieter Laeremans wrote: > Network/HTTP/Proxy.hs:254:15: > Couldn't match expected type `ResourceT > IO (CIN.Pipe () () ByteString () > (ResourceT IO) ())' > with actual type `IO >

[Haskell-cafe] Type error when trying to adapt http-proxy to new conduit

2012-12-26 Thread Pieter Laeremans
Hi, The http-proxy package isn't compatible any longer with the latest conduit. Since it is open source, I thought, I might as well try to adapt it and submit a patch. However I run into some difficulties. For example I get this type error when I'm trying to compile it : Network/HTTP/Proxy.hs:

[Haskell-cafe] ANNOUNCE: Haskell BOF on 29c3 in Hamburg, Germany

2012-12-26 Thread Matthias Fischmann
Hi everybody, we will be running a nano-hackathon on the CCC congress in Hamburg on Thursday, 2012-12-27, 5pm German time: https://events.ccc.de/congress/2012/wiki/Haskell_BOF Sorry for the short notice. If you would like to meet up later during the congress please drop us a line. cheers, ma

Re: [Haskell-cafe] Non polymorphic numerals option -- avoiding type classes

2012-12-26 Thread Roman Cheplyaka
* Rustom Mody [2012-12-26 20:12:17+0530] > So is there any set of flags to make haskell literals less polymorphic? Yes, there is! % ghci -XRebindableSyntax GHCi, version 7.6.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer

Re: [Haskell-cafe] Non polymorphic numerals option -- avoiding type classes

2012-12-26 Thread koomi
Sorry, forgot the link: http://www.haskell.org/ghc/docs/7.0.4/html/users_guide/interactive-evaluation.html Section 2.4.5 Type defaulting in GHCi ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Non polymorphic numerals option -- avoiding type classes

2012-12-26 Thread koomi
You should note that GHCi uses extended defaulting rules as explained in [1]. This means that a literal like 5 will only be of type Num a => a in GHCi while in a normal Haskell program it will default to some concrete type (Integer if there are no other constraints). Also, if you define x = 5 in a

Re: [Haskell-cafe] Substituting values

2012-12-26 Thread Chaddaï Fouché
Since recently, the notion of prisms from the lens library can achieve that : to modify a value only in certain conditions but you have to write the prism so it's not that convenient, though at least you'll have an uniform API. See http://hackage.haskell.org/packages/archive/lens/3.7.0.2/doc/html/

[Haskell-cafe] Non polymorphic numerals option -- avoiding type classes

2012-12-26 Thread Rustom Mody
In haskell, we have Prelude> :t 4 4 :: Num a => a Prelude> This may be nice in its generality but it makes it hard (for me at least) when teaching a beginners course to teach polymorphic vs monomorphic types. The above leads to even more 'advanced' results like this: Prelude> :t [[1],2] [[1],2]

[Haskell-cafe] Documentation operator

2012-12-26 Thread Christopher Done
Hello chums, I've been playing around with an idea, something that has obvious pros and cons, but I'll sell it to you because there might be some positive ideas out of it. Consider the following operator: {-# LANGUAGE TypeOperators, DataKinds, KindSignatures #-} module Docs where im