Re: [Haskell-cafe] Haskellers in Minsk, Belarus?

2013-10-06 Thread Dmitry Vyal
Hi Yuras, thanks for the link. That's the sad truth. I don't know the actual reasons, but suspect there are many. Overtime work, fatigue, greed and alienation which are ubiquitous it today's society are among them. I admire people who nevertheless manage to work on open source projects in

Re: [Haskell-cafe] Poll plea: State of GUI graphics libraries in Haskell

2013-10-06 Thread Heinrich Apfelmus
Sven Panne wrote: 2013/9/27 Conal Elliott co...@conal.net: [...] Am I mistaken about the current status? I.e., is there a solution for Haskell GUI graphics programming that satisfies the properties I'm looking for (cross-platform, easily buildable, GHCi-friendly, and OpenGL-compatible)? [...]

Re: [Haskell-cafe] Poll plea: State of GUI graphics libraries in Haskell

2013-10-06 Thread Heinrich Apfelmus
Sven Panne wrote: 2013/9/27 Heinrich Apfelmus apfel...@quantentunnel.de: Actually, I'm reading about WebGL right now, and it appears to me that it should be very easy to support in Threepenny. [...] I am not sure if WebGL is enough: WebGL is basically OpenGL ES 2.0, which is again basically

[Haskell-cafe] Call for Contributions - Haskell Communities and Activities Report, November 2013 edition

2013-10-06 Thread Janis Voigtlaender
[Transition in editorship of HCAR in progress!] Dear all, We would like to collect contributions for the 25th edition of the Haskell Communities Activities Report

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-06 Thread Ryan Newton
Thanks for the responses all. I'm afraid the point about GHC.Generics got lost here. I'll respond and then rename this as a specific library proposal. I don't want to fix the world's Eq instances, but I am ok with requiring that people derive Generic for any data they want to put in an LVar

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-06 Thread Tillmann Rendel
Hi, Ryan Newton wrote: It is very hard for me to see why people should be able to make their own Generic instances (that might lie about the structure of the type), in Safe-Haskell. I guess that lying Generics instances might arise because of software evolution. Let's say we start with an

[Haskell-cafe] Converting MPTC+fundeps to type family / problem with polymorphic constant. Roles?

2013-10-06 Thread Ryan Newton
The abstract-par class has used multi-parameter type classes with fundeps: http://hackage.haskell.org/package/abstract-par-0.3.1/docs/Control-Monad-Par-Class.html#g:1 And I'm trying to port it to use type families. But the following combination seems to be completely unusable for me right now:

Re: [Haskell-cafe] Converting MPTC+fundeps to type family / problem with polymorphic constant. Roles?

2013-10-06 Thread Ryan Newton
Oops, right after I sent I realized the answer ;-). I needed to delete one character to uncurry the type function. That is: type Future m instead of type Future m a The fixed version is here:

Re: [Haskell-cafe] [ANNOUNCE] Penny - double-entry accounting

2013-10-06 Thread Simon Michael
On 10/2/13 4:55 PM, Omari Norman wrote: I'm pleased to make the first public announcement of the availability of Penny, a double-entry command-line accounting system. Hurrah! Congrats Omari. Will there be a 1.0 release, or will you be forever chasing that number like me ?

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-06 Thread Carter Schonwald
(replicating what i said on the ghc-devs thread) one thing i'm confused by, and this wasn't properly addressed in the prior threads, is for a type like data Annotated t ann = MkAnn t ann would you consider the following unsafe? instance Eq t = Eq ( Annotated t ann) (==) (MkAnn t1 _)

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-06 Thread adam vogt
On Sun, Oct 6, 2013 at 6:54 PM, Tillmann Rendel ren...@informatik.uni-marburg.de wrote: Hi, Ryan Newton wrote: It is very hard for me to see why people should be able to make their own Generic instances (that might lie about the structure of the type), in Safe-Haskell. I guess that

Re: [Haskell-cafe] Music update

