Re: [Haskell-cafe] Handling absent maintainers

2010-07-23 Thread Alexander Dunlap
One issue that comes up is that when you fork a package, data can no longer be freely exchanged between libraries using the original package's datatypes and libraries using the forked package's datatypes. Something that might help here is the concept of "extension" or "friend" packages or modules:

Re: [Haskell-cafe] Handling absent maintainers

2010-07-23 Thread Mark Wotton
That works fine for my own stuff, but I'd like it to work for people using my software that relies on those packages. mark On Sat, Jul 24, 2010 at 4:10 PM, Roman Beslik wrote: >  I patch broken packages in my local repository. I increment a version so > the local repository get a precedence over

[Haskell-cafe] a patch for base.Foreign.C.String, the current locale

2010-07-23 Thread Roman Beslik
Hi. I have composed a patch that implements Foreign.C.String according to Foreign Function Interface Addendum, i.e. C strings are treated as they are encoded with the current locale. Search "Locale.hs" in the patch for further directions. Ask if you do not know how to build a patched version o

Re: [Haskell-cafe] Handling absent maintainers

2010-07-23 Thread Roman Beslik
I patch broken packages in my local repository. I increment a version so the local repository get a precedence over the Hackage. On 16.07.10 03:54, Mark Wotton wrote: 2. run my own hackage server and tell my users to use that instead. -- Best regards, Roman Beslik. ___

Re: [Haskell-cafe] Anyone here from New Zealand?

2010-07-23 Thread Ivan Lazar Miljenovic
Tim Matthews writes: > Any of the haskellers here from NZ? > > Are you using haskell in production, internally within your company or just > outside of work in your own time? > > In Aus they've got > hackathonsand user > groups

[Haskell-cafe] Weird behavior with arrow commands

2010-07-23 Thread Ronald Guida
I am trying to figure out how to use GHC's arrow commands, and I found some extremely weird behavior. In GHC's manual, there is a description of arrow commands, which I don't really understand. http://www.haskell.org/ghc/docs/latest/html/users_guide/arrow-notation.html#id667303 (Primitive Construc

Re: [Haskell-cafe] Heavy lift-ing

2010-07-23 Thread Alex Stangl
On Fri, Jul 23, 2010 at 09:12:44PM -0500, aditya siram wrote: > Lists are non-deterministic, but the function taken by liftM2 does not > necessarily generate all possible outcomes. In the case of (+) it > does, not in the case of (-): > liftM2 (-) [0,1] [2,3] => [0-1,0-2,1-2,1-3] => [-2,-3,-1,-2] >

Re: [Haskell-cafe] Heavy lift-ing

2010-07-23 Thread aditya siram
Lists are non-deterministic, but the function taken by liftM2 does not necessarily generate all possible outcomes. In the case of (+) it does, not in the case of (-): liftM2 (-) [0,1] [2,3] => [0-1,0-2,1-2,1-3] => [-2,-3,-1,-2] if all possible cases were generated between the two lists we have to i

Re: [Haskell-cafe] Heavy lift-ing

2010-07-23 Thread Jürgen Doser
El vie, 23-07-2010 a las 16:35 -0700, michael rice escribió: > Thanks all, > > Wild, at least up to the "optional" part, which I haven't dug into > yet. > > So the (+) for the Maybe monad and the (+) for the List monad are one > in the same, the magic springs from the monads. > > Why is it calle

Re: [Haskell-cafe] Heavy lift-ing

2010-07-23 Thread Alexander Solla
On Jul 23, 2010, at 4:35 PM, michael rice wrote: Why is it called "lift"-ing? Basically, because mathematicians like enlightening metaphors. It is a mathematical term. A "monadic value" has an "underlying" value. To turn a function that works on the underlying value into one that work

Re: [Haskell-cafe] Heavy lift-ing

