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

2013-08-08 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 : > Hi, > I understood what's wrong about my approach - an

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

2013-08-08 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] deriving Data.HashTable - stack overflow

2013-08-08 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] deriving Data.HashTable - stack overflow

2013-08-08 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 w

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

2013-08-08 Thread Hamish Mackenzie
On 9 Aug 2013, at 07:58, Gregory Weber 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 with more

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

2013-08-08 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 tabl

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

2013-08-08 Thread Hamish Mackenzie
On 9 Aug 2013, at 06:43, Vagif Verdi 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 installing some unrelated

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

2013-08-08 Thread Ömer Sinan Ağacan
Hello Edward, > First off, welcome to the wonderful world of GHC development! I > recommend that you subscribe to the ghc-devs mailing list and > direct GHC specific questions there: > > http://www.haskell.org/mailman/listinfo/ghc-devs Thanks, I didn't know that. I subscribed and I will ask

Re: [Haskell-cafe] Identity of indiscernibles

2013-08-08 Thread Jake McArthur
Ah! It seems that my wording was ambiguous. All I was trying to say is that there is nothing you can do with an IO action which will cause an otherwise pure expression to exhibit side effects during evaluation, *not* that an IO action is observable in pure code or that they are arbitrarily manipula

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

2013-08-08 Thread Edward Z. Yang
Hello Ömer, First off, welcome to the wonderful world of GHC development! I recommend that you subscribe to the ghc-devs mailing list and direct GHC specific questions there: http://www.haskell.org/mailman/listinfo/ghc-devs > While doing this, I think one feature would greatly help me findi

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

2013-08-08 Thread Ömer Sinan Ağacan
Hi all, I want to start working on GHC, I cloned the repo, made some trivial changes(change some strings etc.) and re-built and observed the results. Now I'll continue reading and understanding the source. While doing this, I think one feature would greatly help me finding my way through GHC sour

Re: [Haskell-cafe] Contracts

2013-08-08 Thread Julian Arni
I was indeed talking about software contracts. I should perhaps have made that clearer, since I had of course come across SPJ's financial contract paper due to a similar confusion on Google's part. Liquid Haskell looks great; might not have been quite what I imagined, but it's definitely more inte

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

2013-08-08 Thread Gregory Weber
On 2013-Aug-08, Vagif Verdi and/or a Mail User Agent wrote: >... >Leksah is a linux program intented to run on linux. You can (in some >cases) successfully install and run it on windows, but you would need >to go through certain steps installing some unrelated to windows >softwa

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

2013-08-08 Thread Rogan Creswick
On Thu, Aug 8, 2013 at 11:58 AM, Dorin Lazar wrote: > I was also in awe of the fact that nobody really says anything about > these difficulties, and felt like an estranged child that messed > things up badly; however, it seems that the real issue is that nobody > really does it that way, and I wa

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

2013-08-08 Thread Dorin Lazar
Hi, I understood what's wrong about my approach - and since I want to use an IDE to assist me, I will try both EclipseFP and Sublime Text, to see how that works. My feeling was that since the leksah website suggested that cabal is the way to do it and since when I search for a Haskell IDE that is i

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

2013-08-08 Thread Carter Schonwald
Hey Dorin, I don't understand your claims. 1) haskell has worked perfectly well on windows for quite some time. I used HUGs nearly a decade ago, and in more recent time (2-3 years ago) I helped teach an introductory first computer science class using GHC where many students were doing great work u

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

2013-08-08 Thread Vagif Verdi
While your friend is wrong to blame haskell on his leksah installation problems i think the culprit here is the leksah web site. It misinforms users saying that leksah runs on windows. It's like Blizzard saying Diablo 3 runs on linux because there are reports of linux users successfully running

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

2013-08-08 Thread Erik Hesselink
There is a ticket with discussion and a patch here [0]. Erik [0] http://ghc.haskell.org/trac/ghc/ticket/7633 On Thu, Aug 8, 2013 at 8:11 PM, David Thomas wrote: > I do wish there was a compiler-checked way of specifying a minimum complete > definition. > > > On Thu, Aug 8, 2013 at 11:02 AM, Joe

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

2013-08-08 Thread David Thomas
I do wish there was a compiler-checked way of specifying a minimum complete definition. On Thu, Aug 8, 2013 at 11:02 AM, Joey Adams wrote: > On Thu, Aug 8, 2013 at 12:22 PM, Lyle Kopnicky wrote: > >> ... >> >> >> So I went to the Data.Hashable page and looked up examples on how to >> derive a H

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

