Re: [Haskell-cafe] Re: ANNOUNCE: A Levenberg-Marquardt implementation

2009-09-11 Thread Roel van Dijk
* http://hackage.haskell.org/package/bindings-levmar-0.1 Which were the changes you needed to do to the library code? I believe this is going to cause you two problems: maintenance (as you can't always be sure the patched version didn't introduce a bug) and license (as levmar is GPL. You

Re: [Haskell-cafe] adding state in GUIs (qtHaskell)

2009-09-11 Thread Roman Cheplyaka
* Duncan Coutts duncan.cou...@worc.ox.ac.uk [2009-09-10 20:43:54+] A personal favourite of mine is having the GUI event handler post data over a channel to a thread. That thread reads from the channel and deals with the events. The state of the GUI app is then held as local parameters in

Re: [Haskell-cafe] memoization

2009-09-11 Thread staafmeister
Hi, Investigating memoization inspired by replies from this thread. I encountered something strange in the behavior of ghci. Small chance it's a bug, it probably is a feature, but I certainly don't understand it :) The interpreter session went as follows GHCi, version 6.10.4:

Re[2]: [Haskell-cafe] memoization

2009-09-11 Thread Bulat Ziganshin
Hello staafmeister, Friday, September 11, 2009, 4:57:01 PM, you wrote: Here memo2 is a function that works like a combinator to obtain a memoized recursive function. However the type of the function depends on how I define it. In point-free style it gets the wrong type, however if I define

Re: [Haskell-cafe] instance Monad (Either String) in Prelude or Data.Either?

