Re: [Haskell-cafe] Module names from a function name

2013-08-08 Thread Roman Cheplyaka
Hi, You can easily do this using the haskell-names library. See http://documentup.com/haskell-suite/haskell-names Roman * Jong-won Choi oz.jongwon.c...@gmail.com [2013-08-08 12:34:44+1000] Hi, I asked this question to beginner mailing list and no luck so far, so I'm trying here. How can

Re: [Haskell-cafe] ANNOUNCE: tasty, a new testing framework

2013-08-08 Thread Magnus Therning
On Mon, Aug 05, 2013 at 09:48:39PM +0300, Roman Cheplyaka wrote: I am pleased to announce the first release of tasty, a new testing framework for Haskell. It is meant to be a successor to test-framework (which is unmaintained). Tasty supports HUnit, SmallCheck, QuickCheck, and golden tests

Re: [Haskell-cafe] ANNOUNCE: tasty, a new testing framework

2013-08-08 Thread Roman Cheplyaka
* Magnus Therning mag...@therning.org [2013-08-08 07:59:37+0200] On Mon, Aug 05, 2013 at 09:48:39PM +0300, Roman Cheplyaka wrote: I am pleased to announce the first release of tasty, a new testing framework for Haskell. It is meant to be a successor to test-framework (which is

[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

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

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 lemm...@henning-thielemann.de 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.

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 two separate evaluations of

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

2013-08-08 Thread Jon Fairbairn
AntC anthony_clay...@clear.net.nz 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

[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] 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 still be

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

[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, the

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 lost

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

2013-08-08 Thread Roman Cheplyaka
* Eduardo Sato eduardo.s...@gmail.com [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:

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 you

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

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 eduardo.s...@gmail.com 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,

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 Thu, 08 Aug 2013 15:54:13 +0200, Eduardo Sato eduardo.s...@gmail.com 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

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 eduardo.s...@gmail.com 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

[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] 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 | ...

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

[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

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] :)

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 wrapping

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 of free

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. But how

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 Char a | ...

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 eduardo.s...@gmail.comwrote: 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

[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

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 general.

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 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

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 li...@qseep.net 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

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 mihai.marus...@gmail.com 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

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 joeyadams3.14...@gmail.comwrote: On Thu, Aug 8, 2013 at 12:22 PM, Lyle Kopnicky li...@qseep.net wrote: ... So I went to the Data.Hashable page and looked up

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 davidleotho...@gmail.com wrote: I do wish there was a compiler-checked way of specifying a minimum complete definition. On Thu, Aug 8,

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] 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

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

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 dorin.la...@gmail.com 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

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 software

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

[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

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

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

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