2013-08-08 Thread Manuel Gómez
On Wed, Aug 7, 2013 at 12:48 AM, Mihai Maruseac wrote: > Hello, > > A friend of mine tried to install Haskell Platform and Leksah on > Windows and was troubled by the amount of problems he encountered as a > beginner in this. I've told him to ask over IRC and mailing list but > it seems he has som

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

2013-08-08 Thread Joey Adams
On Thu, Aug 8, 2013 at 12:22 PM, Lyle Kopnicky wrote: > ... > > So I went to the Data.Hashable page and looked up examples on how to > derive a Hashable instance for my datatype: > > http://hackage.haskell.org/packages/archive/hashable/latest/doc/html/Data-Hashable.html > > The problem occurs eve

Re: [Haskell-cafe] Identity of indiscernibles

2013-08-08 Thread Tom Ellis
On Fri, Aug 09, 2013 at 12:38:45AM +0700, Kim-Ee Yeoh wrote: > On Thu, Aug 8, 2013 at 11:05 PM, Tom Ellis > wrote: > > On Thu, Aug 08, 2013 at 03:38:41PM +0200, Jerzy Karczmarczuk wrote: > > > >One could simply implement IO as a free monad > > > Interesting. I wonder how. > > > > See [1] for an e

Re: [Haskell-cafe] Identity of indiscernibles

2013-08-08 Thread Kim-Ee Yeoh
On Thu, Aug 8, 2013 at 11:05 PM, Tom Ellis < tom-lists-haskell-cafe-2...@jaguarpaw.co.uk> wrote: > On Thu, Aug 08, 2013 at 03:38:41PM +0200, Jerzy Karczmarczuk wrote: > > >One could simply implement IO as a free monad > > Interesting. I wonder how. > > See [1] for an explanation of free monads in

[Haskell-cafe] ANN: FunGEn 0.4.2, an easy cross-platform OpenGL/GLUT game engine

2013-08-08 Thread Simon Michael
I'm pleased to announce the hackage release of FunGEn 0.4! (Actually 0.4.2 as my 0.4 announcement did not reach the mail lists.) FunGEn (Functional Game Engine) is a BSD-licensed, cross-platform, OpenGL/GLUT-based, imperative game engine/framework. With very few dependencies and two example gam

Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard

2013-08-08 Thread Brandon Allbery
On Thu, Aug 8, 2013 at 12:04 PM, Eduardo Sato wrote: > Would it be necessary to change Info.plist? > I don't believe so; Info.plist is the externally visible interface details, but these libraries should be hidden inside the app bundle and not visible outside of it. When the runtime dynamic libra

Re: [Haskell-cafe] Identity of indiscernibles

2013-08-08 Thread Tom Ellis
On Thu, Aug 08, 2013 at 05:44:11PM +0100, Tom Ellis wrote: > On Thu, Aug 08, 2013 at 06:25:12PM +0200, Daniel Trstenjak wrote: > > > See [1] for an explanation of free monads in general. For IO in > > > particular, > > > define a functor > > > > > > data IOF a = GetChar (Char -> a) | PutChar

Re: [Haskell-cafe] Identity of indiscernibles

2013-08-08 Thread Tom Ellis
On Thu, Aug 08, 2013 at 06:25:12PM +0200, Daniel Trstenjak wrote: > > See [1] for an explanation of free monads in general. For IO in particular, > > define a functor > > > > data IOF a = GetChar (Char -> a) | PutChar Char a | ... > > > > with constructors for all elementary IO operations. >

Re: [Haskell-cafe] Identity of indiscernibles

2013-08-08 Thread Tom Ellis
On Thu, Aug 08, 2013 at 05:23:50PM +0100, Oliver Charles wrote: > On 08/08/2013 05:05 PM, Tom Ellis wrote: > > On Thu, Aug 08, 2013 at 03:38:41PM +0200, Jerzy Karczmarczuk wrote: > >>> One could simply implement IO as a free monad > >> Interesting. I wonder how. > > > > See [1] for an explanation

Re: [Haskell-cafe] Identity of indiscernibles