2009-09-11 Thread Edward Kmett
Unfortunately, the instance of Monad for Either a is somewhat misguided in Haskell. There is a spurious restraint that the Left value in your Either be a member of some Error class, which was brought about by the deletion of MonadZero from Haskell 98 (as part of the elimination of failure free

[Haskell-cafe] Re: Problem installing OpenGL

2009-09-11 Thread Seb
Think I've found the solution my self. If I download the packages and make a small change in the .cabal-file everything seems to work fine again. All i had to do was replace extra-libraries: GL with frameworks: OpenGL. Not sure if this is the proper fix to make as I'm not any good with cabal

[Haskell-cafe] Externally derive instance of Data?

2009-09-11 Thread Dimitry Golubovsky
Hi, Given a datatype defined somewhere in a third-party package, without deriving (Data) specified. Is it possible, in my module which is importing that datatype from that package, to auto-derive instance of Data for the said datatype? The goal is not to recompile the package just because an

Re: [Haskell-cafe] Externally derive instance of Data?

2009-09-11 Thread José Pedro Magalhães
Hi Dimitry, I think what you want is stand-alone deriving: http://www.haskell.org/ghc/docs/latest/html/users_guide/deriving.html#stand-alone-deriving Cheers, Pedro On Fri, Sep 11, 2009 at 16:29, Dimitry Golubovsky golubov...@gmail.comwrote: Hi, Given a datatype defined somewhere in a

[Haskell-cafe] Control.Exception base-3/base-4 woes

2009-09-11 Thread Neil Brown
Hi, In my CHP library I need to do some exception catching. I want the library to work on GHC 6.8 (with base-3 -- this is the current version in Ubuntu Hardy and Jaunty, for example) and GHC 6.10 (which comes with base-4). But base-3 and base-4 need different code for exception catching

Re: [Haskell-cafe] Control.Exception base-3/base-4 woes

2009-09-11 Thread David Menendez
On Fri, Sep 11, 2009 at 11:26 AM, Neil Brown nc...@kent.ac.uk wrote: Can anyone tell me how to fix this?  I don't think that changing to always use Control.Exception would fix this, because I need to give a different type for catch in base-3 to base-4, so there's still the incompatibility to

RE: [Haskell-cafe] Control.Exception base-3/base-4 woes

2009-09-11 Thread Sittampalam, Ganesh
Neil Brown wrote: Can anyone tell me how to fix this? I don't think that changing to always use Control.Exception would fix this, because I need to give a different type for catch in base-3 to base-4, so there's still the incompatibility to be dealt with.

[Haskell-cafe] Re: ANNOUNCE: A Levenberg-Marquardt implementation

2009-09-11 Thread Maurí­cio CA
The C library prints error messages to stderr. (...) Attached is the patch to the C levmar library. Thanks for the file. The license issue is indeed a problem. Either your (linked + distributed) code must be GPL or you must acquire a different (commercial) license from the author of the C

Re: [Haskell-cafe] adding state in GUIs (qtHaskell)

2009-09-11 Thread Jeremy O'Donoghue
Michael Mossey wrote: Duncan Coutts wrote: On Wed, 2009-09-09 at 18:29 -0700, Michael P Mossey wrote: I'm trying to learn qtHaskell. I realize few people on this list know anything about qtHaskell, but I have a question that probably relates to all GUIs as implemented in Haskell. I just need

Re: [Haskell-cafe] instance Monad (Either String) in Prelude or Data.Either?

2009-09-11 Thread Evan Laforge
On Fri, Sep 11, 2009 at 6:10 AM, Edward Kmett ekm...@gmail.com wrote: Unfortunately, the instance of Monad for Either a is somewhat misguided in Haskell. There is a spurious restraint that the Left value in your Either be a member of some Error class, which was brought about by the deletion

[Haskell-cafe] RE: Darcs and NFS Resolution

2009-09-11 Thread Lewis-Sandy, Darrell
Thanks to everyone who pointed me in the right direction on this problem, I have been able to find a work around that allows me to push to an archive on a network file share. After some digging, I discovered the root of the problem. Briefly, Darcs uses the standard library System.Directory

Re: [Haskell-cafe] Control.Exception base-3/base-4 woes

2009-09-11 Thread Bulat Ziganshin
Hello Neil, Friday, September 11, 2009, 7:26:47 PM, you wrote: i suggest you to import extensible-exceptions package instead - it's available even for ghc 6.8. alternatively, you may import old-exceptions package (or something like this). trying to develop code compatible with both versions of

Re: [Haskell-cafe] Control.Exception base-3/base-4 woes

2009-09-11 Thread Antoine Latter
On Fri, Sep 11, 2009 at 10:42 AM, David Menendezd...@zednenem.com wrote: On Fri, Sep 11, 2009 at 11:26 AM, Neil Brown nc...@kent.ac.uk wrote: Can anyone tell me how to fix this?  I don't think that changing to always use Control.Exception would fix this, because I need to give a different

Re: [Haskell-cafe] Essentials about type classes?

2009-09-11 Thread Kim-Ee Yeoh
Hi Fredrik, Temaran wrote: data Dar = Dar String String deriving (Show, Eq) class Bar a where foo :: a - Int instance Bar Dar where foo(Dar n c) = length c but it keeps generating the same error; ERROR ./Bar.hs:16 - Inferred type is not general enough *** Expression:

Re: [Haskell-cafe] RE: Darcs and NFS Resolution

2009-09-11 Thread Jason Dagit
Hi Darrell, This message definitely also belongs on the darcs-us...@darcs.net mailing list. You can find information about how to subscribe here: http://lists.osuosl.org/mailman/listinfo/darcs-users Please join our list! I'm adding the list to the CC list in my reply. On Fri, Sep 11, 2009 at

[Haskell-cafe] Unable to install Haskell Platform without readline

2009-09-11 Thread Lyle Kopnicky
Hi folks, I just installed GHC 6.10.4 on Ubuntu 9.04 32-bit, and then tried to install the Haskell Platform from source. It built quite a bit of stuff, with many warnings but no errors, and then finally died with the error below. To install editline, I need cabal, which is of course why I

[Haskell-cafe] Re: Unable to install Haskell Platform without editline

2009-09-11 Thread Lyle Kopnicky
I mean editline, not readline. On Fri, Sep 11, 2009 at 11:46 AM, Lyle Kopnicky li...@qseep.net wrote: Hi folks, I just installed GHC 6.10.4 on Ubuntu 9.04 32-bit, and then tried to install the Haskell Platform from source. It built quite a bit of stuff, with many warnings but no errors, and

Re: [Haskell-cafe] Unable to install Haskell Platform without readline

2009-09-11 Thread Judah Jacobson
On Fri, Sep 11, 2009 at 11:46 AM, Lyle Kopnicky li...@qseep.net wrote: Hi folks, I just installed GHC 6.10.4 on Ubuntu 9.04 32-bit, and then tried to install the Haskell Platform from source. It built quite a bit of stuff, with many warnings but no errors, and then finally died with the error

Re: [Haskell-cafe] Unable to install Haskell Platform without editline

2009-09-11 Thread Lyle Kopnicky
On Fri, Sep 11, 2009 at 12:01 PM, Judah Jacobson judah.jacob...@gmail.comwrote: The above editline requirement is for the editline C library, not the Haskell bindings: http://www.thrysoee.dk/editline My guess is that you need to install a recent version of the libedit-dev package. After

[Haskell-cafe] Haskell Platform install fails on mtl

2009-09-11 Thread Lyle Kopnicky
OK, I was able to build the Haskell Platform on Ubuntu 9.04 with GHC 6.10.4. But when I try to install it, I get an error: Registering haskell-platform-2009.2.0.2... Reading package info from dist/inplace-pkg-config ... done. Writing new package config file... done.

[Haskell-cafe] Just to let people know

2009-09-11 Thread Jeff Heard
lhs2TeX does not compile with the latest version of base. complaints about Control.Exception abound ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Just to let people know

2009-09-11 Thread Sean Leather
Thanks, Jeff. I'm CC'ing Andres just in case he didn't get this. Sean On Fri, Sep 11, 2009 at 22:27, Jeff Heard jefferson.r.he...@gmail.comwrote: lhs2TeX does not compile with the latest version of base. complaints about Control.Exception abound

[Haskell-cafe] Re: Haskell Platform install fails on mtl

2009-09-11 Thread Lyle Kopnicky
It's a bug in the install.sh script. Here's the fix: 36a37,42 # Is this exact version of the package already installed? is_pkg_installed () { PKG_VER=$1 grep ${PKG_VER} installed.packages /dev/null 21 } 40,43c46,53 cd ${pkg} || die The directory for the component ${PKG} is missing

Re: [Haskell-cafe] instance Monad (Either String) in Prelude or Data.Either?

2009-09-11 Thread Michael Steele
Right. I know there was some argument a while back, but I thought that position that instances are global period was pretty official. At least it made sense to me. The more libraries you import the less control you have over the extent of what they may import. But I guess it wouldn't be

Re: [Haskell-cafe] instance Monad (Either String) in Prelude or Data.Either?

2009-09-11 Thread Evan Laforge
if I understand you correctly, all libraries that software I write depends on, directly or indirectly, must be free of namespace conflicts.  Is that correct? Well, it may be more accurate to say that class instances have no namespaces, and are all implicitly global. When you import a module,

Re: [Haskell-cafe] hmatrix on os x

2009-09-11 Thread brian
Hi, yep - that's the problem I had. run cabal with the -v (verbose option) cabal install -v so you can see exactly where it's failing try the following : --extra-lib-dirs=PATH where PATH was (for me) was /sw/lib I'm not sure but I may have had to use --extra-include-dirs also.