Re: [Haskell-cafe] Reaching Max Bolingbroke

2012-11-18 Thread Ben Lippmeier
On 19/11/2012, at 24:40 , Roman Cheplyaka wrote: > For the last two months I've been trying to reach Max Bolingbroke via > his hotmail address, github and linkedin, but did not succeed. > > Does anyone know if he's well? If someone could help by telling him that > I'd like to get in touch, I'd a

Re: [Haskell-cafe] List all multiply/add combinations

2012-11-18 Thread Stefan Klinger
Well, at least this is a nice exercise! I'm assuming that all operators associate to the left, and use the usual precedence rules. My approach would consider (1+2)+3 different from 1+(2+3), and enumerate it again. Of course they are different computations, though mathematically equivalent. Jona

Re: [Haskell-cafe] List all multiply/add combinations

2012-11-18 Thread Artyom Kazak
Jonas Almström Duregård писал(а) в своём письме Mon, 19 Nov 2012 01:31:01 +0300: Hi, You can make a datatype that captures exactly the expressions you want (see code below). Essentially you want to make sure that a subtraction or addition never has another subtraction or addition as its l

Re: [Haskell-cafe] List all multiply/add combinations

2012-11-18 Thread Jonas Almström Duregård
Hi, You can make a datatype that captures exactly the expressions you want (see code below). Essentially you want to make sure that a subtraction or addition never has another subtraction or addition as its left operand. I would also like to advertise a bit and show how this type can be enumerate

Re: [Haskell-cafe] Automation of external library installation in haskell package.

2012-11-18 Thread Roman Cheplyaka
* Johan Tibell [2012-11-18 12:28:50-0800] > Hi, > > On Sun, Nov 18, 2012 at 11:51 AM, Maksymilian Owsianny < > maksymilian.owsia...@gmail.com> wrote: > > > However, the problem with hackage not being able to build the package, and > > therefore generate documentation, remains. So conversely my q

Re: [Haskell-cafe] [repa] beginner questions

2012-11-18 Thread Dominic Steinitz
Dmitry Malikov gmail.com> writes: > > Playing around with repa arrays and got some questions. > > 1) How I can get list of indexes of array that suffice some predicate? > > > a1 > AUnboxed (Z :. 3) (fromList [False,False,True]) > it :: Array U (Z :. Int) Bool > > Indexes of ele

Re: [Haskell-cafe] Automation of external library installation in haskell package.

2012-11-18 Thread Johan Tibell
Hi, On Sun, Nov 18, 2012 at 11:51 AM, Maksymilian Owsianny < maksymilian.owsia...@gmail.com> wrote: > However, the problem with hackage not being able to build the package, and > therefore generate documentation, remains. So conversely my question would > be > if there is any way to get around th

Re: [Haskell-cafe] Automation of external library installation in haskell package.

2012-11-18 Thread Maksymilian Owsianny
Hi Johan, Originally, that was my intention, to have the user install the library himself, and I have specified the extra-libraries field in the .cabal file. However, the problem with hackage not being able to build the package, and therefore generate documentation, remains. So conversely my ques

Re: [Haskell-cafe] List all multiply/add combinations

2012-11-18 Thread Rune Harder Bak
On Sun, Nov 18, 2012 at 2:04 PM, Stefan Klinger wrote: > Sounds like you would want to enumerate all possible *abstract* syntax > trees, these implicitly have exactly the necessary parentheses. I'd do > this recursively, splitting the sequence of numbers in two at all > possible places, and then

[Haskell-cafe] Automation of external library installation in haskell package.

2012-11-18 Thread Maksymilian Owsianny
Hello Haskell-Cafe, I have created a package that requires an external library to be present on the machine. Because of that, obviously, hackage fails to build it, and subsequently fails to generate documentation. So my question is, how should I go about configuring Cabal/Setup.hs to automatize t

Re: [Haskell-cafe] Parsing different types, same typeclass

