Re: [Haskell-cafe] Haskell Platform and Leksah on Windows

2013-08-09 Thread Hamish Mackenzie
On 9 Aug 2013, at 06:43, Vagif Verdi vagif.ve...@gmail.com wrote: Leksah is a linux program intented to run on linux. No, it is also intended to run on OS X and Windows. You can (in some cases) successfully install and run it on windows, but you would need to go through certain steps

Re: [Haskell-cafe] deriving Data.HashTable - stack overflow

2013-08-09 Thread Lyle Kopnicky
Ah, thanks, folks! I'll just implement my own hashing by generating a string and calling the hash function on that. That's what I was doing in the old version of my code, anyway. It's just that in the core Data.HashTable, you had to provide a hash function, so the point where I used the hash

Re: [Haskell-cafe] Haskell Platform and Leksah on Windows

2013-08-09 Thread Hamish Mackenzie
On 9 Aug 2013, at 07:58, Gregory Weber gdwe...@iue.edu wrote: GTK and its (non-Haskell) dependencies seem to be the tricky part. I found the instructions for installing Gtk2hs on Windows http://www.haskell.org/haskellwiki/Gtk2Hs/Installation#Windows a bit sketchy, so wrote a blog post

Re: [Haskell-cafe] deriving Data.HashTable - stack overflow

2013-08-09 Thread Lyle Kopnicky
I chose not to introduce another dependency. I just implemented the hash function by delegating to the Show instance of the nested type: data ValType = FloatType | IntType | StringType deriving (Show,Eq) data VarName = VarName ValType String deriving (Show,Eq) instance Hashable VarName

Re: [Haskell-cafe] deriving Data.HashTable - stack overflow

2013-08-09 Thread Lyle Kopnicky
Here's another way to do it: data ValType = FloatType | IntType | StringType deriving (Show,Eq) instance Hashable ValType where hash FloatType = 0 hash IntType = 1 hash StringType = 2 data VarName = VarName ValType String deriving (Show,Eq) instance Hashable VarName where

Re: [Haskell-cafe] Installling Leksah on ghc7.6.3 with haskell-platform 2013?

2013-08-09 Thread Hamish Mackenzie
You will need Leksah 0.13 for GHC 7.6.3 and it is not in Hackage yet. It is almost ready though. If run git clone https://github.com/leksah/leksah.git cd leksah cabal install cabal-meta cabal-src cabal-meta install It would be interesting to know if it works for you. On 20 Jun 2013, at 13:41,

Re: [Haskell-cafe] Haskell Platform and Leksah on Windows

2013-08-09 Thread David Virebayre
Hi, If you go the EclipseFP approach, you may have installations troubles too. In my case, it was due to having a version of GHC and libraries that EclipseFP doesn't like. Once I got it to work, I loved it. David. 2013/8/8 Dorin Lazar dorin.la...@gmail.com: Hi, I understood what's wrong

[Haskell-cafe] Diagrams and GTK

2013-08-09 Thread Michael Oswald
Hello, I am currently writing an application which draws the structure of some packets with help of the diagrams library directly to a GTK GUI. Now the packets can have several hundreds of parameters which have to be drawn so it takes some seconds to calculate the diagram itself. Of course

Re: [Haskell-cafe] Haskell Platform and Leksah on Windows

2013-08-09 Thread Alberto G. Corona
For those who want to be productive rather than talkative masoquists (thus said with all my love ;)), there are windows installers for Leksah and they work perfectly well. 2013/8/9 David Virebayre dav.vire+hask...@gmail.com Hi, If you go the EclipseFP approach, you may have installations

[Haskell-cafe] Errors with Template Haskell

2013-08-09 Thread Jose A. Lopes
Hi, In Template Haskell, what is the proper way of signalling an error ? For example, you are generating code and you detect that a given parameter does not fulfill a precondition (e.g., String is empty), and you want to abort compilation with a descriptive error message. Thanks, Jose -- Jose

Re: [Haskell-cafe] Errors with Template Haskell

2013-08-09 Thread Edsko de Vries
The Template Haskell quotation monad (Q) has proper support for fail: module A where import Language.Haskell.TH foo :: Q Exp foo = fail Custom compile error! and module B where import A main :: IO () main = print $foo gives B.hs:6:14: Custom

Re: [Haskell-cafe] Errors with Template Haskell

2013-08-09 Thread Jose A. Lopes
Thank you! -- Jose Antonio Lopes Ganeti Engineering Google Germany GmbH Dienerstr. 12, 80331, München Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Graham Law, Christine Elizabeth Flores Steuernummer: 48/725/00206

Re: [Haskell-cafe] starting GHC development -- two questions

2013-08-09 Thread Richard Eisenberg
You may also want to check out this freshly-minted page on the wiki: http://ghc.haskell.org/trac/ghc/wiki/Newcomers Every now and again, someone asks exactly the same question that you did, so I've created that page to help answer it. I hope you find it useful. Happy hacking! Richard On

[Haskell-cafe] ANN: hi2 -- a better indentation mode for Emacs' haskell-mode

2013-08-09 Thread Gergely Risko
Hi, In the last 2-3 weeks I've been working on Haskell indentation inside Emacs. I had some annoyances for a long time and fixed some of them. The new mode is called hi2, it's heavily based on the current haskell-indentation (part of haskell-mode). The changes are mainly to the UI, although, I