2010-07-23 Thread michael rice
Thanks all, Wild, at least up to the "optional" part, which I haven't dug into yet. So the (+) for the Maybe monad and the (+) for the List monad are one in the same, the magic springs from the monads. Why is it called "lift"-ing? Michael --- On Fri, 7/23/10, Jürgen Doser wrote: From: Jürg

Re: [Haskell-cafe] Heavy lift-ing

2010-07-23 Thread Jürgen Doser
El vie, 23-07-2010 a las 15:05 -0400, Nick Bowler escribió: > On 11:43 Fri 23 Jul , michael rice wrote: > [...] > > But how does one add [0,1] and [0,2] to get [0,2,1,3]? > > liftM2 (+) [0,1] [0,2] gives the list > > [0+0, 0+2, 1+0, 1+2] which one could have found out by asking ghci: Prel

Re: [Haskell-cafe] Heavy lift-ing

2010-07-23 Thread Alex Stangl
On Fri, Jul 23, 2010 at 11:43:08AM -0700, michael rice wrote: > What does it mean to "promote a function to a monad?" > > It would seem that the monad values must understand the function that's being > promoted, like Ints understand (+). > > Prelude Control.Monad> liftM2 (+) (Just 1) (Just 1) >

Re: [Haskell-cafe] ANNOUNCE: Haskell Platform 2010.2.0.0

2010-07-23 Thread Andrew Coppin
Vo Minh Thu wrote: 2010/7/23 Andrew Coppin : Anybody have any theroes why Trend Micro Antivirus is reporting this as a "confirmed fraud/attack site"? See here: http://en.wikipedia.org/wiki/Coral_Content_Distribution_Network#Problems Ah, right. So "confirmed attack site" actually

Re: [Haskell-cafe] Heavy lift-ing

2010-07-23 Thread Nick Bowler
On 11:43 Fri 23 Jul , michael rice wrote: > Hi, > > I don't understand what's taking place here. > > >From Hoogle: > > = > > liftM2 :: Monad  m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r > > Promote a function to a monad, scanning the monadic arguments from left to > right.

Re: [Haskell-cafe] Heavy lift-ing