2012-11-18 Thread Jose A. Lopes
Thanks Stephen, that worked out just fine! On 18-11-2012 18:23, Jose A. Lopes wrote: Thanks Stephen. I will try this! On 18-11-2012 17:56, Stephen Tetley wrote: With existentials an "extesible" version might look like this: {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE ScopedTypeVa

Re: [Haskell-cafe] Parsing different types, same typeclass

2012-11-18 Thread Jose A. Lopes
Thanks Stephen. I will try this! On 18-11-2012 17:56, Stephen Tetley wrote: With existentials an "extesible" version might look like this: {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE ScopedTypeVariables #-} ... class Action and datatypes A and B the same as before ... -- some

Re: [Haskell-cafe] Parsing different types, same typeclass

2012-11-18 Thread Jose A. Lopes
Hey Chris, Thanks for you reply! So the thing is: I actually had an algebraic data type Action with several constructors, one for each Action. And I was deriving Read so there was no problem there. However, I want to be able to add and remove Actions more easily. That is why I transformed the a

Re: [Haskell-cafe] Parsing different types, same typeclass

2012-11-18 Thread Stephen Tetley
With existentials an "extesible" version might look like this: > {-# LANGUAGE ExistentialQuantification #-} > {-# LANGUAGE ScopedTypeVariables #-} ... class Action and datatypes A and B the same as before ... > -- some new ones... > data C = C Int > deriving (Read, Show) > instance

Re: [Haskell-cafe] A small step towards solving cabal hell.

2012-11-18 Thread timothyhobbs
You are correct this won't help(and may even hurt) in places where there is true mutual inter-dependency between parts of libraries.  But I gave examples where I was sure this was not the case. Timothy -- Původní zpráva -- Od: Brandon Allbery Datum: 18. 11. 2012 Předmět: Re: [

Re: [Haskell-cafe] A small step towards solving cabal hell.

2012-11-18 Thread Brandon Allbery
On Sun, Nov 18, 2012 at 11:04 AM, Brandon Allbery wrote: > There's another consideration, which is are you optimizing hackage by > pessimizing development? You could break xmonad-contrib into (usually) one > package per module if you really wanted to --- but now the developers need > to track a c

Re: [Haskell-cafe] A small step towards solving cabal hell.

2012-11-18 Thread timothyhobbs
I understand your concern.  Of course with cabals current implementation this proposal requires a lot of fluff.  I thought about implementing a cabal syntax directly into Haskell pragmas, getting rid of the cabal file format entirely.  I think that would be a pie in the sky optimum.  However, I

Re: [Haskell-cafe] A small step towards solving cabal hell.

2012-11-18 Thread Brandon Allbery
On Sun, Nov 18, 2012 at 10:15 AM, wrote: > Well in some cases, it might not be easy to break up the libraries. If > there is sufficient mutual dependency, doing so won't even help the > situation. However, I already looked at the code to some large libraries, > such as xmonad-contrib, and gtk2h

Re: [Haskell-cafe] A small step towards solving cabal hell.

2012-11-18 Thread timothyhobbs
Well in some cases, it might not be easy to break up the libraries.  If there is sufficient mutual dependency, doing so won't even help the situation.  However, I already looked at the code to some large libraries, such as xmonad-contrib, and gtk2hs and am certain that no code modifications are

Re: [Haskell-cafe] A small step towards solving cabal hell.

2012-11-18 Thread Alfredo Di Napoli
Hi Tim, it seems a good idea, although I hardly believe such isolation is achievable in practice. Just a feeling, though :) However, I really hope we, as a community, will be able to finally fix the Cabal Hell. It's a topic with a lot of hype lately, but few "practical, hands dirty" approaches :)

[Haskell-cafe] Reaching Max Bolingbroke

2012-11-18 Thread Roman Cheplyaka
For the last two months I've been trying to reach Max Bolingbroke via his hotmail address, github and linkedin, but did not succeed. Does anyone know if he's well? If someone could help by telling him that I'd like to get in touch, I'd appreciate that. Roman _

[Haskell-cafe] A small step towards solving cabal hell.

2012-11-18 Thread timothyhobbs
I've read a lot of negative regarding the problems with cabal and hackage. I've written quite a few of them myself. I want to propose a simple change in philosophy of packages. Haskell has inherited a philosophy from the imperative world, that there are two types of packages: Libraries and applic