Re: [Haskell-cafe] Data structure containing elements which are instances of the

2012-08-14 Thread oleg
It's only a test case. The real thing is for a game and will be something like: class EntityT e where update :: e - e render :: e - IO () handleEvent :: e - Event - e getBound:: e - Maybe Bound data Entity = forall e. (EntityT e) = Entity e data Level = Level

Re: [Haskell-cafe] Fixity declaration extension

2012-08-14 Thread Евгений Пермяков
Your idea looks _much_ better from code clarity point of view, but it's unclear to me, how to deal with it internally and in error messages. I'm not a compiler guy, though. Worse, it does not allow to set up fixity relative to operator that is not in scope and it will create unnecessary

[Haskell-cafe] overloading integer literals

2012-08-14 Thread Евгений Пермяков
During development some toy base library I found impossible to use Numeric literals. Quick search showed, that one need both fromInteger in scope (reasonable) and, as I understand, access to Integer type from 'base' package ('base' for clarity later). It is perfectly reasonable if we assume

Re: [Haskell-cafe] createProcess running non-existent programs

2012-08-14 Thread Alexander Kjeldaas
On 13 August 2012 23:49, Richard O'Keefe o...@cs.otago.ac.nz wrote: On 13/08/2012, at 11:26 PM, Alexander Kjeldaas wrote: This isn't that hard - a pipe shouldn't be needed anymore. Just require a post-2003 glibc. fexecve is a system call in most BSDs. It is also implemented in glibc

Re: [Haskell-cafe] Fixity declaration extension

2012-08-14 Thread Ryan Ingram
On Tue, Aug 14, 2012 at 1:04 AM, Евгений Пермяков permea...@gmail.comwrote: Your idea looks _much_ better from code clarity point of view, but it's unclear to me, how to deal with it internally and in error messages. I'm not a compiler guy, though. How to deal with it internally: It's

Re: [Haskell-cafe] Fixity declaration extension

2012-08-14 Thread Евгений Пермяков
On 08/14/2012 02:52 PM, Ryan Ingram wrote: On Tue, Aug 14, 2012 at 1:04 AM, Евгений Пермяков permea...@gmail.com mailto:permea...@gmail.com wrote: Your idea looks _much_ better from code clarity point of view, but it's unclear to me, how to deal with it internally and in error

Re: [Haskell-cafe] Data structure containing elements which are instances of the same type class

2012-08-14 Thread Ryan Ingram
On Mon, Aug 13, 2012 at 6:53 PM, Alexander Solla alex.so...@gmail.comwrote: In a classical logic, the duality is expressed by !E! = A, and !A! = E, where E and A are backwards/upsidedown and ! represents negation. In particular, for a proposition P, Ex Px = !Ax! Px (not all x's are not P)

Re: [Haskell-cafe] Fixity declaration extension

2012-08-14 Thread Ketil Malde
AntC anthony_clay...@clear.net.nz writes: I agree. I don't declare operators very often, and when I do I always struggle to remember which way round the precedence numbers go. [...] (Anything else we can bikeshed about while we're at it?) infixl * before + Perhaps before and after

[Haskell-cafe] Lost global Contents of haddock