2010-07-23 Thread Albert Y. C. Lai
On 10-07-23 02:43 PM, michael rice wrote: liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r [...] What does it mean to "promote a function to a monad?" liftM2 f m1 m2 is canned code for do a1 <- m1 a2 <- m2 return (f a1 a2) for example liftM2 f [s,t] [x,y] is [f s x, f s y,

[Haskell-cafe] Heavy lift-ing

2010-07-23 Thread michael rice
Hi, I don't understand what's taking place here. >From Hoogle: = liftM2 :: Monad  m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r Promote a function to a monad, scanning the monadic arguments from left to right. For example,     liftM2 (+) [0,1] [0,2] = [0,2,1,3]     liftM2 (+) (

Re: [Haskell-cafe] ANNOUNCE: Haskell Platform 2010.2.0.0

2010-07-23 Thread Vo Minh Thu
2010/7/23 Andrew Coppin : > Don Stewart wrote: >> >> Download the Haskell Platform 2010.2.0.0: >> >>    http://hackage.haskell.org.nyud.net/platform/ >> >> (Caching server). >> > > Anybody have any theroes why Trend Micro Antivirus is reporting this as a > "confirmed fraud/attack site"? See here:

Re: [Haskell-cafe] ANNOUNCE: Haskell Platform 2010.2.0.0

2010-07-23 Thread Don Stewart
andrewcoppin: > Don Stewart wrote: >> Download the Haskell Platform 2010.2.0.0: >> >> http://hackage.haskell.org.nyud.net/platform/ >> >> (Caching server). >> > > Anybody have any theroes why Trend Micro Antivirus is reporting this as > a "confirmed fraud/attack site"? We're using the Co

Re: [Haskell-cafe] ANNOUNCE: Haskell Platform 2010.2.0.0

2010-07-23 Thread Steve Schafer
On Fri, 23 Jul 2010 18:08:39 +0100, you wrote: >Anybody have any theroes why Trend Micro Antivirus is reporting this as >a "confirmed fraud/attack site"? Because someone somewhere has used the nyud.net distribution service to distribute malware. Since it's a free service, it's pretty much guaran

Re: [Haskell-cafe] ANNOUNCE: Haskell Platform 2010.2.0.0

2010-07-23 Thread Andrew Coppin
Don Stewart wrote: Download the Haskell Platform 2010.2.0.0: http://hackage.haskell.org.nyud.net/platform/ (Caching server). Anybody have any theroes why Trend Micro Antivirus is reporting this as a "confirmed fraud/attack site"? ___ Haske

Re: [Haskell-cafe] ANNOUNCE: Haskell Platform 2010.2.0.0

2010-07-23 Thread Don Stewart
Applied, thanks! leon: > Some nits, if I may pick (http://hackage.haskell.org/platform/contents.html): > > Under GHC: s/optimzing/optimizing > Under Alex: Sentence should end with a period. > Under hsc2hs: There shouldn't be a comma. > Under haskell code coverage: Testsuite should probably be two

Re: [Haskell-cafe] Tiger compiler in Haskell: annotating abstract syntax tree

2010-07-23 Thread José Pedro Magalhães
Hi Romildo, 2010/7/23 José Romildo Malaquias > On Tue, Jul 20, 2010 at 09:17:15AM +0200, José Pedro Magalhães wrote: > > > > 2010/7/19 José Romildo Malaquias > > > > > > > > I am writing here to ask suggestions on how to annotate an ast with > > > types (or any other information that would be r

[Haskell-cafe] Anyone here from New Zealand?

2010-07-23 Thread Tim Matthews
Any of the haskellers here from NZ? Are you using haskell in production, internally within your company or just outside of work in your own time? In Aus they've got hackathonsand user groups .

Re: [Haskell-cafe] Tiger compiler in Haskell: annotating abstract syntax tree

2010-07-23 Thread José Romildo Malaquias
On Tue, Jul 20, 2010 at 09:17:15AM +0200, José Pedro Magalhães wrote: > > 2010/7/19 José Romildo Malaquias > > > > > I am writing here to ask suggestions on how to annotate an ast with > > types (or any other information that would be relevant in a compiler > > phase) in Haskell. > > Indeed I w

Re: [Haskell-cafe] ANNOUNCE: Haskell Platform 2010.2.0.0

2010-07-23 Thread Leon Grynszpan
Some nits, if I may pick (http://hackage.haskell.org/platform/contents.html): Under GHC: s/optimzing/optimizing Under Alex: Sentence should end with a period. Under hsc2hs: There shouldn't be a comma. Under haskell code coverage: Testsuite should probably be two words: "test suite". __

Re: [Haskell-cafe] HaTeX build failure

2010-07-23 Thread Jürgen Doser
El vie, 23-07-2010 a las 16:53 +0400, Alexey Khudyakov escribió: > On Fri, Jul 23, 2010 at 4:04 PM, Daniel Díaz wrote: > > Hi, > > > > I uploaded a package, named HaTeX, to Hackage, but it gets a build failure: > > > > Any idea? > > Cabal file has BOM in the beginning. Maybe it make parser choke.

Re: [Haskell-cafe] HaTeX build failure

2010-07-23 Thread Alexey Khudyakov
On Fri, Jul 23, 2010 at 4:04 PM, Daniel Díaz wrote: > Hi, > > I uploaded a package, named HaTeX, to Hackage, but it gets a build failure: > > Any idea? Cabal file has BOM in the beginning. Maybe it make parser choke... ___ Haskell-Cafe mailing list Hask

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-23 Thread Edward Kmett
On Fri, Jul 23, 2010 at 8:07 AM, Edward Kmett wrote: > That actually runs contrary to one of cabal's other practices, which is to > add a 'simple' Setup.hs to your package as it makes the sdist is one is not > present. er.. I meant "if one is not present." __

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-23 Thread Edward Kmett
That actually runs contrary to one of cabal's other practices, which is to add a 'simple' Setup.hs to your package as it makes the sdist is one is not present. With your proposed change, it would then complain about _every_ package that used simple. ;) Setup.hs exists so that you can execute runha

[Haskell-cafe] HaTeX build failure

2010-07-23 Thread Daniel Díaz
Hi, I uploaded a package, named HaTeX, to Hackage, but it gets a build failure: cabal: Couldn't read cabal file "./HaTeX/1.0.0/HaTeX.cabal It makes reference to 1.0.0 version, even when building version 1.0.1. I get the same error when I use cabal install. However, using configure>build>registe

RE: [Haskell-cafe] cabal, Setup.lhs example

2010-07-23 Thread Sittampalam, Ganesh
Mark Wotton wrote: > Perhaps cabal should print a warning if you have a Setup.hs file, > _and_ try to use Simple? It'd at least give the hint that they're > unhappy together. I think it should instead verify that Setup.hs is consistent with a Simple build. I don't know how much variation exists

Re: [Haskell-cafe] Re: src/Text/XML/HaXml/Lex.hs:(156, 0)-(160, 22): Non-exhaustive patterns in function white

2010-07-23 Thread Malcolm Wallace
Calls which successfully returned some binary data before do not do so anymore. The error is: Prelude.chr: bad argument: 1177427 I can't help with this one. As Gracjan noted, it is probably because your binary data is not valid as UTF-8 text. Calls which complained about 'white' function n

[Haskell-cafe] Re: src/Text/XML/HaXml/Lex.hs:(156, 0)-(160, 22): Non-exhaustive patterns in function white

2010-07-23 Thread Gracjan Polak
Alexander Kotelnikov myxomop.com> writes: > > > On Wed, 21 Jul 2010 06:46:26 + (UTC) > > "GP" == Gracjan Polak gmail.com> wrote: > GP> > GP> Antoine Latter gmail.com> writes: > >> Sending off to the maintainer of haxr, although it looks like it might > >> be in HaXml (from an outs

RE: [Haskell-cafe] Page rank and GHC docs directory organization

2010-07-23 Thread Sittampalam, Ganesh
Ketil Malde wrote: > Robin KAY writes: > >> the redirects and ignore the original URLs [2]. Using a "302 Found" >> redirect instead might produce better results, at least for Google > > But the page you point to suggests 302 is discouraged, and says they > don't help for the other search engines

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-23 Thread Magnus Therning
On Fri, Jul 23, 2010 at 04:58, Mark Wotton wrote: > On Fri, Jul 23, 2010 at 12:33 PM, wren ng thornton wrote: >> Magnus Therning wrote: >>> >>> On Thu, Jul 22, 2010 at 11:52, Ross Paterson wrote: On Thu, Jul 22, 2010 at 11:31:21AM +0100, Magnus Therning wrote: > > On Thu, Jul 2

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-23 Thread Magnus Therning
On Fri, Jul 23, 2010 at 03:33, wren ng thornton wrote: > Magnus Therning wrote: >> >> On Thu, Jul 22, 2010 at 11:52, Ross Paterson wrote: >>> >>> On Thu, Jul 22, 2010 at 11:31:21AM +0100, Magnus Therning wrote: On Thu, Jul 22, 2010 at 10:59, Ross Paterson wrote: > > Magnus

Re: [Haskell-cafe] Page rank and GHC docs directory organization

2010-07-23 Thread Ketil Malde
Robin KAY writes: > the redirects and ignore the original URLs [2]. Using a "302 Found" > redirect instead might produce better results, at least for Google But the page you point to suggests 302 is discouraged, and says they don't help for the other search engines. Perhaps 'latest' could just