Re: [Haskell-cafe] ANN: hi2 -- a better indentation mode for Emacs' haskell-mode

2013-08-09 Thread Tom Ellis
On Fri, Aug 09, 2013 at 12:53:56PM +0200, Gergely Risko wrote: In the last 2-3 weeks I've been working on Haskell indentation inside Emacs. I had some annoyances for a long time and fixed some of them. The new mode is called hi2, it's heavily based on the current haskell-indentation (part

Re: [Haskell-cafe] Why are field selectors functions?

2013-08-09 Thread David Banas
Wouldn't the implementation hiding feature of the *newtype *idiom be broken, if field selectors were not first class functions? For instance, the following code (taken shamelessly from Ch. 10 of *Real World Haskell*): module Parse ( runParser ) where data ParseState = ParseState { string

Re: [Haskell-cafe] Alternative name for return

2013-08-09 Thread Kim-Ee Yeoh
On Thu, Aug 8, 2013 at 7:40 AM, Timon Gehr timon.g...@gmx.ch wrote: You make the distinction between evaluate, Which essentially means applying reduction rules to an expression until the result is a value. and execute or run, etc. This is not functional. How would you know? I think

[Haskell-cafe] translate imperative pseudo code into haskell

2013-08-09 Thread Joerg Fritsch
I would need some help to get to a reasonable function involving the DB read, addition and multiplication. for 0 = i row dimension of A for 0 = j column dimension of B for 0 = k column dimension of A = row dimension of B sum += (read A (i,k))* (read

[Haskell-cafe] ANN: hi-0.0.2, a Haskell project generator

2013-08-09 Thread Daisuke Fujimura
Hello cafe, I'm very happy to announce the release of hi, a Haskell project generator. http://hackage.haskell.org/package/hi This application will generate a scaffold for new Haskell project with given command line argument(or value in configuration file), using git repository as a template.

Re: [Haskell-cafe] translate imperative pseudo code into haskell

2013-08-09 Thread Frerich Raabe
On 2013-08-09 17:04, Joerg Fritsch wrote: I would need some help to get to a reasonable function involving the DB read, addition and multiplication. for 0 = i row dimension of A for 0 = j column dimension of B for 0 = k column dimension of A = row dimension of B sum += (read A

Re: [Haskell-cafe] translate imperative pseudo code into haskell

2013-08-09 Thread Frerich Raabe
On 2013-08-09 17:28, Frerich Raabe wrote: On 2013-08-09 17:04, Joerg Fritsch wrote: for 0 = i row dimension of A for 0 = j column dimension of B for 0 = k column dimension of A = row dimension of B sum += (read A (i,k))* (read B(k,j)) [..] -- This is one way to write your pseudo

Re: [Haskell-cafe] Diagrams and GTK

2013-08-09 Thread Claude Heiland-Allen
Hi Michael, On 09/08/13 08:21, Michael Oswald wrote: Hello, I am currently writing an application which draws the structure of some packets with help of the diagrams library directly to a GTK GUI. Now the packets can have several hundreds of parameters which have to be drawn so it takes

[Haskell-cafe] Some philosophy (Was: Alternative name for return)

2013-08-09 Thread Jerzy Karczmarczuk
I have the impression that a nice part of our dispute comes from the fact that despite our ambitions, and a decent /technical/ level of understanding of what we are talking about, most of us are (and I am one of the worst...) -- -- pitiful philosophers... Really bad... Confusing the contents

Re: [Haskell-cafe] Some philosophy (Was: Alternative name for return)

2013-08-09 Thread man
On Fri, Aug 9, 2013 at 5:44 PM, Jerzy Karczmarczuk jerzy.karczmarc...@unicaen.fr wrote: I have the impression that a nice part of our dispute comes from the fact that despite our ambitions, and a decent /technical/ level of understanding of what we are talking about, most of us are (and I am

Re: [Haskell-cafe] Some philosophy (Was: Alternative name for return)

2013-08-09 Thread Kim-Ee Yeoh
On Fri, Aug 9, 2013 at 10:44 PM, Jerzy Karczmarczuk jerzy.karczmarc...@unicaen.fr wrote: I decided to reread some philosophical texts, and I suggest one for your evening reading. Indiscrete Thoughts by Gian-Carlo Rota, published by Birkhäuser in 1997. Available on the Web. I'm rather fond

Re: [Haskell-cafe] Installling Leksah on ghc7.6.3 with haskell-platform 2013?

2013-08-09 Thread Carlo Hamalainen
On 09/08/13 16:35, Hamish Mackenzie wrote: You will need Leksah 0.13 for GHC 7.6.3 and it is not in Hackage yet. It is almost ready though. If run git clone https://github.com/leksah/leksah.git cd leksah cabal install cabal-meta cabal-src cabal-meta install It would be interesting to know if

Re: [Haskell-cafe] Importing more modules by default

2013-08-09 Thread aditya bhargava
Cool, BasicPrelude solves my problem perfectly! On Thu, Aug 8, 2013 at 7:04 AM, David McBride toa...@gmail.com wrote: I've started using BasicPrelude with -XNoImplicitPrelude in all of my code. It imports all of those and some other stuff as well (text related functions). Cuts down on my