2013-10-06 Thread Evan Laforge
I saw the the video on g+, it's especially nice with live instruments. I noticed the code had a fair amount of stuff dealing with limitations of the auto-bass, I assume you had to be careful not to gum up its works. Is there a robotic drumset back there somewhere too? Also change ringing is new

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-06 Thread Ryan Newton
Tillmann, Thanks, that is in interesting use case for handwritten Generics. I'm not fully dissuaded though, simply because: (1) it can't be too common! Especially when you intersect the people who have done or will do this with the people who care about SafeHaskell. (Again, if they don't,

Re: [Haskell-cafe] haskell platform broken in ubuntu

2013-10-05 Thread Shrivats
Rustom, I've not looked at your forums link, what Vagif might be referring to is, since you've already got your compiler installed, installing the platform is /just/ compiling the remaining modules that are part of the platform. Of course, building the compiler from source would take a very long

Re: [Haskell-cafe] haskell platform broken in ubuntu

2013-10-05 Thread Vagif Verdi
Oops my bad. The script downloads and installs binary, already compiled ghc. So it certainly does not take 2 hours, i just did it on 2 computers and it takes less than a couple of minutes. I did not though install the entire haskell platform, only ghc itself. On Friday, October 4, 2013

Re: [Haskell-cafe] Seeking Control.Lens Combinator

2013-10-05 Thread Niklas Haas
On Fri, 4 Oct 2013 16:23:23 -0700, Charlie Paul charli...@gmail.com wrote: Hello, I'm looking for a combinator along the lines of () :: Lens' a b - Lens' a b' - Lens' a (b,b') I can see how it could lead to lenses that don't follow the laws, but for Lenses which are somehow independent

Re: [Haskell-cafe] Newclasses

2013-10-05 Thread Wvv
Stijn van Drongelen wrote On Fri, Oct 4, 2013 at 10:31 PM, Wvv lt; vitea3v@ gt; wrote: About newclass and compose data, we can do next: newclass Foo [a] = FooList a where {containerMainipulation=...} newclass Foo (Set a) = FooSet a where {containerMainipulation=...} newclass

[Haskell-cafe] New command line parsing package

2013-10-05 Thread Simon bergot
Hello all, I have recently uploaded argparserhttp://hackage.haskell.org/package/argparser-0.3.2, a command line parser library. I made it because of 3 reasons: - I am writing more and more scripts in haskell instead of python - I did not want to use the ones presented

Re: [Haskell-cafe] Seeking Control.Lens Combinator

2013-10-05 Thread Sebastiaan Visser
Charles, I know you specifically asked for a Control.Lens combinator and I don't have one for you, but I take the opportunity to show you how easy this is using fclabels: tupleUp :: f :- a - f :- b - f :- (a, b) tupleUp a b = point $ (,) $ L.fst - a --

Re: [Haskell-cafe] building a FFI library with cabal

2013-10-05 Thread Tad Doxsee
With a big help from the community, I've fixed my problem. I had to include the extra-libraries when building the hcholmod library. I'll push a new version later today. Tad On Fri, Oct 4, 2013 at 12:36 PM, Tad Doxsee tad.dox...@gmail.com wrote: Hi, I'm trying to create an FFI library to

Re: [Haskell-cafe] ANN: E-book version of the Typeclassopedia

2013-10-05 Thread Dan Frumib
Thanks, that looks useful! :) On 04 Oct 2013, at 17:13, Erlend Hamberg ehamb...@gmail.com wrote: While re-reading Brent Yorgey's Excellent Typeclassopedia I converted it to Pandoc Markdown in order to be able to create an EPUB version. Having a “real” e-book meant that I could comfortably

Re: [Haskell-cafe] ANN: E-book version of the Typeclassopedia

2013-10-05 Thread Flavio Villanustre
Very useful, thanks! On Oct 4, 2013 9:13 AM, Erlend Hamberg ehamb...@gmail.com wrote: While re-reading Brent Yorgey's Excellent Typeclassopedia I converted it to Pandoc Markdown in order to be able to create an EPUB version. Having a “real” e-book meant that I could comfortably read it on my

[Haskell-cafe] Announce: HDBI-1.2 and friends

2013-10-05 Thread Aleksey Uymanov
Hello, haskellers! Here is HDBI-1.2 and some friends There is class `FromRow` and `ToRow` from this version as well as hdbi-conduit package. So, you can write your code like this: {-# LANGUAGE OverloadedStrings , TemplateHaskell #-} import Control.Monad.IO.Class import Data.Conduit import

[Haskell-cafe] Haskellers in Minsk, Belarus?

2013-10-05 Thread Yuras Shumovich
Hi, I just read an article (sorry, it is in russian: http://habrahabr.ru/post/196454/ ). The idea I found interesting: even in big citied developers complain that nothing happens at their location, but when you try to make an event -- only few of them want to participate. I never participate in

Re: [Haskell-cafe] Poll plea: State of GUI graphics libraries in Haskell

2013-10-05 Thread Sven Panne
2013/9/27 Heinrich Apfelmus apfel...@quantentunnel.de: Actually, I'm reading about WebGL right now, and it appears to me that it should be very easy to support in Threepenny. [...] I am not sure if WebGL is enough: WebGL is basically OpenGL ES 2.0, which is again basically OpenGL 2.0 plus some

Re: [Haskell-cafe] Poll plea: State of GUI graphics libraries in Haskell

2013-10-05 Thread Sven Panne
2013/9/27 Conal Elliott co...@conal.net: [...] Am I mistaken about the current status? I.e., is there a solution for Haskell GUI graphics programming that satisfies the properties I'm looking for (cross-platform, easily buildable, GHCi-friendly, and OpenGL-compatible)? [...] Time warp! ;-)

[Haskell-cafe] Haskell Madrid meetup: Web development with Haskell. October 9th

2013-10-05 Thread Alberto G. Corona
Hi Spanish haskellers. Maybe it is too late for the announcement, but we will have a meetup the 9th (next Tuesday). Since the meetup group is devoted to functional programming in general, not specifically Haskell, I will give an introduction to web programming in Haskell: major platforms,

[Haskell-cafe] A question regarding reading CPP definitions from a C header

2013-10-05 Thread Ömer Sinan Ağacan
Hi all, Let's say I want to #include a C header file in my Haskell library just to read some macro definitions. The C header file also contains some C code. Is there a way to load only macro definitions and not C code in #include declarations in Haskell? What I'm trying to do is I'm linking my

Re: [Haskell-cafe] Poll plea: State of GUI graphics libraries in Haskell

2013-10-05 Thread John Lato
I think you've misunderstood Robin's point. The problem is that each of these libraries is platform-specific. Writing an api on top of one is work enough, but writing a cross-platform api that binds to the appropriate platform-specific backend is a major undertaking. On Oct 4, 2013 7:12 PM, Alp

Re: [Haskell-cafe] Store type-class polymorphic values generically

2013-10-04 Thread Heinrich Apfelmus
Christopher Done wrote: It's very easy to state this problem without enough details and mislead people into providing a solution for a different problem, so I'll try to include all the information and use-case. I need a function that can store a value in a concrete opaque type. I know the type

Re: [Haskell-cafe] Store type-class polymorphic values generically

2013-10-04 Thread Christopher Done
On 4 October 2013 10:56, Heinrich Apfelmus apfel...@quantentunnel.de wrote: In particular, the Locker stores arbitrary values like Dynamic , except that values are extracted and removed with the help of a Key . This gets rid of the Typeable constraint. lock :: Key a - a - Locker I can't

Re: [Haskell-cafe] Store type-class polymorphic values generically

2013-10-04 Thread Heinrich Apfelmus
Christopher Done wrote: On 4 October 2013 10:56, Heinrich Apfelmus apfel...@quantentunnel.de wrote: In particular, the Locker stores arbitrary values like Dynamic , except that values are extracted and removed with the help of a Key . This gets rid of the Typeable constraint. lock ::

Re: [Haskell-cafe] Store type-class polymorphic values generically

2013-10-04 Thread Simon Peyton-Jones
| However, I want to write this as a core-to-core | translation as a ghc-plugin. I want the definition go = putStrLn Hello | World! to be translated to what I wrote above. Core cannot generate new | names to be exported from a module, so go_ is now gone. Wait... what do you mean Core cannot

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-04 Thread Heinrich Apfelmus
Tom Ellis wrote: On Wed, Oct 02, 2013 at 11:24:39AM +0200, Heinrich Apfelmus wrote: I'm not sure whether the Eq instance you mention is actually incorrect. I had always understood that Eq denotes an equivalence relation, not necessarily equality on the constructor level. There's a

[Haskell-cafe] ANN: E-book version of the Typeclassopedia

2013-10-04 Thread Erlend Hamberg
While re-reading Brent Yorgey's Excellent Typeclassopedia I converted it to Pandoc Markdown in order to be able to create an EPUB version. Having a “real” e-book meant that I could comfortably read it on my e-book reader and highlight text and take notes while reading. I also fixed some minor

Re: [Haskell-cafe] ANN: E-book version of the Typeclassopedia

2013-10-04 Thread Dag Odenhall
That's great — thank you! On Fri, Oct 4, 2013 at 3:13 PM, Erlend Hamberg ehamb...@gmail.com wrote: While re-reading Brent Yorgey's Excellent Typeclassopedia I converted it to Pandoc Markdown in order to be able to create an EPUB version. Having a “real” e-book meant that I could comfortably

Re: [Haskell-cafe] Store type-class polymorphic values generically

2013-10-04 Thread Alp Mestanogullari
Hi Chris, Maybe this package (from Edward Kmett, surprisingly) could help: http://hackage.haskell.org/package/constraints-0.3.3/docs/Data-Constraint.html? Considering it kind of reifies the type class constraints, I'm wondering whether you could use this to carry the constraints along the value

Re: [Haskell-cafe] Poll plea: State of GUI graphics libraries in Haskell

2013-10-04 Thread Alp Mestanogullari
Hi guys, I have been willing to have a nice GUI DSEL with good aesthetics for a while. I think the hardest part wouldn't be the API, but really what library we use underneath so that it's cross-platform and easy to install for everyone. But I would love for something like that to happen and am

Re: [Haskell-cafe] Poll plea: State of GUI graphics libraries in Haskell

2013-10-04 Thread Jake McArthur
I don't think I would quite say haskell-game is quite relevant. For that matter, the implementation on GitHub is not very good. It's too complicated to scale and too specialized. I've been starting a fresh implementation, since I learned a lot about what I really want to do writing that, but it is

Re: [Haskell-cafe] Poll plea: State of GUI graphics libraries in Haskell

2013-10-04 Thread Alp Mestanogullari
Yes, sorry, why I brought up haskell-game wasn't clear. I meant to say there are already quite a few people willing to improve the situation of graphics programming in Haskell (may it be GUI, games, visualization, ...). And I think we should definitely talk to each other and try to come up with

[Haskell-cafe] Machine Learning Startup Seeks Software Architect

2013-10-04 Thread Charles Weitzer
My name is Charles Weitzer. I have a client with a startup quantitative hedge fund located in Northern California. The Fund currently manages a very healthy amount of capital. The founders have PhD's in Computer Science from Stanford and in Statistics from Berkeley. They have made unpublished

[Haskell-cafe] building a FFI library with cabal

2013-10-04 Thread Tad Doxsee
Hi, I'm trying to create an FFI library to CHOLMOD ( http://www.cise.ufl.edu/research/sparse/cholmod/) but am having problems. My project is here: github.com/tdox/hcholmod. I can link an executable with the build script in the examples directory (line 4). But line 7 does not work (I get

Re: [Haskell-cafe] Newclasses

2013-10-04 Thread Wvv
Newclasses are something like instances, but out of scope. In a baggage. We don't use them for interfere their functions. This why newclasses never overlap each other and between them and any instances. We use newclasses to plug-in/connect to any related class or combine data Replying to you

Re: [Haskell-cafe] Newclasses

2013-10-04 Thread Stijn van Drongelen
On Fri, Oct 4, 2013 at 10:31 PM, Wvv vite...@rambler.ru wrote: Newclasses are something like instances, but out of scope. In a baggage. So under the hood of GHC, newclasses would be partially filled in dictionaries. We already have too many classes: (...) We can't divide all classes to

Re: [Haskell-cafe] Poll plea: State of GUI graphics libraries in Haskell

2013-10-04 Thread Robin KAY
Dear Alp, Alp Mestanogullari wrote: [snip] I have been willing to have a nice GUI DSEL with good aesthetics for a while. I think the hardest part wouldn't be the API, but really what library we use underneath so that it's cross-platform and easy to install for everyone. But I would love for

[Haskell-cafe] Calling Python from Haskell

2013-10-04 Thread Manuel Gómez
Hi list, What’s the preferred way of calling into Python from Haskell? I’ve found MissingPy[0], but it seems to be somewhat bitrotten and a couple of experiments yielded segfaults. There’s also the cpython package[1], but that seems to require Python 3.3, and I’m trying to call into code

[Haskell-cafe] Seeking Control.Lens Combinator

2013-10-04 Thread Charlie Paul
Hello, I'm looking for a combinator along the lines of () :: Lens' a b - Lens' a b' - Lens' a (b,b') I can see how it could lead to lenses that don't follow the laws, but for Lenses which are somehow independent (like _1 and _2), it works perfectly well. Is there a way in lens to specify this

Re: [Haskell-cafe] Calling Python from Haskell

2013-10-04 Thread Arjun Comar
Manuel- Try my fork of the MissingPy library, I've brought it up to date and it seems to function ok with current ghc/python. www.github.com/arjuncomar/missingpy.git The standalone branch also removes a lot of the extra dependencies MissingPy has for extra functionality you probably don't need.

Re: [Haskell-cafe] Poll plea: State of GUI graphics libraries in Haskell

2013-10-04 Thread Alp Mestanogullari
If these said libraries let us write a good API on top, then perfect! The problem is to actually pick the ones fulfilling our needs I think, all the major candidatures have pretty serious drawbacks, AFAIK. On Sat, Oct 5, 2013 at 12:36 AM, Robin KAY komad...@gekkou.co.uk wrote: Dear Alp, Alp

[Haskell-cafe] haskell platform broken in ubuntu

2013-10-04 Thread Rustom Mody
I just upgraded my ubuntu laptop to 13.04 and haskell platform is gone!! http://askubuntu.com/questions/286764/how-to-install-haskell-platform-for-ubuntu-13-04 What is the current status on this? Is 13.10 going to correct this? ___ Haskell-Cafe mailing

Re: [Haskell-cafe] haskell platform broken in ubuntu

2013-10-04 Thread Vagif Verdi
13.04 has packages for ghc 7.6.2 It is easy to install latest haskell platform though. Just run this script: https://github.com/chrisprobst/ubuntu-raring-haskell On Friday, October 4, 2013 8:11:46 PM UTC-7, rusi wrote: I just upgraded my ubuntu laptop to 13.04 and haskell platform is gone!!

Re: [Haskell-cafe] haskell platform broken in ubuntu

2013-10-04 Thread Rustom Mody
On Sat, Oct 5, 2013 at 9:05 AM, Vagif Verdi vagif.ve...@gmail.com wrote: 13.04 has packages for ghc 7.6.2 It is easy to install latest haskell platform though. Just run this script: https://github.com/chrisprobst/ubuntu-raring-haskell I was hoping that something a little less painful than

Re: [Haskell-cafe] haskell platform broken in ubuntu

2013-10-04 Thread Vagif Verdi
That will give you only ghc 7.6.2. If you want latest haskell-platform, source compile is the only option. And btw it is not THAT painful :) You run the script, wait 2-3 minutes and tada! On Friday, October 4, 2013 8:44:29 PM UTC-7, rusi wrote: On Sat, Oct 5, 2013 at 9:05 AM, Vagif Verdi

Re: [Haskell-cafe] haskell platform broken in ubuntu

2013-10-04 Thread Rustom Mody
On Sat, Oct 5, 2013 at 9:18 AM, Vagif Verdi vagif.ve...@gmail.com wrote: That will give you only ghc 7.6.2. If you want latest haskell-platform, source compile is the only option. And btw it is not THAT painful :) You run the script, wait 2-3 minutes and tada! Ok so someone is very confused

Re: [Haskell-cafe] Poll plea: State of GUI graphics libraries in Haskell

2013-10-04 Thread Henk-Jan van Tuyl
On Wed, 02 Oct 2013 12:24:25 +0200, Atze Dijkstra a...@uu.nl wrote: Hi, as for wxHaskell, it is currently maintained at https://github.com/wxHaskell/wxHaskell, compilable with wxWidgets 2.9.5 and GHC 7.6. Work is underway to fix various bugs introduced over time by changes in wxWidgets,

Re: [Haskell-cafe] Newclasses

2013-10-03 Thread Wvv
Your first two cases will be fixed in 7.10, as Applicative finally becomes a superclass of Monad. Sure, newclassses not about Applicative and Monads only. This question is more wider. Must Apply be a superclass of Bind? Must Bind be a superclass of Monad? So, must Monad has 2 superclasses at

[Haskell-cafe] [ANN] yi-0.7

2013-10-03 Thread Dmitry Ivanov
I'm pleased to announce a new release of Yi, text editor written and extensible in Haskell. This release introduces new vim keybindings emulation. If all goes well, the old one will be deprecated in future. The advantages of the new emulation include support for visual block operations, more

[Haskell-cafe] Using lenses

2013-10-03 Thread Simon Peyton-Jones
(I sent this to 'libraries' but Kim-Ee suggested adding Café, where so many smart people hang out.) Friends Some of you will know that I've promised to give a talk about Edward's lens libraryhttp://hackage.haskell.org/package/lens at the Haskell

Re: [Haskell-cafe] Using lenses

2013-10-03 Thread Nicolas Trangez
Simon, On Thu, 2013-10-03 at 08:07 +, Simon Peyton-Jones wrote: If you are using the lens library yourself, could you spare a few minutes to tell me how you are using it? I'm not a heavy 'lens'-user (yet), and this might not be the most pretty use-case from a theoretic point of view, but

Re: [Haskell-cafe] Using lenses

2013-10-03 Thread Roman Cheplyaka
Hi Simon, An interesting use case is my time-lens library. http://hackage.haskell.org/package/time-lens-0.3/docs/Data-Time-Lens.html You can do things like modL minutes (+5) (TimeOfDay 16 57 13) 17:02:13 But one has to be somewhat lenient about the lens laws here. Roman * Simon

Re: [Haskell-cafe] Using lenses

2013-10-03 Thread Mike Ledger
Hi, In a game I made recently, I had to load OBJ formatted models into an OpenGL-friendly format. To do that, I'd parse the .obj, into a simple ADT, and build the model into a vector. Here's where lens comes in: we want to build separate vectors for the vertices, normals, UVs and faces indices.

Re: [Haskell-cafe] Newclasses

2013-10-03 Thread Stijn van Drongelen
On Thu, Oct 3, 2013 at 8:16 AM, Wvv vite...@rambler.ru wrote: Your first two cases will be fixed in 7.10, as Applicative finally becomes a superclass of Monad. Sure, newclassses not about Applicative and Monads only. This question is more wider. Must Apply be a superclass of Bind? Must

Re: [Haskell-cafe] Using lenses

2013-10-03 Thread Sebastiaan Visser
Simon, I've used lenses to manipulate URIs represented as strings in a structured way, like: modify (port . iso parsePrintUri) (+10) http://localhost:8070/index.html; Of course using fclabels and not lens ;-) Sebastiaan On Oct 3, 2013, at 10:07 AM, Simon Peyton-Jones simo...@microsoft.com

Re: [Haskell-cafe] Using lenses

2013-10-03 Thread Niklas Haas
Another great use of lenses is the lens-aeson library (not to be confused with aeson-lens). It's technically based around prisms, though, so it's outside the scope of your talk; but you may wish to at least reference it - it makes working with JSON really elegant!

Re: [Haskell-cafe] Using lenses

2013-10-03 Thread Gergely Risko
Hi Simon, http://hackage.haskell.org/package/lens-datetime-0.2/docs/Data-Time-Lens.html Read the top of the page. aDay = fromGregorian 2013 08 22 aLocal = LocalTime aDay (TimeOfDay 13 45 28) aUTC = UTCTime aDay 7458.9 aLocal ^. years 2013 aUTC ^. months 8 aDay ^. days 22 aLocal time .~

Re: [Haskell-cafe] Using lenses

2013-10-03 Thread Tony Morris
Lenses for nested sum types e.g. Either. On 03/10/2013 6:08 PM, Simon Peyton-Jones simo...@microsoft.com wrote: (I sent this to ‘libraries’ but Kim-Ee suggested adding Café, where so many smart people hang out.) ** ** Friends ** ** Some of you will know that I’ve promised to

Re: [Haskell-cafe] Using lenses

2013-10-03 Thread Niklas Haas
On Thu, 3 Oct 2013 22:06:22 +1000, Tony Morris tmor...@tmorris.net wrote: Lenses for nested sum types e.g. Either. I think those would be leaning more in the direction of prisms. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] [ANN] lvish 1.0 -- successor to monad-par

2013-10-03 Thread Ryan Newton
Hi Ben, We made a small update releasehttp://hackage.haskell.org/package/lvish-1.0.0.2that links the github, and also links a mirror for the haddocks, since something weird seems to be going on with Hackage 2: http://www.cs.indiana.edu/~rrnewton/haddock/lvish/

Re: [Haskell-cafe] [ANN] lvish 1.0 -- successor to monad-par

2013-10-03 Thread Roman Cheplyaka
Ryan, You can use standalone-haddock[1] so that the links to other packages are not broken. [1]: http://documentup.com/feuerbach/standalone-haddock Roman * Ryan Newton rrnew...@gmail.com [2013-10-03 10:50:47-0400] Hi Ben, We made a small update

Re: [Haskell-cafe] Using lenses

2013-10-03 Thread Christopher Done
On 3 October 2013 10:57, Roman Cheplyaka r...@ro-che.info wrote: An interesting use case is my time-lens library. http://hackage.haskell.org/package/time-lens-0.3/docs/Data-Time-Lens.html You can do things like modL minutes (+5) (TimeOfDay 16 57 13) 17:02:13 But one has to be

[Haskell-cafe] indentation with let and do

2013-10-03 Thread Corentin Dupont
Hi the list, why do this function doesn't compile (parse error): test :: Bool - IO () test foo = do let bar = case foo of True - Foo; False - Bar return () while this one does (just adding one space in front of True and False): test :: Bool - IO () test foo = do let bar

Re: [Haskell-cafe] indentation with let and do

2013-10-03 Thread AlanKim Zimmerman
The first version has bar True and False all at the same indentation level. As such they are seen as standalone expressions, rather than being nested under the one introduced by bar. See http://en.wikibooks.org/wiki/Haskell/Indentation On Thu, Oct 3, 2013 at 8:31 PM, Corentin Dupont

Re: [Haskell-cafe] indentation with let and do

2013-10-03 Thread Brandon Allbery
On Thu, Oct 3, 2013 at 2:31 PM, Corentin Dupont corentin.dup...@gmail.comwrote: test :: Bool - IO () test foo = do let bar = case foo of True - Foo; False - Bar return () while this one does (just adding one space in front of True and False): test :: Bool - IO ()

Re: [Haskell-cafe] plugins fails on a simple example

2013-10-03 Thread Jeremy Shaw
this should be fixed in plugins 1.5.4.0 which is now on hackage. Thanks! - jeremy On Mon, Sep 16, 2013 at 2:49 AM, Petr Pudlák petr@gmail.com wrote: Hi, I'm playing with “plugins”, trying to evaluate a simple expression: import Control.Monad import System.Eval.Haskell main = do

Re: [Haskell-cafe] Newclasses

2013-10-03 Thread Wvv
Yes, multi-class instances allow us write type Monad a = (Applicative a, Bind a) But at least 1 issue remains: Applicative : pure; Monad: return Bind : (-); Monad: (=) With MultiClassInstances we could write only instance Monad MyMonad where { pure= ...; (-)= ...} But we

Re: [Haskell-cafe] indentation with let and do

2013-10-03 Thread Roman Cheplyaka
On Thu, Oct 3, 2013 at 9:44 PM, Brandon Allbery allber...@gmail.com wrote: On Thu, Oct 3, 2013 at 2:31 PM, Corentin Dupont corentin.dup...@gmail.com wrote: test :: Bool - IO () test foo = do let bar = case foo of True - Foo; False - Bar return () while this one

Re: [Haskell-cafe] indentation with let and do

2013-10-03 Thread Corentin Dupont
Thanks to all for your replies! I asked the question because I often make this kind of transformations (please don't mind the non-sensical example): test :: Bool - IO () test foo = do bar - case foo of True - return Foo False - return Bar return () into test :: Bool - IO ()

Re: [Haskell-cafe] indentation with let and do

2013-10-03 Thread David McBride
Imagine if bar was a toplevel function bar = case foo of True - Foo; False - Bar; Keep in mind that indentation level starts at the function name, not at the let keyword. On Thu, Oct 3, 2013 at 2:31 PM, Corentin Dupont corentin.dup...@gmail.comwrote: Hi the list, why do this function

Re: [Haskell-cafe] ANN: Nomyx 0.3 beta, the game where you can change the rules

2013-10-03 Thread Corentin Dupont
There is not so much people in the game right now (only 3) and a little more watching (20). Don't be shy and join! On Thu, Oct 3, 2013 at 1:14 AM, Corentin Dupont corentin.dup...@gmail.comwrote: Hello everybody! I released the third beta of Nomyx http://www.nomyx.net, the only game where You

Re: [Haskell-cafe] Using lenses

2013-10-03 Thread AntC
Lenses for nested ... types ... Hi Simon/Edward/all, The most compelling uses I've seen for lenses is back to Benjamin Pierce's [et al] papers on Updatable Views. I think this is where the 'theory' started(?), although similar ideas had kicked around the relational database world for some

Re: [Haskell-cafe] Newclasses

2013-10-03 Thread John Lato
I don't really understand what a newclass is supposed to be. On Thu, Oct 3, 2013 at 2:15 PM, Wvv vite...@rambler.ru wrote: newclass Bind a = Monad a = BMonad a where { (=) = (-) } I think this means that `BMonad` is supposed to be a new class that has both Bind and Monad in scope, the

Re: [Haskell-cafe] Newclasses

2013-10-03 Thread John Lato
Apologies, that wasn't finished. I meant to say, does it mean that by writing a BMonad instance a Monad instance would be automatically generated? If so, that seems like it would cause conflicts in many cases. Regardless, I think newclass needs to be better specified if you want other people to

[Haskell-cafe] Store type-class polymorphic values generically

2013-10-03 Thread Christopher Done
It's very easy to state this problem without enough details and mislead people into providing a solution for a different problem, so I'll try to include all the information and use-case. I need a function that can store a value in a concrete opaque type. I know the type of the value when I store

Re: [Haskell-cafe] Poll plea: State of GUI graphics libraries in Haskell

2013-10-02 Thread Paul Liu
Thanks. I've just built GHC HEAD on Mac OS X Lion, and tested by installing libraries with --enable-shared and loading a GLFW program into GHCi. Using ghci -fno-ghci-sandbox, everything works great including closing and restarting GL window multiple times. Can't wait for the official release of

Re: [Haskell-cafe] Poll plea: State of GUI graphics libraries in Haskell

2013-10-02 Thread Carter Schonwald
Yay! Thanks Paul! It's always good to have more folks confirm the problems are solved than not! Another cool direction 7.8 will allow is using the various llvm ffi bindings from ghci! On Wednesday, October 2, 2013, Paul Liu wrote: Thanks. I've just built GHC HEAD on Mac OS X Lion, and tested

Re: [Haskell-cafe] Haskell Logo Macbook Decal

2013-10-02 Thread Tikhon Jelvis
I've heard good things about teespring. I gather it's like a kickstarter but specifically for t-shirts. They seem to have some procedures[1] in place specifically for non-profit organizations, which might be a good option for supporting haskell.org. [1]: http://teespring.com/solutions

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-02 Thread Heinrich Apfelmus
Ryan Newton wrote: Here are some examples: - data Foo = Bar | Baz instance Eq Foo where _ == _ = True instance Ord Foo where compare Bar Bar = EQ compare Bar Baz = LT compare _ _ = error I'm partial!

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-02 Thread Tom Ellis
On Wed, Oct 02, 2013 at 11:24:39AM +0200, Heinrich Apfelmus wrote: I'm not sure whether the Eq instance you mention is actually incorrect. I had always understood that Eq denotes an equivalence relation, not necessarily equality on the constructor level. There's a difference between

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-02 Thread Roman Cheplyaka
* Heinrich Apfelmus apfel...@quantentunnel.de [2013-10-02 11:24:39+0200] In other words, equality of abstract data types is different from equality of algebraic data types (constructors). I don't think you'll ever be able to avoid this proof obligation that the public API of an abstract data

Re: [Haskell-cafe] Poll plea: State of GUI graphics libraries in Haskell

2013-10-02 Thread Atze Dijkstra
Hi, as for wxHaskell, it is currently maintained at https://github.com/wxHaskell/wxHaskell, compilable with wxWidgets 2.9.5 and GHC 7.6. Work is underway to fix various bugs introduced over time by changes in wxWidgets, but we (i.e. https://github.com/wxHaskell?tab=members) hope to release

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-02 Thread Tillmann Rendel
Hi, Roman Cheplyaka wrote: It still seems to fit nicely into Safe Haskell. If you are the implementor of an abstract type, you can do whatever you want in the Eq instance, declare your module as Trustworthy, and thus take the responsibility for soundness of that instance w.r.t. your public API.

Re: [Haskell-cafe] Roshask

2013-10-02 Thread Tijn van der Zant
Hi, I'm trying to get things up and running but I keep having problems with the following. When I follow the instructions on https://github.com/acowley/roshask/wiki/Getting-Started I run into the following: tijn@tt:~/MyPackage$ roshask dep Looking for [std_msgs], dependencies of

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-02 Thread Roman Cheplyaka
* Tillmann Rendel ren...@informatik.uni-marburg.de [2013-10-02 13:19:38+0200] Hi, Roman Cheplyaka wrote: It still seems to fit nicely into Safe Haskell. If you are the implementor of an abstract type, you can do whatever you want in the Eq instance, declare your module as Trustworthy, and

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-02 Thread Stijn van Drongelen
I do think something has to be done to have an Eq and Ord with more strict laws. * Operators in Eq and Ord diverge iff any of their parameters are bottom. * The default definitions of (/=), (), () and `compare` are law. * (==) is reflexive and transitive * (=) is antisymmetric ((x = y y = x)

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-02 Thread Niklas Haas
On Wed, 2 Oct 2013 15:46:42 +0200, Stijn van Drongelen rhym...@gmail.com wrote: I do think something has to be done to have an Eq and Ord with more strict laws. * Operators in Eq and Ord diverge iff any of their parameters are bottom. * The default definitions of (/=), (), () and `compare`

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-02 Thread Colin Adams
Only for meanings of better which do not imply as good performance. On 2 October 2013 14:46, Stijn van Drongelen rhym...@gmail.com wrote: I do think something has to be done to have an Eq and Ord with more strict laws. * Operators in Eq and Ord diverge iff any of their parameters are

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-02 Thread Stijn van Drongelen
On Wed, Oct 2, 2013 at 3:49 PM, Niklas Haas hask...@nand.wakku.to wrote: On Wed, 2 Oct 2013 15:46:42 +0200, Stijn van Drongelen rhym...@gmail.com wrote: I do think something has to be done to have an Eq and Ord with more strict laws. * Operators in Eq and Ord diverge iff any of their

Re: [Haskell-cafe] Poll plea: State of GUI graphics libraries in Haskell

2013-10-02 Thread Sylvain HENRY
Hi, The best low-level foundation libraries that I know of are the Enlightenment Foundation Libraries (EFL) [1,2]. They are cross-platform : they support many backends (X11, OpenGL, framebuffer...) and are used on desktops and mobile devices (even to provide games on the French Free ISP

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-02 Thread Tom Ellis
On Wed, Oct 02, 2013 at 03:46:42PM +0200, Stijn van Drongelen wrote: * Operators in Eq and Ord diverge iff any of their parameters are bottom. What's the benefit of this requirement, as opposed to, for example False = _ = True ... Tom ___

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-02 Thread Roman Cheplyaka
* Stijn van Drongelen rhym...@gmail.com [2013-10-02 15:46:42+0200] I do think something has to be done to have an Eq and Ord with more strict laws. * Operators in Eq and Ord diverge iff any of their parameters are bottom. This outlaws the Eq instances of lists, trees, and other (co)recursive

<    1   2   3   4   5   6   7   8   9   10   >