2012-08-14 Thread Marco Túlio Pimenta Gontijo
Hi. I just noticed that my global Contents of the haddock documentation of modules ( file:///home/marcot/.cabal/share/doc/index.html ) lost most of the modules. My workflow is fairly straightforward, but I do some --reinstall --force-reinstalls with cabal install. For instance, the link for

[Haskell-cafe] Debian 6.0.5: 'cabal install curl' problem

2012-08-14 Thread dokondr
Please help to solve a problem installing curl package ( http://hackage.haskell.org/package/curl/) on Debian 6.0.5. I am running the most recent Debian Haskell platform with GHC 6.12.1. I did: - cabal update - cabal install cabal-install It is interesting that in case you do again 'cabal update

Re: [Haskell-cafe] Debian 6.0.5: 'cabal install curl' problem

2012-08-14 Thread Marco Túlio Pimenta Gontijo
Hi dokondr. On Tue, Aug 14, 2012 at 11:23 AM, dokondr doko...@gmail.com wrote: (...) Cabal fails to install 'curl' because it can not find curl library. Please see detailed cabal output at the end of this message. Cabal means the curl C library, which must be installed by either the packages

Re: [Haskell-cafe] Fixity declaration extension

2012-08-14 Thread Twan van Laarhoven
On 14/08/12 13:46, Ketil Malde wrote: AntC anthony_clay...@clear.net.nz writes: I agree. I don't declare operators very often, and when I do I always struggle to remember which way round the precedence numbers go. [...] (Anything else we can bikeshed about while we're at it?) infixl

Re: [Haskell-cafe] createProcess running non-existent programs

2012-08-14 Thread Niklas Larsson
2012/8/14 Alexander Kjeldaas alexander.kjeld...@gmail.com: On 13 August 2012 23:49, Richard O'Keefe o...@cs.otago.ac.nz wrote: On 13/08/2012, at 11:26 PM, Alexander Kjeldaas wrote: This isn't that hard - a pipe shouldn't be needed anymore. Just require a post-2003 glibc. fexecve

Re: [Haskell-cafe] Debian 6.0.5: 'cabal install curl' problem

2012-08-14 Thread dokondr
Marcot, Thanks for the detailed info! Looks like aptitude install libcurl4-gnutls-dev solved the problem. cheers, Dmitri On Tue, Aug 14, 2012 at 6:29 PM, Marco Túlio Pimenta Gontijo marcotmar...@gmail.com wrote: Hi dokondr. On Tue, Aug 14, 2012 at 11:23 AM, dokondr doko...@gmail.com wrote:

Re: [Haskell-cafe] createProcess running non-existent programs

2012-08-14 Thread Alexander Kjeldaas
On 14 August 2012 17:22, Niklas Larsson metanik...@gmail.com wrote: 2012/8/14 Alexander Kjeldaas alexander.kjeld...@gmail.com: On 13 August 2012 23:49, Richard O'Keefe o...@cs.otago.ac.nz wrote: On 13/08/2012, at 11:26 PM, Alexander Kjeldaas wrote: This isn't that hard - a

Re: [Haskell-cafe] I use cabal install repa but then WinGHCi says module Data.Array.Rep.Algorithms.Ramdomish not found.

2012-08-14 Thread Ivan Lazar Miljenovic
On 14/08/2012 7:17 AM, KC kc1...@gmail.com wrote: The install of repa-algorithms fails saying it can't cannot find an llvm. In any case why can't the install syntax be cabal install repa.algorithms then it would be more consistent with the import statement. Because the name of the package

Re: [Haskell-cafe] Debian 6.0.5: 'cabal install curl' problem

2012-08-14 Thread Brandon Allbery
On Tue, Aug 14, 2012 at 10:23 AM, dokondr doko...@gmail.com wrote: Anyway, then I did: - apt-get install curl - cabal install curl Cabal fails to install 'curl' because it can not find curl library. Please see detailed cabal output at the end of this message. Just as a general thing,

[Haskell-cafe] For consistency; it would be better if the import statement matched the cabal install statement or :m form.

2012-08-14 Thread KC
:m +Data.Array.Repa.Algorithms.Randomish cabal install repa.algrothms would be more consistent. -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] For consistency; it would be better if the import statement matched the cabal install statement or :m form.

2012-08-14 Thread Brandon Allbery
On Tue, Aug 14, 2012 at 11:04 PM, KC kc1...@gmail.com wrote: :m +Data.Array.Repa.Algorithms.Randomish cabal install repa.algrothms would be more consistent. What do you do when multiple modules use the same namespace? (monads-{fd,tf} and the regex modules being cases in point) --

Re: [Haskell-cafe] createProcess running non-existent programs

2012-08-14 Thread Donn Cave
Quoth Alexander Kjeldaas alexander.kjeld...@gmail.com, See access(2) ... a classic code smell in UNIX programming, for the same reasons. We can solve this problem in an efficient way that works well, and equally well, on any POSIX platform that supports F_CLOEXEC on pipes, and I can't think of