2013-08-08 Thread Daniel Trstenjak
Hi Tom, > See [1] for an explanation of free monads in general. For IO in particular, > define a functor > > data IOF a = GetChar (Char -> a) | PutChar Char a | ... > > with constructors for all elementary IO operations. But how should this work if the user adds an IO operation, e.g by wr

Re: [Haskell-cafe] Identity of indiscernibles

2013-08-08 Thread Oliver Charles
On 08/08/2013 05:05 PM, Tom Ellis wrote: > On Thu, Aug 08, 2013 at 03:38:41PM +0200, Jerzy Karczmarczuk wrote: >>> One could simply implement IO as a free monad >> Interesting. I wonder how. > > See [1] for an explanation of free monads in general You're lacking a matching definition of [1] :)

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

2013-08-08 Thread Lyle Kopnicky
Hi folks, In GHC 7.6.3, the base Data.HashTable is deprecated, so I installed the hashtables package. In order to work on your datatype, you need an instance of Data.Hashable.Hashable. So I went to the Data.Hashable page and looked up examples on how to derive a Hashable instance for my datatype:

Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard

2013-08-08 Thread Eduardo Sato
Would it be necessary to change Info.plist? It would be nice being able to distribute haskell apps in general, not only wxHaskell apps. One can certainly write the UI in C++/Objective C, or what have you, and use FFI to call haskell libraries. But I am also interested in writing an app 100% in

Re: [Haskell-cafe] Identity of indiscernibles

2013-08-08 Thread Tom Ellis
On Thu, Aug 08, 2013 at 03:38:41PM +0200, Jerzy Karczmarczuk wrote: > >One could simply implement IO as a free monad > Interesting. I wonder how. See [1] for an explanation of free monads in general. For IO in particular, define a functor data IOF a = GetChar (Char -> a) | PutChar Char a | .

[Haskell-cafe] Call for Participation: Workshop on Functional Art, Music, Modeling and Design

2013-08-08 Thread Brent Yorgey
== FARM 2013: Call for Participation ACM SIGPLAN Workshop on Functional Art, Music, Modeling and Design Boston, Massachusetts, USA 28th September, 2013 (directly after ICFP)

Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard

2013-08-08 Thread Brandon Allbery
On Thu, Aug 8, 2013 at 9:54 AM, Eduardo Sato wrote: > The only problem now is that I want to distribute a wxHaskell application > on mac OS X. I tried using macosx-app and cabal-macosx ( > https://github.com/michaelt/cabal-macosx) to make an "app" file. It runs > fine on my machine, but it fails

Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard

2013-08-08 Thread Henk-Jan van Tuyl
On Thu, 08 Aug 2013 15:54:13 +0200, Eduardo Sato wrote: Roman, thanks. I've managed to install wxHaskell. Someone has already patched it like just you said: https://github.com/wxHaskell/wxHaskell The sample programs compile and work fine now. The only problem now is that I want to distr

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

2013-08-08 Thread David McBride
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 imports by a little over half. Kind of wish it could be made the default. On Wed, Aug 7, 2013 at 10:23 PM, aditya bhargava

Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard

2013-08-08 Thread Henk-Jan van Tuyl
On Wed, 07 Aug 2013 19:46:02 +0200, Eduardo Sato wrote: Hello, guys. Has anybody tried to install wxhaskell on Snow Leopard? I followed these instructions: http://www.haskell.org/haskellwiki/WxHaskell/Mac , but got an error: Try installing the latest version, using the instructions at:

Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard

2013-08-08 Thread Eduardo Sato
Roman, thanks. I've managed to install wxHaskell. Someone has already patched it like just you said: https://github.com/wxHaskell/wxHaskell The sample programs compile and work fine now. The only problem now is that I want to distribute a wxHaskell application on mac OS X. I tried using macos

Re: [Haskell-cafe] Identity of indiscernibles

2013-08-08 Thread Jerzy Karczmarczuk
I am sorry for having mixed-up arguments (but who throws the first stone?...) Jerzy seemed to suggest that the "impurity" of IO was somehow related to it not supporting very many operations. No, not really. I added First, it is not true that you can do with, say, (printStr "Ho!" ) whatever

Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard

2013-08-08 Thread Roman Cheplyaka
* Eduardo Sato [2013-08-07 14:46:02-0300] > Hello, guys. Has anybody tried to install wxhaskell on Snow Leopard? > > I followed these instructions: > http://www.haskell.org/haskellwiki/WxHaskell/Mac , but got an error: > > src/haskell/Graphics/UI/WXCore/WxcClassesAL.hs:13085:1: > Unaccepta

Re: [Haskell-cafe] Identity of indiscernibles (Was: Alternative name for return)

2013-08-08 Thread Tom Ellis
On Thu, Aug 08, 2013 at 08:41:25AM -0400, Jake McArthur wrote: > I don't know what the denotation for this would be, but I can't think of > any reasonable ones for which I can write (==) to respect the denotation. > For example, is "set A, then set B" equal to "set B, then set A"? [...] I'm a bit

[Haskell-cafe] Proposal for adding finallyError to MonadError

2013-08-08 Thread David Sorokin
Hi, Café! I have a proposal. I offer to add a new function to the MonadError type class: finallyError :: MonadError e m => m a -> m b -> m a This is a generalization of the standard finally function that has the following signature: finally: IO a -> IO b -> IO a Like function finally,

Re: [Haskell-cafe] Identity of indiscernibles (Was: Alternative name for return)

2013-08-08 Thread Jake McArthur
I don't know what the denotation for this would be, but I can't think of any reasonable ones for which I can write (==) to respect the denotation. For example, is "set A, then set B" equal to "set B, then set A"? Maybe you could argue that they aren't operationally equivalent, but can you guarantee

Re: [Haskell-cafe] Identity of indiscernibles (Was: Alternative name for return)

2013-08-08 Thread Tom Ellis
On Thu, Aug 08, 2013 at 11:38:08AM +0200, Jerzy Karczmarczuk wrote: > Tom Ellis: > >If I were writing a Haskell compiler I could certainly define 'IO' to be a > >datatype that would allow me to compare 'putStr "c"' to itself. The > >comparison could not be of operational equivalence, but it would

[Haskell-cafe] Identity of indiscernibles (Was: Alternative name for return)

2013-08-08 Thread Jerzy Karczmarczuk
Tom Ellis: If I were writing a Haskell compiler I could certainly define 'IO' to be a datatype that would allow me to compare 'putStr "c"' to itself. The comparison could not be of operational equivalence, but it would still be possible to compare values in IO in a reasonable sense. Would you

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

2013-08-08 Thread Jon Fairbairn
AntC writes: > No! This isn't more bikeshedding about notation. > > It's a bit of Haskell archaeology. > >> On Sun, Jun 30, 2013 at 2:59 AM, Judah Jacobson wrote: > [This isn't exactly what Judah wrote.] >> ... >> >> Instead of `x f` (to access field x of record f), >> maybe we could write `f{x}`

Re: [Haskell-cafe] Alternative name for return

2013-08-08 Thread Tom Ellis
On Thu, Aug 08, 2013 at 01:19:27AM +0200, Jerzy Karczmarczuk wrote: > Bardur Arantsson comments the comment of Joe Quinn: > >>>On 8/7/2013 11:00 AM, David Thomas wrote: > >twice :: IO () -> IO () > >twice x = x >> x > > > >I would call that evaluating x twice (incidentally creating

Re: [Haskell-cafe] [Haskell] ANN: Monad.Reader Issue 22

2013-08-08 Thread Neil Davies
And yet others who believe the Axiom of Choice is flawed? On 8 Aug 2013, at 09:04, Henning Thielemann wrote: > > On Wed, 7 Aug 2013, Edward Z. Yang wrote: > >> I am pleased to announce that Issue 22 of the Monad Reader is now available. >> >> http://themonadreader.files.wordpress.com/2013

Re: [Haskell-cafe] [Haskell] ANN: Monad.Reader Issue 22

2013-08-08 Thread Henning Thielemann
On Wed, 7 Aug 2013, Edward Z. Yang wrote: I am pleased to announce that Issue 22 of the Monad Reader is now available. http://themonadreader.files.wordpress.com/2013/08/issue22.pdf Issue 22 consists of the following two articles: * "Generalized Algebraic Data Types in Haskell" by Anton D

[Haskell-cafe] Is there a Galois correspondence between a Haskell class hierarchy and a given instance hierarchy?

2013-08-08 Thread Patrick Browne
HiIs it reasonable to consider a Haskell class as a loose signature-only-specification (denoting a theory) and an instance as an implementation (denoting a model)?In the example below the specification of the class BUILDING is textually smaller than the specification of the class HOUSE,provided we