Re: [Haskell-cafe] Module names from a function name
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 I get all the module names which (re-)export a given function name? I'd like to fix Emacs Haskell mode - interactive documentation browser and I need the list of such module names. Thanks! - Jong-won ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: tasty, a new testing framework
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 out of the box (through the standard packages), but it is very extensible, so you can write your own test providers. Please see the home page for more information: http://documentup.com/feuerbach/tasty Are there plans an equivalent of test-framework-th too? /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org twitter: magthe http://therning.org/magnus I invented the term Object-Oriented, and I can tell you I did not have C++ in mind. -- Alan Kay pgpEjh3SXHns3.pgp Description: PGP signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: tasty, a new testing framework
* 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 unmaintained). Tasty supports HUnit, SmallCheck, QuickCheck, and golden tests out of the box (through the standard packages), but it is very extensible, so you can write your own test providers. Please see the home page for more information: http://documentup.com/feuerbach/tasty Are there plans an equivalent of test-framework-th too? I don't have any plans to do that myself, but I welcome anyone who cares to create and maintain such a package. donri on reddit said that porting test-framework-th should be a simple matter of changing one import. Roman signature.asc Description: Digital signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Is there a Galois correspondence between a Haskell class hierarchy and a given instance hierarchy?
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 consider the operation inherited by HOUSE from BUILDING to be part of the signature of HOUSE (this may not be a valid assumption). Is there a Galois correspondence between a Haskell class hierarchy and a given instance hierarchy for a particular type?So more details are explained as [1 ,2 ].Pat--General Idea-- Theory subTheory Theory' = Model' subModel Model--A specific example with Haskell class-to-instance relation --class(BUILDING) subTheory class(HOUSE) = instance(HOUSE)} subModel instance(BUILDING) data House = House deriving Show data Building = Building deriving Show class BUILDING building where -- specify the behavior of buildings here, if any supportRoof :: building - String class BUILDING house = HOUSE house where -- specify additional behavior of houses here, if any live::house - Bool instance BUILDING Building where -- specify how the type Building implements the behavior of type class BUILDING supportRoof b = BUILDING.Building -- A particular b which is a BUILDING.Building.particular can support a roof instance BUILDING House where supportRoof h = BUILDING.House -- A particular h which is a BUILDING.House.particular can support a roof instance HOUSE House where -- specify how the type House implements the behaviour of type class HOUSE live h = if ((supportRoof h) == BUILDING.House) then True else False -- An particular h HOUSE.House.particular can support a roof in exactly the same way as BUILDING.House.particular can. instance HOUSE Building where -- specify how the type Building implements the behaviour of type class HOUSE live b = if ((supportRoof b) == BUILDING.Building) then True else False -- An particular b HOUSE.Building.particular can support a roof in exactly the same way as BUILDING.Building.particular can. Tá an teachtaireacht seo scanta ó thaobh ábhar agus víreas ag Seirbhís Scanta Ríomhphost de chuid Seirbhísí Faisnéise, ITBÁC agus meastar í a bheith slán. http://www.dit.ie This message has been scanned for content and viruses by the DIT Information Services E-Mail Scanning Service, and is believed to be clean. http://www.dit.ie ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] [Haskell] ANN: Monad.Reader Issue 22
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 Dergunov * Error Reporting Parsers: a Monad Transformer Approach by Matt Fenwick and Jay Vyas * Two Monoids for Approximating NP-Complete Problems by Mike Izbicki That is, there are three kinds of Haskellers: The ones who can count and the others who cannot. :-) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] [Haskell] ANN: Monad.Reader Issue 22
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. 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 Dergunov * Error Reporting Parsers: a Monad Transformer Approach by Matt Fenwick and Jay Vyas * Two Monoids for Approximating NP-Complete Problems by Mike Izbicki That is, there are three kinds of Haskellers: The ones who can count and the others who cannot. :-) ___ Haskell mailing list hask...@haskell.org http://www.haskell.org/mailman/listinfo/haskell ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Alternative name for return
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 one pure action description), but I'd like to better see your perspective here. x is only evaluated once, but/executed/ twice. For IO, that means magic. For other types, it means different things. For Identity, twice = id! Your point being? x is the same thing regardless of how many times you run it. What do you mean by the same thing? You cannot compare 'them' in any reasonable sense. This, the impossibility to check putStr c == putStr c, is btw, a refutation of the claim by Tom Ellis that you can do even less with (). The void object is an instance of the Eq and Ord classes. And of Show as well. 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. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why are field selectors functions?
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 could write `f{x}` as the record selection. The more I thought about that ... We use { ... } to declare records, build them, update them. We use { ... } in pattern matching to access named fields. Why don't we use { ... } to access named fields in terms? The syntax `e{ foo }` is unused in H98. (Or at least it was in 1998.) Can someone who was there at the time (1994?, TRex?) remember if that was ever considered? No one else has answered (at least in café), but perhaps the reason is that like me they can’t really remember! I do remember that since Haskell is a functional language we wanted as many things to be functions as possible; we did want to be able to pass field selectors around as arguments to other functions. I vaguely remember suggesting some years later that we should have {…} being a function, so that {field} is a field selector and {field=value} is a field setter (and requiring that you had to write use normal function application: “{field} structure” to select field from structure). SimonPJ gave a reason why not, and I’m sure it will be possible to search out what he said. -- Jón Fairbairn jon.fairba...@cl.cam.ac.uk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Identity of indiscernibles (Was: Alternative name for return)
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 add to all this: getLine == getLine etc.? Good luck! I suspect that you would have to establish also the equality relation between functions and between infinite streams. And you would end as Giordano Bruno and Jeanne d'Arc. But for different reasons. Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Identity of indiscernibles (Was: Alternative name for return)
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 possible to compare values in IO in a reasonable sense. Would you add to all this: getLine == getLine etc.? Good luck! I suspect that you would have to establish also the equality relation between functions and between infinite streams. And you would end as Giordano Bruno and Jeanne d'Arc. But for different reasons. Not at all. One could simply implement IO as a free monad, to take one example. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Identity of indiscernibles (Was: Alternative name for return)
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 that such reordering are *never* operationally equivalent? How about an action that take an input from stdin and then outputs the result of some computation based on it? How do you compare two such actions? I disagree with Jerzy on the purity of IO, but I don't think this line of argument is bound to be very fruitful. Jerzy, taking a similar example to that last one, would you say functions are impure just because I can't write a general (==) for them? I don't see what bountiful numbers of operations has to do with purity. - Jake On Aug 8, 2013 7:21 AM, Tom Ellis tom-lists-haskell-cafe-2...@jaguarpaw.co.uk wrote: 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 possible to compare values in IO in a reasonable sense. Would you add to all this: getLine == getLine etc.? Good luck! I suspect that you would have to establish also the equality relation between functions and between infinite streams. And you would end as Giordano Bruno and Jeanne d'Arc. But for different reasons. Not at all. One could simply implement IO as a free monad, to take one example. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Proposal for adding finallyError to MonadError
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 finallyError function runs the first computation and then runs the second computation regardless of whether an error might arise in the first computation. The first computation defines the result. Introducing semantics of a possible cancellation of the m computation, the finallyError function accepts an additional meaning. The second computation must be performed even in case of cancelling the computation, while function catchError must be ignored. It literally means that the finallyError function cannot be expressed in terms of the catchError function. This idea is essentially inspired by the F# async workflow that does allow cancelling the Async computation. I implemented a similar monad Simulation.Aivika.Cont.Cont for my simulation library Aivika [1]. My monad Cont is an extension of the standard monad with the same name. It uses continuations (namely, three different continuations within one computation). It supports the exception handling and it allows cancelling the computation (the liftIO function should also call finallyError to catch the possible cancellation event if my Cont was a generic monad transformer). In the simulation the cancellation of the computation (actually, of the discontinuous process) is a typical use case. Therefore it should be executed as fast as possible. If I raised a specialized IOException for the cancellation event, then it would be a more costly operation. This is a practical point why the finallyError function cannot be expressed in terms of catchError. Another reason is that the catchError function can eat the cancellation exception, which would be absolutely unacceptable. This is a theoretical reason for introducing finallyError. The finallyError function is very useful for guaranteed releasing the external resources (such as the modeled entities in Aivika) in case of raising an exception and even in case of cancelling the active computation, which is important for simulation, for example. Regarding the standard instances of MonadError, the finallyError function seems to be simple for implementing. It is difficult mainly for the Cont-based monads. So, in Aivika it is more difficult than catchError for my Cont monad. The actual name of the function is not important but here it looks consistent with other functions of the MonadError type class. Finally, the finallyError function can be actually defined in an additional type class, which would extend MonadError like that how the ArrowChoice type class extends Arrow. Kind regards, David Sorokin [1] https://github.com/dsorokin/aivika ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Identity of indiscernibles (Was: Alternative name for return)
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 as to what's actually being discussed in this thread, but Jerzy seemed to suggest that the impurity of IO was somehow related to it not supporting very many operations. I was trying to point out that this doesn't seem to be a good characterisation. I do not, however, have a good candidate for the definition of impure. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard
* 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: src/haskell/Graphics/UI/WXCore/WxcClassesAL.hs:13085:1: Unacceptable argument type in foreign declaration: CInt When checking declaration: foreign import ccall safe static wxLogWindow_Create wxLogWindow_Create :: Ptr (TWindow a) - CWString - CBool - CBool - IO (Ptr (TLogWindow ())) src/haskell/Graphics/UI/WXCore/WxcClassesAL.hs:13085:1: Unacceptable argument type in foreign declaration: CInt When checking declaration: foreign import ccall safe static wxLogWindow_Create wxLogWindow_Create :: Ptr (TWindow a) - CWString - CBool - CBool - IO (Ptr (TLogWindow ())) Failed to install wxcore-0.90.0.3 cabal: Error: some packages failed to install: wx-0.90.0.1 depends on wxcore-0.90.0.3 which failed to install. wxcore-0.90.0.3 failed during the building phase. The exception was: ExitFailure 1 http://lpaste.net/91634 I'm using ghc 7.6.3. I've heard the above problems are related to GHC 7.6.3 being more pedantic about FFI declarations. Is there any way around it? Indeed, and it has nothing to do with Snow Leopard. You should ensure that the CInt data constructor is imported. Either patch it yourself, or have the package maintainer to fix it. Roman ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Identity of indiscernibles
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 want. In fact, you can do almost nothing with it. You can transport it as such, and you can use it as the argument of (=). after the message of Jake McA. /You can do whatever you want with them/ with no harmful effects in any Haskell expression. This was an additional layer of bikeshedding, not exactly about purity. Or, just a bit: the ONLY real operation on an action, i.e. (=) produces side-effects... Other don't, but -- Again, here my point is that calling pure an entity which is opaque and inert, is meaningless (or redundant if you wish...), this was all. Jerzy K. PS. Tom Ellis: One could simply implement IO as a free monad Interesting. I wonder how. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard
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 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 to run on another computer. I get the following error: Dyld Error Message: Library not loaded: /Users/eduardo/.cabal/lib/wxc-0.90.1.0/ghc-7.6.3/libwxc.dylib. What would be the best way to redistribute wxHaskell apps? -- Eduardo Sato On Thursday, August 8, 2013 at 10:20 AM, Roman Cheplyaka wrote: * Eduardo Sato eduardo.s...@gmail.com (mailto: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: src/haskell/Graphics/UI/WXCore/WxcClassesAL.hs:13085:1: Unacceptable argument type in foreign declaration: CInt When checking declaration: foreign import ccall safe static wxLogWindow_Create wxLogWindow_Create :: Ptr (TWindow a) - CWString - CBool - CBool - IO (Ptr (TLogWindow ())) src/haskell/Graphics/UI/WXCore/WxcClassesAL.hs:13085:1: Unacceptable argument type in foreign declaration: CInt When checking declaration: foreign import ccall safe static wxLogWindow_Create wxLogWindow_Create :: Ptr (TWindow a) - CWString - CBool - CBool - IO (Ptr (TLogWindow ())) Failed to install wxcore-0.90.0.3 cabal: Error: some packages failed to install: wx-0.90.0.1 depends on wxcore-0.90.0.3 which failed to install. wxcore-0.90.0.3 failed during the building phase. The exception was: ExitFailure 1 http://lpaste.net/91634 I'm using ghc 7.6.3. I've heard the above problems are related to GHC 7.6.3 being more pedantic about FFI declarations. Is there any way around it? Indeed, and it has nothing to do with Snow Leopard. You should ensure that the CInt data constructor is imported. Either patch it yourself, or have the package maintainer to fix it. Roman ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard
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, using the instructions at: http://www.haskell.org/haskellwiki/WxHaskell/Building#Source_Release Regards, Henk-Jan van Tuyl -- Folding@home What if you could share your unused computer power to help find a cure? In just 5 minutes you can join the world's biggest networked computer and get us closer sooner. Watch the video. http://folding.stanford.edu/ http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html Haskell programming -- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Importing more modules by default
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 bluemangrou...@gmail.comwrote: Hi there, It seems like every Haskell program I write imports the following modules: Control.Monad Control.Applicative Data.Maybe Data.List Is there a good reason why these modules aren't imported by default? When I write a simple script usually a 1/4th of the script is just imports, and my code just looks uglier. Adit ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard
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 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 to run on another computer. I get the following error: Dyld Error Message: Library not loaded: /Users/eduardo/.cabal/lib/wxc-0.90.1.0/ghc-7.6.3/libwxc.dylib. What would be the best way to redistribute wxHaskell apps? wxHaskell uses a lot of dynamic libraries (at least in a Windows environment) that must be distributed with applications; I am not familiar with Mac OS X, but for an idea, see: http://www.haskell.org/haskellwiki/WxHaskell/Windows#DLLs Regards, Henk-Jan van Tuyl -- Folding@home What if you could share your unused computer power to help find a cure? In just 5 minutes you can join the world's biggest networked computer and get us closer sooner. Watch the video. http://folding.stanford.edu/ http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html Haskell programming -- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard
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 machine, but it fails to run on another computer. I get the following error: Dyld Error Message: Library not loaded: /Users/eduardo/.cabal/lib/wxc-0.90.1.0/ghc-7.6.3/libwxc.dylib. What would be the best way to redistribute wxHaskell apps? This sounds like cabal-macosx was not updated to handle dynamic GHC libraries. (GHC used to default to static; OS X was one of the first platforms to switch to default dynamic.) I know in theory how to deal with this (copy the necessary libraries into the app bundle and use install_name_tool to adjust the references to be bundle-relative) but could not give you exact details. -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Call for Participation: Workshop on Functional Art, Music, Modeling and Design
== FARM 2013: Call for Participation ACM SIGPLAN Workshop on Functional Art, Music, Modeling and Design Boston, Massachusetts, USA 28th September, 2013 (directly after ICFP) http://www.cis.upenn.edu/~byorgey/farm13/ == The functional programming community is largely interested in writing beautiful programs. This workshop is intended to gather researchers and practitioners interested in writing beautiful programs that generate beautiful artifacts. Such artifacts may include visual art, music, 3D sculptures, animations, GUIs, video games, physical models, architectural models, choreographies for dance, poetry, and even physical objects such as VLSI layouts, GPU configurations, or mechanical engineering designs. The goal of FARM is to gather together researchers, practitioners, and educators in this interdisciplinary field, as well as anyone else with even a casual interest in the area. We wish to share ideas, look for common ground, and encourage more activity. We also hope to legitimize work in the field and facilitate potential collaboration among the participants. Registration Deadline for early registration: 22 August 2013 https://regmaster3.com/2013conf/ICFP13/register.php This is the registration site for ICFP 2013 and all the affiliated workshops including FARM 2013. Accepted papers and demonstrations -- - Samuel Aaron and Alan F. Blackwell. From Sonic Pi to Overtone: Creative Musical Experiences with Domain-Specific and Functional Languages - Henrik Bäärnhielm, Mikael Vejdemo-Johansson and Daniel Sundström. Using Haskell as DSL for controlling immersive media experiences (Demo) - Guillaume Baudart, Louis Mandel and Marc Pouzet. Programming Mixed Music in ReactiveML - Jean Bresson, Raphael Foulon and Marco Stroppa. Reduction as a Transition Controller for Sound Synthesis Events - Kelsey D'Souza. PySTEMM - A STEM Learning Tool for Exploring and Building Executable Concept Models (Demo) - Andy Gill and Brent A. Yorgey. Functional active animation (Demo) - Jason Hemann and Eric Holk. Visualizing the Turing Tarpit - Paul Hudak. Euterpea: From Signals to Symphonies (Demo) - David Janin, Florent Berthaut, Myriam Desainte-Catherine, Yann Orlarey and Sylvain Salvati. The T-Calculus : towards a structured programing of (musical) time and space - David Janin and Florent Berthaut. LiveTuiles for tiled composition of audio patterns (Demo) - Thomas Jordan. Spontaneous Musical Explorations of Visible Symmetric Structures (Demo) - Hendrik Vincent Koops, José Pedro Magalhães and W. Bas de Haas. A Functional Approach To Automatic Melody Harmonisation - José Pedro Magalhães, Bas De Haas, Gijs Bekenkamp, Dion ten Heggeler and Tijmen Ruizendaal. Chordify: Chord Transcription for the Masses (Demo) - Donya Quick and Paul Hudak. Grammar-Based Automated Music Composition in Haskell - Chung‐chieh Shan and Dylan Thurston. Braiding in circles (Demo) Workshop Organization - Workshop Chair: Paul Hudak Program Chair: Conal Elliott Publicity Chair: Brent Yorgey Program Committee - - Daniel Cukier (AgileAndArt) - Conal Elliott (Tabula) (chair) - Kathleen Fisher (Tufts University) - Richard Gabriel (IBM Research) - George Giorgidze (University of Tübingen) - Paul Hudak (Yale University) - José Pedro Magalhães (University of Oxford) - Alex McLean (University of Leeds) - John Peterson (Western State Colorado University) - Michael Sperber (Active Group) - Henning Thielemann (Martin-Luther-Universität Halle-Wittenberg) - Brent Yorgey (University of Pennsylvania) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Identity of indiscernibles
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 | ... with constructors for all elementary IO operations. Then take type IO a = Free IOF a and define getChar :: IO Char getChar = liftF (GetChar id) putChar :: Char - IO () putChar c = liftF (PutChar c ()) etc.. I make no claims about the performance of a runtime system based on suhc a representation! Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard
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. Has anyone done that? Brandon: sorry for replying directly to you. -- Eduardo Sato On Thursday, August 8, 2013 at 12:26 PM, Brandon Allbery wrote: On Thu, Aug 8, 2013 at 9:54 AM, Eduardo Sato eduardo.s...@gmail.com (mailto: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 machine, but it fails to run on another computer. I get the following error: Dyld Error Message: Library not loaded: /Users/eduardo/.cabal/lib/wxc-0.90.1.0/ghc-7.6.3/libwxc.dylib. What would be the best way to redistribute wxHaskell apps? This sounds like cabal-macosx was not updated to handle dynamic GHC libraries. (GHC used to default to static; OS X was one of the first platforms to switch to default dynamic.) I know in theory how to deal with this (copy the necessary libraries into the app bundle and use install_name_tool to adjust the references to be bundle-relative) but could not give you exact details. -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com (mailto:allber...@gmail.com) ballb...@sinenomine.net (mailto:ballb...@sinenomine.net) unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] deriving Data.HashTable - stack overflow
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: http://hackage.haskell.org/packages/archive/hashable/latest/doc/html/Data-Hashable.html The problem occurs even when using the sample code on the page: {-# LANGUAGE DeriveGeneric #-} import GHC.Generics (Generic) import Data.Hashable data Colour = Red | Green | Blue deriving Generic instance Hashable Colour If I then type `hash Red` I get a stack overflow. I am using the Haskell Platform, so I have hashable-1.1.2.5, but I notice the docs are for hashable-1.2.0.10. If I install 1.2.0.10 though, other code in my project breaks - seems like one part doesn't recognize the instances from another part. So I'll stick with the platform version. I am running the 32-bit Windows GHC 7.6.3. Haskell Platform 2013.2.0.0. Any thoughts? Thanks, Lyle ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Identity of indiscernibles
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] :) signature.asc Description: OpenPGP digital signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Identity of indiscernibles
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 a C function? Greetings, Daniel ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Identity of indiscernibles
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 monads in general You're lacking a matching definition of [1] :) Ah thank you! [1] http://www.haskellforall.com/2012/06/you-could-have-invented-free-monads.html ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Identity of indiscernibles
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 should this work if the user adds an IO operation, e.g by wrapping a C function? Wrapping a C function could perhaps be provided by something like data IOF a = ... | forall i o. Foreign String i (o - a) | ... csin :: Double - IO Double csin x = liftF (Foreign math.h sin x id) Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Identity of indiscernibles
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 | ... with constructors for all elementary IO operations. But how should this work if the user adds an IO operation, e.g by wrapping a C function? Wrapping a C function could perhaps be provided by something like data IOF a = ... | forall i o. Foreign String i (o - a) | ... csin :: Double - IO Double csin x = liftF (Foreign math.h sin x id) I suppose that should actually be 'csin :: CDouble - IO CDouble', but hopefully the general method is clear. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Installing wxHaskel on Snow Leopard
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 runtime dynamic library loader is invoked in the context of a bundle, it uses a special token to find bundle-relative internal libraries (see @executable_path and friends in `man 1 dyld`). This is independent of Info.plist, except insofar as existence (not contents) of that plist is part of Apple's definition of bundle. -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANN: FunGEn 0.4.2, an easy cross-platform OpenGL/GLUT game engine
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 games, it's one of the easiest ways to get started with game development in Haskell. FunGEn was probably the first Haskell game framework, created by Andre Furtado in 2002 (!). Here's his original feature list: * Initialization, updating, removing, rendering and grouping routines for game objects; * Definition of a game background (or map), including texture-based maps and tile maps; * Reading and intepretation of the player's keyboard input; * Collision detection; * Time-based functions and pre-defined game actions; * Loading and displaying of 24-bit bitmap files; * Some debugging and game performance evaluation facilities; * Sound support (actually for windows platforms only... :-[ ) What's new in 0.4.x: * a new hakyll-based website, incorporating the old site content * new haddock documentation * tested with GHC 7.6 * fixed buggy input when holding down keys on windows * input handlers now receive mouse position and modifier state (inspired by Pradeep Kumar; see fungentest.hs for examples) * added q as quit key in examples Home:http://joyful.com/fungen Hackage: http://hackage.haskell.org/package/FunGEn Code:http://hub.darcs.net/simon/fungen Install from hackage: $ cabal update $ cabal install FunGEn Install source and run examples: $ darcs get http://hub.darcs.net/simon/fungen $ cd fungen $ cabal install $ (cd examples/pong; ghc pong; ./pong) $ (cd examples/worms; ghc worms; ./worms) Contribute patches: - log in to hub.darcs.net and fork http://hub.darcs.net/simon/fungen - push changes to your branch - give me a pull request on #haskell-game I have maintained FunGEn very sporadically. If you'd like to take it and run with it, or co-maintain, let's chat! I'm sm on the #haskell-game IRC channel. -Simon ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Identity of indiscernibles
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. For IO in particular, define a functor data IOF a = GetChar (Char - a) | PutChar Char a | ... with constructors for all elementary IO operations. If I understand correctly, you're proposing equality of (IO a) based on the AST of imperatives, similar to what comes out of GCC's front-end for C [1]. In what way is this syntactical equality reasonable? Useful perhaps for detecting CP coding from befuddled undergrads? [1] http://digitocero.com/es/blog/exportar-y-visualizar-el-arbol-sintactico-abstractoast-de-gcc -- Kim-Ee ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Identity of indiscernibles
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 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 | ... with constructors for all elementary IO operations. If I understand correctly, you're proposing equality of (IO a) based on the AST of imperatives, similar to what comes out of GCC's front-end for C [1]. I'm not proposing it. I'm just pointing out it could be done, as a challenge to Jerzy's assertion that In fact, you can do almost nothing with [values of type IO ()]. However, I may have misunderstood Jerzy's point anyway. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] deriving Data.HashTable - stack overflow
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 occurs even when using the sample code on the page: {-# LANGUAGE DeriveGeneric #-} import GHC.Generics (Generic) import Data.Hashable data Colour = Red | Green | Blue deriving Generic instance Hashable Colour If I then type `hash Red` I get a stack overflow. I am using the Haskell Platform, so I have hashable-1.1.2.5, but I notice the docs are for hashable-1.2.0.10. If I install 1.2.0.10 though, other code in my project breaks - seems like one part doesn't recognize the instances from another part. So I'll stick with the platform version. ... Generic support was added in hashable-1.2. Before then, the default implementations for `hash` and `hashWithSalt` were written in terms of each other: hash = hashWithSalt defaultSalt hashWithSalt salt x = salt `combine` hash x Because you did not give an implementation for either of these, both default implementations were used, leading to a loop. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell Platform and Leksah on Windows
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 it seems he has some problems with registration. Anyway, he blogged about his problems at http://dorinlazar.ro/haskell-platform-windows-crippled/ and I'm sure that we can work on fixing some of them. I don’t agree with too many of its conclusions and its description of Cabal is perhaps not up to date with current idioms and recommended practice —it was, after all, written three years ago—, but this article[1] did help me understand the relevant issues when I had similar thoughts. Specifically, I don’t think it’s a good idea to rely on the distribution’s package manager for Haskell packages —mostly a non‐issue in Windows, of course—, so I would disregard that suggestion; many good reasons for this are spelled out in great detail in Albert Lai’s SICP[2]. I have no doubt that the complexity of these issues discourages beginners unfamiliar with Haskell development, having gone through this myself, but these really are difficult problems with no generally accepted ideal solution. Other development environments will happily install packages with a much higher probability of breaking at runtime, and the general doctrine of static correctness guarantees espoused by this community brings only as much complexity as it does reliability. A tradeoff, as everything, with the unfortunate consequence, as always, of bringing discomfort to beginners. “Avoid success at all costs”, was it? [1]: http://ivanmiljenovic.wordpress.com/2010/03/15/repeat-after-me-cabal-is-not-a-package-manager/ [2]: http://www.vex.net/~trebla/haskell/sicp.xhtml ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] deriving Data.HashTable - stack overflow
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 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 even when using the sample code on the page: {-# LANGUAGE DeriveGeneric #-} import GHC.Generics (Generic) import Data.Hashable data Colour = Red | Green | Blue deriving Generic instance Hashable Colour If I then type `hash Red` I get a stack overflow. I am using the Haskell Platform, so I have hashable-1.1.2.5, but I notice the docs are for hashable-1.2.0.10. If I install 1.2.0.10 though, other code in my project breaks - seems like one part doesn't recognize the instances from another part. So I'll stick with the platform version. ... Generic support was added in hashable-1.2. Before then, the default implementations for `hash` and `hashWithSalt` were written in terms of each other: hash = hashWithSalt defaultSalt hashWithSalt salt x = salt `combine` hash x Because you did not give an implementation for either of these, both default implementations were used, leading to a loop. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] deriving Data.HashTable - stack overflow
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, 2013 at 11:02 AM, Joey Adams joeyadams3.14...@gmail.com wrote: 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 occurs even when using the sample code on the page: {-# LANGUAGE DeriveGeneric #-} import GHC.Generics (Generic) import Data.Hashable data Colour = Red | Green | Blue deriving Generic instance Hashable Colour If I then type `hash Red` I get a stack overflow. I am using the Haskell Platform, so I have hashable-1.1.2.5, but I notice the docs are for hashable-1.2.0.10. If I install 1.2.0.10 though, other code in my project breaks - seems like one part doesn't recognize the instances from another part. So I'll stick with the platform version. ... Generic support was added in hashable-1.2. Before then, the default implementations for `hash` and `hashWithSalt` were written in terms of each other: hash = hashWithSalt defaultSalt hashWithSalt salt x = salt `combine` hash x Because you did not give an implementation for either of these, both default implementations were used, leading to a loop. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell Platform and Leksah on Windows
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 Diablo 3 with wine and some winetricks wodoo. 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 (gtk etc) I would recommend leksah maintainers to change the language on their website to prevent future problems like this. Currently the only more or less full featured haskell IDEs legitimately running on windows are EclipseFP and perhaps abandoned VS plugin. On Tuesday, August 6, 2013 10:18:51 PM UTC-7, 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 some problems with registration. Anyway, he blogged about his problems at http://dorinlazar.ro/haskell-platform-windows-crippled/ and I'm sure that we can work on fixing some of them. -- MM All we have to decide is what we do with the time that is given to us ___ Haskell-Cafe mailing list haskel...@haskell.org javascript: http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell Platform and Leksah on Windows
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 using notepad++ and ghci. I don't understand your focus on emacs and make files. 2) if you want an IDE experience, Sublime Text with the right plugins, or perhaps EclipseFP are worth checking out. 3) likewise, if you're finding tooling on windows unsatisfactory, help fix it! Bug reports, patches, or new tools and libraries are always welcome. Haskell is a relatively small community, and thusly limited manpower (we're all volunteers), so way to fix any problem is help out! cheers On Thu, Aug 8, 2013 at 3:30 AM, Dorin Lazar dorin.la...@gmail.com wrote: Hello, I am the original author of the post, and I finally received the emails from the mailman (probably there was an issue with the automated requests). My answers are inlined. 1) Leksah should not be considered an official haskell ide, but merely one of many community supported editing tools. And frankly one of the less widely used ones at that! Leksah is not used much at all by anyone, though theres probably a handful of folks who do use it. Many folks use editors like Sublime Tex (2/3), Emacs, Vi(m), textmate, and many more. Its worth noting that the sublime-haskell plugin for sublime text, and analogous packages for many other editors, provide haskell IDE-like powers, or at least a nice subset thereof. Unfortunately, I think the problem with this is that we have a different vision on how development should be done. I have extensive experience of working from console, with a simple text editor and hand-made Makefiles or anything similar. However, an IDE should be a productivity tool, that can help you improve your understanding of the language, and can assist you in following the proper syntax for a new language. While learning by doing 'write, save, compile, examine error message' is ok with me, it is slow, and it limits the time I can dedicate to learning the language itself. A better cycle is the current 'write, examine error message' of most IDEs, since it's faster and requires no context switch. Sure, editors can help there. IDEs do this by default. So it's normal of me to search for an IDE to better learn the language, I'll leave the emacs + console version for when I am productive in the language. 2) There are people working on building better easily portable native gui toolkits, but in many respects, a nice haskelly gui toolkit is still something people are experimetning with how to do well. theres lots of great tools out as of the past year or two, many more in progress on various time scales, and gtk2hs is great for linux (and thats fine). Unfortunately, this is not what's advertised. In fact, on the leksah site, the recommended method is to have the IDE installed via cabal. In another mail Mihai calls me unreasonable, but I think it's reasonable to think that the recommended method should be the one that works. But the easy to tell truth is that the Haskell Platform for Windows is not mature enough yet. That is something I can understand, and I can recommend other beginners to install a Linux VM for Haskell. That is perfectly fine, zero cost, 100% gain. However, the mistakes from the Haskell Platform as it is now on Windows should be pointed out, and although I've been called a mystical animal that wants only free support, I think what I had in that blog post was actually a bug report for the people that can actually add 1+1 to make 2 when it comes to the Haskell Platform for Windows. Surely, I was harsh. But that's the first experience of a beginner with Haskell, and I chose to contribute my experience to people more knowledgeable instead of shutting up and hiding the dust under the rug. Many thanks, Dorin ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell Platform and Leksah on Windows
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 it, then it was obvious that the recommended way doesn't work as it should. In my mind the platform was broken, I understand now that it's not the platform, just this special way of using it. 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 was wrong to actually try it like that. As I said (or haven't, but will) once I will get the hang of it I will recount my experience for others to follow, hopefully in better terms than this frustrating first experience. Many thanks for everyone's advice on the list, Dorin On Thu, Aug 8, 2013 at 9:48 PM, Carter Schonwald carter.schonw...@gmail.com wrote: 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 using notepad++ and ghci. I don't understand your focus on emacs and make files. 2) if you want an IDE experience, Sublime Text with the right plugins, or perhaps EclipseFP are worth checking out. 3) likewise, if you're finding tooling on windows unsatisfactory, help fix it! Bug reports, patches, or new tools and libraries are always welcome. Haskell is a relatively small community, and thusly limited manpower (we're all volunteers), so way to fix any problem is help out! cheers On Thu, Aug 8, 2013 at 3:30 AM, Dorin Lazar dorin.la...@gmail.com wrote: Hello, I am the original author of the post, and I finally received the emails from the mailman (probably there was an issue with the automated requests). My answers are inlined. 1) Leksah should not be considered an official haskell ide, but merely one of many community supported editing tools. And frankly one of the less widely used ones at that! Leksah is not used much at all by anyone, though theres probably a handful of folks who do use it. Many folks use editors like Sublime Tex (2/3), Emacs, Vi(m), textmate, and many more. Its worth noting that the sublime-haskell plugin for sublime text, and analogous packages for many other editors, provide haskell IDE-like powers, or at least a nice subset thereof. Unfortunately, I think the problem with this is that we have a different vision on how development should be done. I have extensive experience of working from console, with a simple text editor and hand-made Makefiles or anything similar. However, an IDE should be a productivity tool, that can help you improve your understanding of the language, and can assist you in following the proper syntax for a new language. While learning by doing 'write, save, compile, examine error message' is ok with me, it is slow, and it limits the time I can dedicate to learning the language itself. A better cycle is the current 'write, examine error message' of most IDEs, since it's faster and requires no context switch. Sure, editors can help there. IDEs do this by default. So it's normal of me to search for an IDE to better learn the language, I'll leave the emacs + console version for when I am productive in the language. 2) There are people working on building better easily portable native gui toolkits, but in many respects, a nice haskelly gui toolkit is still something people are experimetning with how to do well. theres lots of great tools out as of the past year or two, many more in progress on various time scales, and gtk2hs is great for linux (and thats fine). Unfortunately, this is not what's advertised. In fact, on the leksah site, the recommended method is to have the IDE installed via cabal. In another mail Mihai calls me unreasonable, but I think it's reasonable to think that the recommended method should be the one that works. But the easy to tell truth is that the Haskell Platform for Windows is not mature enough yet. That is something I can understand, and I can recommend other beginners to install a Linux VM for Haskell. That is perfectly fine, zero cost, 100% gain. However, the mistakes from the Haskell Platform as it is now on Windows should be pointed out, and although I've been called a mystical animal that wants only free support, I think what I had in that blog post was actually a bug report for the people that can actually add 1+1 to make 2 when it comes to the Haskell Platform for Windows. Surely, I was harsh. But that's the first experience of a beginner with Haskell, and I
Re: [Haskell-cafe] Haskell Platform and Leksah on Windows
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 that way, and I was wrong to actually try it like that. There's nothing wrong with trying that -- it's a very common temptation for developers coming from other languages. I use Eclipse extensively when writing Java, for the reason's you've mentioned and I was dissapointed when I couldn't find anything similar for Haskell, unfortunately, there still just isn't such an IDE for Haskell yet. Leskah, EclipseFP, FP Haskell Center, etc... are starting points, but they are still lacking in some areas. I think most of us just use a (relatively fancy) text editor, and cabal (or cabal-dev, cab, capri, etc...). You're not likely to find features like refactoring tools or content assist in an easy-to-install Haskell environment right now. --Rogan As I said (or haven't, but will) once I will get the hang of it I will recount my experience for others to follow, hopefully in better terms than this frustrating first experience. Many thanks for everyone's advice on the list, Dorin On Thu, Aug 8, 2013 at 9:48 PM, Carter Schonwald carter.schonw...@gmail.com wrote: 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 using notepad++ and ghci. I don't understand your focus on emacs and make files. 2) if you want an IDE experience, Sublime Text with the right plugins, or perhaps EclipseFP are worth checking out. 3) likewise, if you're finding tooling on windows unsatisfactory, help fix it! Bug reports, patches, or new tools and libraries are always welcome. Haskell is a relatively small community, and thusly limited manpower (we're all volunteers), so way to fix any problem is help out! cheers On Thu, Aug 8, 2013 at 3:30 AM, Dorin Lazar dorin.la...@gmail.com wrote: Hello, I am the original author of the post, and I finally received the emails from the mailman (probably there was an issue with the automated requests). My answers are inlined. 1) Leksah should not be considered an official haskell ide, but merely one of many community supported editing tools. And frankly one of the less widely used ones at that! Leksah is not used much at all by anyone, though theres probably a handful of folks who do use it. Many folks use editors like Sublime Tex (2/3), Emacs, Vi(m), textmate, and many more. Its worth noting that the sublime-haskell plugin for sublime text, and analogous packages for many other editors, provide haskell IDE-like powers, or at least a nice subset thereof. Unfortunately, I think the problem with this is that we have a different vision on how development should be done. I have extensive experience of working from console, with a simple text editor and hand-made Makefiles or anything similar. However, an IDE should be a productivity tool, that can help you improve your understanding of the language, and can assist you in following the proper syntax for a new language. While learning by doing 'write, save, compile, examine error message' is ok with me, it is slow, and it limits the time I can dedicate to learning the language itself. A better cycle is the current 'write, examine error message' of most IDEs, since it's faster and requires no context switch. Sure, editors can help there. IDEs do this by default. So it's normal of me to search for an IDE to better learn the language, I'll leave the emacs + console version for when I am productive in the language. 2) There are people working on building better easily portable native gui toolkits, but in many respects, a nice haskelly gui toolkit is still something people are experimetning with how to do well. theres lots of great tools out as of the past year or two, many more in progress on various time scales, and gtk2hs is great for linux (and thats fine). Unfortunately, this is not what's advertised. In fact, on the leksah site, the recommended method is to have the IDE installed via cabal. In another mail Mihai calls me unreasonable, but I think it's reasonable to think that the recommended method should be the one that works. But the easy to tell truth is that the Haskell Platform for Windows is not mature enough yet. That is something I can understand, and I can recommend other beginners to install a Linux VM for Haskell. That is perfectly fine, zero cost, 100% gain. However, the mistakes from the Haskell Platform as it
Re: [Haskell-cafe] Haskell Platform and Leksah on Windows
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 (gtk etc) ... 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 detailed instructions: http://spottedmetal.blogspot.com/2013/07/setting-up-haskell-gtk-development.html I normally work with Linux; Windows experts could probably make some improvements in my procedures. Greg -- Gregory D. Weber, Ph. D. http://mypage.iu.edu/~gdweber/ Associate Professor of InformaticsTel (765) 973-8420 Indiana University East FAX (765) 973-8550 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Contracts
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 interesting. On Wed, Aug 7, 2013 at 12:53 PM, Duncan Coutts dun...@well-typed.comwrote: On Wed, 2013-08-07 at 17:48 +0100, Colin Adams wrote: I thought the OP was talking about software contracts (as in Eiffel / Design By Contract ). Oh oops, you're right. SPJ has too many papers about contracts! :-) On 7 August 2013 16:15, Duncan Coutts dun...@well-typed.com wrote: On Mon, 2013-08-05 at 23:13 -0400, Julian Arni wrote: I've come across interesting papers - and old, sometimes inaccessible, repositories - related contracts in Haskell (Dana Xu and SPJ's papers; haskellcontracts and the Programatica Project). And then some newer, apparently not quite mature projects (Dan Rosen's repositories, for instance). Is there anything in between - mature, but not abandoned? We did an implementation of the contracts idea for one of our customers which is available (under AGPL or commercial license) on github: https://github.com/netrium/Netrium -- Duncan Coutts, Haskell Consultant Well-Typed LLP, http://www.well-typed.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Duncan Coutts, Haskell Consultant Well-Typed LLP, http://www.well-typed.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] starting GHC development -- two questions
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 source, which is huge: I want to see definition of some symbols. Normally what I would do for this is to load source into GHCi and run :info command. But in the case of GHC, even if it's possible to load GHC into GHCi, I don't think it will be faster than running ack --haskell someSymbol and searching through results manually. First idea came to my mind was to generate tags files and then navigate from within vim(my editor of choice). tags file can be added to Makefile as a goal and then tags can be regenerated after each build. Did anyone else try this before? My second question is do we have any low-hanging fruits in trac, to help new people start contributing to GHC? I know several open source projects using that approach and it's really helpful for beginners. I just skimmed over trac and most issues look way too advanced for a starter. Thanks in advance, --- Ömer Sinan Ağacan http://osa1.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] starting GHC development -- two questions
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 finding my way through GHC source, which is huge: I want to see definition of some symbols. Normally what I would do for this is to load source into GHCi and run :info command. But in the case of GHC, even if it's possible to load GHC into GHCi, I don't think it will be faster than running ack --haskell someSymbol and searching through results manually. First idea came to my mind was to generate tags files and then navigate from within vim(my editor of choice). tags file can be added to Makefile as a goal and then tags can be regenerated after each build. Did anyone else try this before? GHC has a 'make tags' command but I've never gotten it to work. I have always just run 'hasktags .' in the compiler/ directory, which works pretty well for me. (If you're in the RTS, run ctags, etc instead) My second question is do we have any low-hanging fruits in trac, to help new people start contributing to GHC? I know several open source projects using that approach and it's really helpful for beginners. I just skimmed over trac and most issues look way too advanced for a starter. We've been discussing putting together an easy bugs list. As a proxy, you can search on the 'Difficulty' keyword: http://ghc.haskell.org/trac/ghc/query?status=infoneededstatus=mergestatus=newstatus=patchdifficulty=Easy+(less+than+1+hour)col=idcol=summarycol=statuscol=typecol=prioritycol=milestonecol=componentorder=priority For example, this bug seems like a good beginner bug to get your feet wet with the RTS: http://ghc.haskell.org/trac/ghc/ticket/750 This one will give you some experience wrangling the test suite: http://ghc.haskell.org/trac/ghc/ticket/8079 Moving up to the moderate category, here is a nontrivial bug involving profiling and the optimizer: http://ghc.haskell.org/trac/ghc/ticket/609 As with all open source projects, there is always lots of infrastructural work to be done, so if that's your sort of thing, there are plenty of bugs in that category. Cheers, Edward ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Identity of indiscernibles
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 manipulable. On Aug 8, 2013 9:39 AM, Jerzy Karczmarczuk jerzy.karczmarc...@unicaen.fr wrote: 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 want. In fact, you can do almost nothing with it. You can transport it as such, and you can use it as the argument of (=). after the message of Jake McA. *You can do whatever you want with them* with no harmful effects in any Haskell expression. This was an additional layer of bikeshedding, not exactly about purity. Or, just a bit: the ONLY real operation on an action, i.e. (=) produces side-effects... Other don't, but -- Again, here my point is that calling pure an entity which is opaque and inert, is meaningless (or redundant if you wish...), this was all. Jerzy K. PS. Tom Ellis: One could simply implement IO as a free monad Interesting. I wonder how. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] starting GHC development -- two questions
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 further questions to that list. GHC has a 'make tags' command but I've never gotten it to work. I have always just run 'hasktags .' in the compiler/ directory, which works pretty well for me. (If you're in the RTS, run ctags, etc instead) Great! It worked at the first try and I already started using it. We've been discussing putting together an easy bugs list. As a proxy, you can search on the 'Difficulty' keyword: http://ghc.haskell.org/trac/ghc/query?status=infoneededstatus=mergestatus=newstatus=patchdifficulty=Easy+(less+than+1+hour)col=idcol=summarycol=statuscol=typecol=prioritycol=milestonecol=componentorder=priority For example, this bug seems like a good beginner bug to get your feet wet with the RTS: http://ghc.haskell.org/trac/ghc/ticket/750 This one will give you some experience wrangling the test suite: http://ghc.haskell.org/trac/ghc/ticket/8079 Moving up to the moderate category, here is a nontrivial bug involving profiling and the optimizer: http://ghc.haskell.org/trac/ghc/ticket/609 As with all open source projects, there is always lots of infrastructural work to be done, so if that's your sort of thing, there are plenty of bugs in that category. Thanks, I'll start looking for issues with easy difficulty for now and ask further questions to ghc-devs mailing list. --- Ömer Sinan Ağacan http://osa1.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe