Re: [Haskell-cafe] Open-source projects for beginning Haskell students?

2013-03-12 Thread Carter Schonwald
+ 1000, there are so many widely used niche libs which would greatly benefit from more examples in their test suites, or which have tractable small improvement / enhancement tickets languishing. Plus most large systems engineering does involve helping improve preexisting some part of the time.

Re: [Haskell-cafe] Overloading

2013-03-12 Thread Miguel Mitrofanov
12.03.2013, 02:53, Richard A. O'Keefe o...@cs.otago.ac.nz: On 12/03/2013, at 10:00 AM, MigMit wrote:  On Mar 12, 2013, at 12:44 AM, Richard A. O'Keefe o...@cs.otago.ac.nz wrote:  Prelude :type (+)  (+) :: Num a = a - a - a  The predefined (+) in Haskell requires its arguments and its

Re: [Haskell-cafe] Open-source projects for beginning Haskell students?

2013-03-12 Thread Edward Z. Yang
I also support this suggestion. Although, do we have the build infrastructure for this?! Edward Excerpts from Michael Orlitzky's message of Mon Mar 11 19:52:12 -0700 2013: On 03/11/2013 11:48 AM, Brent Yorgey wrote: So I'd like to do it again this time around, and am looking for

Re: [Haskell-cafe] Open-source projects for beginning Haskell students?

2013-03-12 Thread John Lato
There's the doctest package: http://hackage.haskell.org/package/doctest, which looks pretty good and has a number of users (35 direct reverse deps). It has support for cabal test integration, although I would like to see better integration with other test tools. But that can be added in the test

[Haskell-cafe] ANNOUNCE xml-conduit-generic

2013-03-12 Thread Dmitry Olshansky
Hello, cafe! I made a package xml-conduit-generichttps://github.com/odr/xml-conduit-generic to provide conversion from ADT to xml and vice versa. Conversion works as Conduit (ToXml) or Consumer (FromXml). Example: data T4 = T4 {v4 :: Int, n4 :: Maybe T4} deriving (Eq, Show, Generic) instance

Re: [Haskell-cafe] Open-source projects for beginning Haskell students?

2013-03-12 Thread Kim-Ee Yeoh
Question is: does the task even have to involve the the production of Haskell code? Is it possible that both the student and the community-at-large would benefit further from expository-style artifacts? Some possible activities: (1) producing documentation for popular packages that cater to

Re: [Haskell-cafe] Open-source projects for beginning Haskell students?

2013-03-12 Thread Tim Docker
On 12/03/13 05:26, Jason Dagit wrote: Myself and several of my friends would find it useful to have a plotting library that we can use from ghci to quickly/easily visualize data. Especially if that data is part of a simulation we are toying with. Therefore, this proposal is for: A gnuplot-,

Re: [Haskell-cafe] Open-source projects for beginning Haskell students?

2013-03-12 Thread Ivan Lazar Miljenovic
On 12 March 2013 22:46, Tim Docker t...@dockerz.net wrote: On 12/03/13 05:26, Jason Dagit wrote: Myself and several of my friends would find it useful to have a plotting library that we can use from ghci to quickly/easily visualize data. Especially if that data is part of a simulation we are

[Haskell-cafe] newtype a Constraint?

2013-03-12 Thread Roman Cheplyaka
Is there a way to newtype a constraint? Imagine a type class parameterised over constraints. What do I do if I want multiple instances for (essentially) the same constraint? Roman ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] newtype a Constraint?

2013-03-12 Thread Gábor Lehel
{-# LANGUAGE UndecidableInstances #-} class OldConstraint a = NewtypedConstraint a instance OldConstraint a = NewtypedConstraint a perhaps? Nice thing is you don't even need to do wrapping/unwrapping, like you do with data newtypes. On Tue, Mar 12, 2013 at 2:18 PM, Roman Cheplyaka

Re: [Haskell-cafe] newtype a Constraint?

2013-03-12 Thread Roman Cheplyaka
Neat, thanks! Roman * Gábor Lehel illiss...@gmail.com [2013-03-12 14:26:38+0100] {-# LANGUAGE UndecidableInstances #-} class OldConstraint a = NewtypedConstraint a instance OldConstraint a = NewtypedConstraint a perhaps? Nice thing is you don't even need to do wrapping/unwrapping,

Re: [Haskell-cafe] Overloading

2013-03-12 Thread Carlos Camarao
On 12/03/2013, at 3:15 AM, Carlos Camarao wrote: Hi, I just started playing around a bit with Haskell, so sorry in advance for very basic (and maybe stupid) questions. Coming from the C++ world one thing I would like to do is overloading operators. For example I want to

Re: [Haskell-cafe] Open-source projects for beginning Haskell students?

2013-03-12 Thread Vo Minh Thu
2013/3/11 Brent Yorgey byor...@seas.upenn.edu: Hi everyone, I am currently teaching a half-credit introductory Haskell class for undergraduates. This is the third time I've taught it. Both of the previous times, for their final project I gave them the option of contributing to an

Re: [Haskell-cafe] Overloading

2013-03-12 Thread Brandon Allbery
On Tue, Mar 12, 2013 at 1:52 PM, Carlos Camarao carlos.cama...@gmail.comwrote: Sorry, I think my sentence: To define (+) as an overloaded operator in Haskell, you have to define and use a type class. is not quite correct. I meant that to define any operator in Haskell you have to

Re: [Haskell-cafe] Overloading

2013-03-12 Thread Carlos Camarao
On Tue, Mar 12, 2013 at 3:21 PM, Brandon Allbery allber...@gmail.comwrote: On Tue, Mar 12, 2013 at 1:52 PM, Carlos Camarao carlos.cama...@gmail.comwrote: Sorry, I think my sentence: To define (+) as an overloaded operator in Haskell, you have to define and use a type class. is

[Haskell-cafe] cabal install oddities

2013-03-12 Thread Tycho Andersen
Hi all, I'm having some strange issues with cabal install. Some packages installed via `cabal install $foo` are failing for strange (and seemingly unrelated) reasons, but install just fine when I do something like: cabal unpack network cd network cabal configure cabal install Below is

Re: [Haskell-cafe] Open-source projects for beginning Haskell students?

2013-03-12 Thread Kristopher Micinski
The problem with all of these suggestions is that they start from no code. I believe Brent is looking for an *existing* project which needs contributions. I assume so that beginning Haskellers can learn real code style in the middle to large, and get input from existing community members. Kris

Re: [Haskell-cafe] cabal install oddities

2013-03-12 Thread Brandon Allbery
On Tue, Mar 12, 2013 at 3:21 PM, Tycho Andersen ty...@tycho.ws wrote: Below is some sample output from a failing package: ps168825:~/playground$ cabal install network Resolving dependencies... Configuring network-2.4.1.2... configure: WARNING: unrecognized options: --with-compiler,

Re: [Haskell-cafe] cabal install oddities

2013-03-12 Thread Tycho Andersen
On Tue, Mar 12, 2013 at 03:28:08PM -0400, Brandon Allbery wrote: cabal install unpacks a package into /tmp in order to build it. My guess is your OS has /tmp mounted noexec. I don't know offhand how you override this in cabal. Yep, you're exactly right. Thank you! I also couldn't figure out a

[Haskell-cafe] monadic DSL for compile-time parser generator, not possible?

2013-03-12 Thread Jeremy Shaw
It would be pretty damn cool if you could create a data type for generically describing a monadic parser, and then use template haskell to generate a concrete parser from that data type. That would allow you to create your specification in a generic way and then target different parsers like

Re: [Haskell-cafe] monadic DSL for compile-time parser generator, not possible?

2013-03-12 Thread Jacques Carette
On 13-03-12 04:06 PM, Jeremy Shaw wrote: It would be pretty damn cool if you could create a data type for generically describing a monadic parser, and then use template haskell to generate a concrete parser from that data type. [...] I would like to suggest that while it would be cool, it is

Re: [Haskell-cafe] monadic DSL for compile-time parser generator, not possible?

2013-03-12 Thread dag.odenh...@gmail.com
Why not the parsers package [1]? Write the parser against the Parsing class and then use trifecta or write instances for attoparsec or parsec. With enough inlining perhaps the overhead of the class gets optimized away? [1] http://hackage.haskell.org/package/parsers On Tue, Mar 12, 2013 at 9:06

Re: [Haskell-cafe] monadic DSL for compile-time parser generator, not possible?

2013-03-12 Thread Jeremy Shaw
On Tue, Mar 12, 2013 at 3:32 PM, Jacques Carette care...@mcmaster.ca wrote: On 13-03-12 04:06 PM, Jeremy Shaw wrote: data ParserSpec a where AnyChar :: ParserSpec Char Return :: a - ParserSpec a Join:: ParserSpec (ParserSpec a) - ParserSpec a FMap:: (a - b) -

Re: [Haskell-cafe] monadic DSL for compile-time parser generator, not possible?

2013-03-12 Thread Jeremy Shaw
Mostly, because I want to do other sorts of compile-time inspections on the parser. Being able to generate the parser is just the easiest part to get started with. - jeremy On Tue, Mar 12, 2013 at 3:36 PM, dag.odenh...@gmail.com dag.odenh...@gmail.com wrote: Why not the parsers package [1]?

Re: [Haskell-cafe] Overloading

2013-03-12 Thread Richard A. O'Keefe
Carlos Camarao wrote: Sorry, I think my sentence: To define (+) as an overloaded operator in Haskell, you have to define and use a type class. is not quite correct. I meant that to define any operator in Haskell you have to have a type class defined with that operator as member.

Re: [Haskell-cafe] newtype a Constraint?

2013-03-12 Thread Max Bolingbroke
On 12 March 2013 13:18, Roman Cheplyaka r...@ro-che.info wrote: Is there a way to newtype a constraint? Imagine a type class parameterised over constraints. What do I do if I want multiple instances for (essentially) the same constraint? It would make sense to add support for this to newtype

Re: [Haskell-cafe] Open-source projects for beginning Haskell students?

2013-03-12 Thread Simon Michael
Hi Brent, hledger is an existing project whose purpose, code and installation process is relatively simple. I'm happy to do a bit of mentoring. If this sounds suitable, I can suggest some easy fixes or enhancements, eg: ...hmm. In fact nothing on my long wishlist[1][2] looks all that quick.

Re: [Haskell-cafe] Open-source projects for beginning Haskell students?

2013-03-12 Thread Simon Michael
[4] http://hub.darcs.net/simon/rss2irc/browse/NOTES.org On 3/12/13 2:13 PM, Simon Michael wrote: Hi Brent, hledger is an existing project whose purpose, code and installation process is relatively simple. I'm happy to do a bit of mentoring. If this sounds suitable, I can suggest some easy

Re: [Haskell-cafe] Overloading

2013-03-12 Thread MigMit
On Mar 13, 2013, at 12:54 AM, Richard A. O'Keefe o...@cs.otago.ac.nz wrote: The interesting challenge here is that we should have Date + Period - Date Date - Period - Date Period + Date - Date Period - Date - ILLEGAL Period + Period - DeriodPeriod - Period -

Re: [Haskell-cafe] Overloading

2013-03-12 Thread David Thomas
If you add NoImplicitPrelude, I think you should also be able to do: import Prelude hiding (Num) import qualified Prelude (Num) instance Num a = Plus a a where type PlusResult a a = a a + b = a Prelude.+ b On Tue, Mar 12, 2013 at 2:24 PM, MigMit miguelim...@yandex.ru wrote: On Mar

Re: [Haskell-cafe] Overloading

2013-03-12 Thread Donn Cave
On Mar 13, 2013, at 12:54 AM, Richard A. O'Keefe o...@cs.otago.ac.nz wrote: The interesting challenge here is that we should have Date + Period - Date Date - Period - Date Period + Date - Date Period - Date - ILLEGAL Period + Period - DeriodPeriod - Period -

Re: [Haskell-cafe] Overloading

2013-03-12 Thread Carlos Camarao
On Tue, Mar 12, 2013 at 5:54 PM, Richard A. O'Keefe o...@cs.otago.ac.nz wrote: Carlos Camarao wrote: Sorry, I think my sentence: To define (+) as an overloaded operator in Haskell, you have to define and use a type class. is not quite correct. I meant that

Re: [Haskell-cafe] Open-source projects for beginning Haskell students?

2013-03-12 Thread Alp Mestanogullari
Hi, My suggestion may sound a bit odd, but if they're looking for a challenging but still simple enough project, I'd love for people to test out the new version of hnn (not yet released, but on github [1]) and make something fun with it. I'd love to mentor this and add things to the library

Re: [Haskell-cafe] Open-source projects for beginning Haskell students?

2013-03-12 Thread Alp Mestanogullari
[1]: http://github.com/alpmestan/hnn On Wed, Mar 13, 2013 at 1:03 AM, Alp Mestanogullari alpmes...@gmail.comwrote: Hi, My suggestion may sound a bit odd, but if they're looking for a challenging but still simple enough project, I'd love for people to test out the new version of hnn (not

[Haskell-cafe] ANN: retry 0.1 - retry combinators for monadic actions that often fail

2013-03-12 Thread Ozgun Ataman
Dear Cafe, I'm happy to announce the availability of the retry package on Hackage[1] and Github[2]. The package provides a few useful combinators for monadic actions that often fail and should be retried in cases of a certain set of exceptions (or failure modes). Such cases are quite common

[Haskell-cafe] Lazy object deserialization

2013-03-12 Thread Scott Lawrence
Hey all, All the object serialization/deserialization libraries I could find (pretty much just binary and cereal) seem to be strict with respect to the actual data being serialized. In particular, if I've serialized a large [Int] to a file, and I want to get the first element, it seems I have

[Haskell-cafe] BayHac '13

2013-03-12 Thread Mark Lentczner
Please join us for a weekend of Haskell hacking: *BayHac '13* *May 17th ~ 19th, 2013* *Hacker Dojo* *Mountain View, CA* Full details on the Haskell Wiki: BayHac '13http://www.haskell.org/haskellwiki/BayHac2013 - Mark ___ Haskell-Cafe mailing list