Re: [Haskell-cafe] type constructor section for (- Bool), _not_ ((-) Bool)

2013-09-03 Thread Brent Yorgey
On Tue, Sep 03, 2013 at 11:33:46AM +, AntC wrote: I'm probably being dumb, but Hoogle nor the wiki are helping me. I want an instance and type improvement constraint of the form instance (f ~ (- Bool)) = C Foo (f b) where ... The first arg to C is driving type improvement, for

Re: [Haskell-cafe] One-element tuple

2013-08-16 Thread Brent Yorgey
On Fri, Aug 16, 2013 at 01:35:22AM +, AntC wrote: There's an annoying inconsistency: (CustId 47, CustName Fred, Gender Male) -- threeple (CustId 47, CustName Fred)-- twople -- (CustId 47)-- oneple not! ()

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

2013-08-08 Thread Brent Yorgey
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

Re: [Haskell-cafe] Do combinatorial algorithms have a matroid strucutre XOR non-matroid structure?

2013-07-14 Thread Brent Yorgey
On Thu, Jul 11, 2013 at 03:39:02PM -0700, KC wrote: I ask this on this mailing list because there are quite a few mathematically oriented people here. If you accept the Law of Excluded Middle, everything either has a matroid structure, or not. On the other hand, if you do not accept it, then

Re: [Haskell-cafe] Music / MIDI help

2013-07-10 Thread Brent Yorgey
Maybe Euterpea? http://haskell.cs.yale.edu/euterpea/download/ On Wed, Jul 10, 2013 at 08:20:08AM -0700, Mark Lentczner wrote: I'm a little lost in the bewildering array of music packages for Haskell, and need some help. I'm looking to recreate one of my algorithmic music compositions from

Re: [Haskell-cafe] Open Source project suitable for 2-3 persons this fall?

2013-07-09 Thread Brent Yorgey
On Thu, Jul 04, 2013 at 05:26:59PM +0200, Anders Bech Mellson wrote: Is there any project that needs working this fall which could be used as a university project? I am in the university (M.Sc. in software development), so I am mainly looking for project ideas (preferably concrete ones).

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

2013-07-03 Thread Brent Yorgey
Hi all, Below is the call for demonstration proposals for FARM 2013. Please forward to anyone who might be interested -- apologies if you receive multiple copies! Brent Yorgey publicity chair for FARM 2013

Re: [Haskell-cafe] GADTs and pattern matching

2013-06-19 Thread Brent Yorgey
On Wed, Jun 19, 2013 at 11:11:16AM +0100, Francesco Mazzoli wrote: At Wed, 19 Jun 2013 10:03:27 + (UTC), AntC wrote: Hi Francesco, I think you'll find that the 'annoyance' is nothing to do with GADTs. I suggest you take the type signature off of foo1, and see what type ghc infers for

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

2013-06-19 Thread Brent Yorgey
This is great fun, more people should come and join us! =) http://www.nomyx.net:8000/Nomyx we are playing game demo3. -Brent On Fri, Jun 14, 2013 at 05:57:57PM +0200, Corentin Dupont wrote: Hello everybody! Here it comes, the second beta release [1] of Nomyx, the only game where You can

Re: [Haskell-cafe] GADTs and pattern matching

2013-06-19 Thread Brent Yorgey
. As soon as I do that, its equality constraint of (a ~ Maybe v) enters into scope of the case branches. Cheers, On Wed, Jun 19, 2013 at 7:59 AM, Brent Yorgey byor...@seas.upenn.edu wrote: On Wed, Jun 19, 2013 at 11:11:16AM +0100, Francesco Mazzoli wrote: At Wed, 19 Jun 2013 10:03:27 +

[Haskell-cafe] Second Call for Papers: Workshop on Functional Art, Music, Modeling, and Design (colocated with ICFP)

2013-05-22 Thread Brent Yorgey
. Submissions can be made via EasyChair at https://www.easychair.org/conferences/?conf=farm2013 Organizers -- Workshop Chair: Paul Hudak Program Chair: Conal Elliott Publicity Chair: Brent Yorgey Program Committee - Daniel Cukier (University of São Paulo) Conal Elliott

Re: [Haskell-cafe] Yi Google summer of code project

2013-04-23 Thread Brent Yorgey
Generally, for a successful proposal you need to already find someone who is willing to mentor the project. Honestly, I do not think working on Yi would make for a very strong proposal. It is definitely a cool piece of software, and definitely worth working on, but it does not have a very large

Re: [Haskell-cafe] Haskell compilation errors break the complexity encapsulation on DSLs

2013-04-23 Thread Brent Yorgey
On Tue, Apr 23, 2013 at 12:49:59PM +0200, Alberto G. Corona wrote: Hi I ever was worried about the barrier that the complexity of the Haskell errors impose to users of DSLs. Many DSLs look so simple that even someone without knowledge of Haskell can make use of them for some domains.

Re: [Haskell-cafe] Unbound: rebind and unrebind

2013-04-22 Thread Brent Yorgey
Hi Eric, On Sun, Apr 14, 2013 at 10:57:43AM -0700, Eric Dobson wrote: I am working at reimplementing the library Unbound to understand how it works. One issue I have come up with is that an equation that I thought held true doesn't. The equation is: Forall e::Rebind a b, e `aeq` (uncurry

[Haskell-cafe] Call for Papers: Workshop on Functional Art, Music, Modeling, and Design (colocated with ICFP)

2013-04-17 Thread Brent Yorgey
/conferences/?conf=farm2013 Organizers -- 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

Re: [Haskell-cafe] [Haskell] ANN: adobe-swatch-exchange-0.1.0.0

2013-04-04 Thread Brent Yorgey
(Redirecting follow-up to haskell-cafe) Very cool! I have been hoping someone will find a way to integrate kuler.adobe.com with diagrams, and this will help a lot. =) https://github.com/diagrams/diagrams-lib/issues/77 -Brent On Wed, Apr 03, 2013 at 06:49:34PM -0500, Jeremy Shaw wrote: I am

Re: [Haskell-cafe] cabal install pandoc

2013-03-31 Thread Brent Yorgey
On Fri, Mar 29, 2013 at 08:05:47AM -0230, Roger Mason wrote: Thank you for your response. 'ghc-pkg check' shows some problems: http://pastebin.ca/2344794 On 03/28/2013 08:01 PM, Patrick Wheeler wrote: So I printed off the requirements for pandoc on a empty ghc-7.6.2 install you can find

Re: [Haskell-cafe] Enumerating functions at runtime

2013-03-24 Thread Brent Yorgey
On Sat, Mar 23, 2013 at 08:26:52PM -0700, Luke Evans wrote: I'm curious about using Haskell for metaprogramming. It looks like I can dynamically compile, load and run some Haskell with the plugins package. Actually I've briefly tried this and it seems to work for some simple cases at

Re: [Haskell-cafe] Excercise on tagless final interpreters

2013-03-21 Thread Brent Yorgey
On Thu, Mar 21, 2013 at 11:32:21AM +0100, matteo vezzola wrote: I'm playing with tagless final interpreters reading [1], using a very simple language: class Ints repr where int :: Integer - repr Integer (.+.) :: repr Integer - repr Integer - repr Integer (.*.) :: repr

Re: [Haskell-cafe] A question about data declaration

2013-03-21 Thread Brent Yorgey
On Thu, Mar 21, 2013 at 06:18:46PM +0530, C K Kashyap wrote: Hi, I have a situation where I need to define a data type T such that data T = C1 Int | C2 Char | C3 T However, I want to enforce a constraint that C3 only allows (C2 Char) and not (C1 Int). That is If C3 should only be able

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

2013-03-11 Thread Brent Yorgey
On Mon, Mar 11, 2013 at 11:50:38AM -0700, Ben wrote: On Mar 11, 2013, at 11:26 AM, 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

Re: [Haskell-cafe] Trouble installing and using Chart/cairo on windows 7

2013-03-04 Thread Brent Yorgey
On Sun, Mar 03, 2013 at 05:38:02PM -0800, bri...@aracnet.com wrote: On Sun, 3 Mar 2013 19:58:37 -0500 Brent Yorgey byor...@seas.upenn.edu wrote: Good access to fonts and font metrics is the kicker. Otherwise I'd say to switch to using diagrams as a backend, hence getting a whole

Re: [Haskell-cafe] Trouble installing and using Chart/cairo on windows 7

2013-03-04 Thread Brent Yorgey
On Mon, Mar 04, 2013 at 02:30:55PM -0800, bri...@aracnet.com wrote: On Mon, 4 Mar 2013 17:27:29 -0500 Brent Yorgey byor...@seas.upenn.edu wrote: On Sun, Mar 03, 2013 at 05:38:02PM -0800, bri...@aracnet.com wrote: On Sun, 3 Mar 2013 19:58:37 -0500 Brent Yorgey byor...@seas.upenn.edu

Re: [Haskell-cafe] Trouble installing and using Chart/cairo on windows 7

2013-03-03 Thread Brent Yorgey
On Sun, Mar 03, 2013 at 09:22:15PM +0100, Arnaud Bailly wrote: Hello, I am trying to install timeplot and splot on a windows 7 host, using Haskell platform 2012.2.0.0, and I have troubles installing HSChart. First difficulties were installing cairo, which requires Gtk+ libraries and

Re: [Haskell-cafe] Trouble installing and using Chart/cairo on windows 7

2013-03-03 Thread Brent Yorgey
On Mon, Mar 04, 2013 at 11:26:23AM +1100, Tim Docker wrote: On 04/03/13 07:22, Arnaud Bailly wrote: Then I managed to install splot and timeplot. I then tried to use Chart to draw a simple chart, following

Re: [Haskell-cafe] Split and substitution using regex-pcre

2013-02-28 Thread Brent Yorgey
On Fri, Mar 01, 2013 at 08:30:20AM +1300, Alistair Bayley wrote: You cannot bend the split package to your needs? http://hackage.haskell.org/packages/archive/split/0.2.1.2/doc/html/Data-List-Split.html Some combination of splitWhen and a pcre-based predicate? This won't work; splitWhen

Re: [Haskell-cafe] cabal install ghc-mod installs 3 years old version

2013-02-25 Thread Brent Yorgey
On Sun, Feb 24, 2013 at 02:33:55PM +, Niklas Hambüchen wrote: You are right, my ghc-7.4.2 was broken in ghc-pkg list; I fixed the problem by killing my .cabal folder (as so often). Surely you mean by killing your .ghc folder? I do not see what effect killing your .cabal folder could

Re: [Haskell-cafe] Type checking the content of a string

2013-02-23 Thread Brent Yorgey
On Fri, Feb 22, 2013 at 06:44:06PM +0100, Corentin Dupont wrote: Hi all, I have a program able to read another program as a string, and interpret it (using Hint). I'd like to make unit tests, so I have a file Test.hs containing a serie of test programs as strings. However, how could I be

Re: [Haskell-cafe] Hackage suggestion: Gather the list of the licenses of all dependencies of a package

2012-12-15 Thread Brent Yorgey
On Sat, Dec 15, 2012 at 08:13:44AM +0100, Petr P wrote: This is strange, I thought that cpphs should be specified in build-tools:, not in build-depends:. http://www.haskell.org/cabal/users-guide/developing-packages.html#build-information Best regards, Petr Presumably the reason to list

[Haskell-cafe] ANN: diagrams-0.6

2012-12-11 Thread Brent Yorgey
] http://hackage.haskell.org/package/diagrams%2Dcontrib Happy diagramming! Brought to you by the diagrams team: - Michael Sloan - Ryan Yates - Brent Yorgey with contributions from: - Sam Griffin - Niklas Haas - Peter Hall - Claude Heiland-Allen - Deepak Jois - John Lato

Re: [Haskell-cafe] Maintainer of fixpoint

2012-12-06 Thread Brent Yorgey
On Wed, Dec 05, 2012 at 08:22:32PM +0100, Petr P wrote: Dear Haskellers, I've made some minor improvements of fixpoint package http://hackage.haskell.org/package/fixpoint. I tried to contact the original maintainer twice, but without success. The package hasn't been updated for 4 years.

Re: [Haskell-cafe] Design of a DSL in Haskell

2012-12-03 Thread Brent Yorgey
configuration to thread through your interpreter. xmonad is certainly a nontrivial example but perhaps it is a bit *too* nontrivial. If I think of any other good examples I'll let you know. -Brent On Dec 3, 2012, at 1:23 PM, Brent Yorgey wrote: On Sun, Dec 02, 2012 at 03:01:46PM +0100, Joerg

Re: [Haskell-cafe] Why Kleisli composition is not in the Monad signature?

2012-11-30 Thread Brent Yorgey
On Fri, Nov 30, 2012 at 02:33:54AM +0100, Ben Franksen wrote: Brent Yorgey wrote: On Thu, Nov 29, 2012 at 03:52:58AM +0100, Ben Franksen wrote: Tony Morris wrote: As a side note, I think a direct superclass of Functor for Monad is not a good idea, just sayin' class Functor f

Re: [Haskell-cafe] lambda case

2012-11-30 Thread Brent Yorgey
Oh, PLEASE people. Let's not have another round of bikeshedding about this AFTER the feature is already implemented! -Brent On Fri, Nov 30, 2012 at 01:25:27PM +0100, Herbert Valerio Riedel wrote: Jon Fairbairn jon.fairba...@cl.cam.ac.uk writes: [...] “\case” complicates lambda, using

Re: [Haskell-cafe] Why Kleisli composition is not in the Monad signature?

2012-11-29 Thread Brent Yorgey
On Thu, Nov 29, 2012 at 03:52:58AM +0100, Ben Franksen wrote: Tony Morris wrote: As a side note, I think a direct superclass of Functor for Monad is not a good idea, just sayin' class Functor f where fmap :: (a - b) - f a - f b class Functor f = Apply f where (*) :: f (a -

Re: [Haskell-cafe] delete http://www.haskell.org/haskellwiki/Haskell_IDE

2012-11-28 Thread Brent Yorgey
On Wed, Nov 28, 2012 at 07:08:16PM +0200, Roman Beslik wrote: Hi. There is more verbose page http://www.haskell.org/haskellwiki/IDEs . I registered on http://www.haskell.org/haskellwiki/ , but have not found the Delete Page command, wiki software help pages, or feedback channel, so I'm

Re: [Haskell-cafe] cabal configure cabal build cabal install

2012-11-25 Thread Brent Yorgey
On Sun, Nov 25, 2012 at 06:09:26PM -0500, Albert Y. C. Lai wrote: If you begin with cabal configure, the correct idiom is: cabal configure [flags] cabal build [cabal haddock, if you want] cabal copy cabal register Even this does not do the same thing as 'cabal install', because it does

Re: [Haskell-cafe] Taking over ghc-core

2012-11-16 Thread Brent Yorgey
On Fri, Nov 16, 2012 at 03:25:35PM -0500, Jay Sulzberger wrote: On Fri, 16 Nov 2012, Carter Schonwald carter.schonw...@gmail.com wrote: how would ghc-core enable targetting core for Agda? On Wed, Nov 14, 2012 at 6:32 PM, Andreas Abel andreas.a...@ifi.lmu.dewrote: Excellent! With

Re: [Haskell-cafe] local type denotation

2012-11-14 Thread Brent Yorgey
Turn on the ScopedTypeVariables extension (e.g. by putting {-# LANGUAGE ScopedTypeVariables #-} at the top of your file), and add an explicit 'forall a.' to the type signature of f. -Brent On Wed, Nov 14, 2012 at 04:03:57PM +0400, Serge D. Mechveliani wrote: Please, how to correctly set an

Re: [Haskell-cafe] Teaching Haskell @ MOOCs like Coursera or Udacity

2012-10-23 Thread Brent Yorgey
On Thu, Oct 18, 2012 at 11:49:08PM +0530, niket wrote: I am a novice in Haskell but I would love to see the gurus out here teaching Haskell on MOOCs like Coursera or Udacity. Dr Martin Odersky is doing it for Scala here: https://www.coursera.org/course/progfun I would love to see Haskell

Re: [Haskell-cafe] Explicitly passing an argument to an arrow

2012-10-03 Thread Brent Yorgey
On Wed, Oct 03, 2012 at 10:41:25AM +0200, Alfredo Di Napoli wrote: Hello everyone, sorry for the dumb question but I'm wrapping my head around arrow just from this morning. Consider this toy function to swap argument of a tuple: swapA' :: (Arrow a) = a ((b,c), (b,c)) (c,b) swapA' =

[Haskell-cafe] ANN: New wiki page and mailing list for combinatorics and Haskell

2012-09-24 Thread Brent Yorgey
Quite a while ago there was a mailing list thread where the idea was brought up of creating a mailing list for those interested in combinatorics in the setting of Haskell. Well, I've finally gotten around to it. If you're interested in (probably extremely low-traffic) discussion and

Re: [Haskell-cafe] guards in applicative style

2012-09-12 Thread Brent Yorgey
Lorenzo is correct, but actually for the wrong reason. =) The *type* of guard is a historical accident, and the fact that it requires MonadPlus doesn't really tell us anything. Let's take a look at its implementation: guard :: (MonadPlus m) = Bool - m () guard True = return

Re: [Haskell-cafe] package categories

2012-09-08 Thread Brent Yorgey
On Sat, Sep 08, 2012 at 11:04:34AM +0400, Sergey Mironov wrote: Hello list. Do we have a guideline for selecting correct category for a package being developed? I'd like to choose between Web.MyLib and Network.MyLib. Or probably just MyLib if I feel ambitious? Sergey. MyLib is discouraged.

Re: [Haskell-cafe] ANNOUNCE: grid-1.1

2012-09-06 Thread Brent Yorgey
On Thu, Sep 06, 2012 at 09:42:19AM +, Amy de Buitléir wrote: I'm happy to announce a new package called grid: http://hackage.haskell.org/package/grid https://github.com/mhwombat/grid/wiki (wiki) Looks neat! By the way, the URLs within the Haddock documentation are formatted

Re: [Haskell-cafe] Cabal install fails due to recent HUnit

2012-08-27 Thread Brent Yorgey
On Mon, Aug 27, 2012 at 10:52:59AM -0700, Bryan O'Sullivan wrote: On Mon, Aug 27, 2012 at 9:57 AM, Erik Hesselink hessel...@gmail.com wrote: I'm seeing this again, on abstract-deque-0.1.6. Ross, can you fix it again? Hang on a second. The reason you're seeing build breakage is that

Re: [Haskell-cafe] explicit annotations on kind polymorphism for data types

2012-08-24 Thread Brent Yorgey
Correct. I just meant that you can use a lowercase x or a lowercase chi (χ). Any lowercase characters (as defined by Unicode) can be used as identifiers. -Brent On Thu, Aug 23, 2012 at 11:09:41AM -0400, dude wrote: Not in 7.4.2, correct? -- dude On 08/22/2012 09:58 AM, Brent Yorgey

Re: [Haskell-cafe] model theory for type classes

2012-08-23 Thread Brent Yorgey
On Thu, Aug 23, 2012 at 01:25:39PM +0100, Patrick Browne wrote: If there is no model expansion could it be because of the constructor discipline, which only allows variables, and constructors in the LHS argument patterns. Indeed, a variable name as a pattern on the LHS of a function

Re: [Haskell-cafe] explicit annotations on kind polymorphism for data types

2012-08-22 Thread Brent Yorgey
I believe in the paper it is actually a lowercase Greek chi (χ), which should work too. ;) -Brent On Wed, Aug 22, 2012 at 08:15:48AM +0200, José Pedro Magalhães wrote: Nope, but it should work on 7.6 (also on the release candidate). The 'X' should be lowercase, though, like type variables.

Re: [Haskell-cafe] Platform Versioning Policy: upper bounds are not our friends

2012-08-20 Thread Brent Yorgey
On Thu, Aug 16, 2012 at 06:07:06PM -0400, Joey Adams wrote: On Wed, Aug 15, 2012 at 3:38 PM, Bryan O'Sullivan b...@serpentine.com wrote: I propose that the sense of the recommendation around upper bounds in the PVP be reversed: upper bounds should be specified only when there is a known

Re: [Haskell-cafe] Platform Versioning Policy: upper bounds are not our friends

2012-08-16 Thread Brent Yorgey
On Thu, Aug 16, 2012 at 05:30:07PM +0300, Yitzchak Gale wrote: For actively maintained packages, I think the problem is that package maintainers don't find out promptly that an upper bound needs to be bumped. One way to solve that would be a simple bot that notifies the package maintainer

Re: [Haskell-cafe] hGetContents Illegal byte sequence / ghc-pkg

2012-08-11 Thread Brent Yorgey
On Sat, Aug 11, 2012 at 12:13:45PM +0100, Benjamin Edwards wrote: Hello café, I have a program that is crashing, and I have no idea why: module Main where import System.Process (readProcessWithExitCode) main :: IO () main = do _ - readProcessWithExitCode ghc-pkg [describe,

Re: [Haskell-cafe] [Haskell] ALife category

2012-08-02 Thread Brent Yorgey
On Thu, Aug 02, 2012 at 01:50:50PM +, Amy de Buitléir wrote: I'm developing a framework for artificial life experiments that I would like to make available on Hackage eventually. I've read all the guidance and proposals I could find for where to place packages in the hierarchy:

Re: [Haskell-cafe] how to select random elements of a Data.Set?

2012-07-20 Thread Brent Yorgey
On Fri, Jul 20, 2012 at 01:24:57PM +, jwaldmann wrote: Dear all, how would I quickly select an element of a Set (as in Data.Set) uniformly at random? Via the API, this can only be done in linear time? (via toList) If I could access the tree structure, then of course it could be

Re: [Haskell-cafe] How to add constraint to .cabal?

2012-07-19 Thread Brent Yorgey
On Thu, Jul 19, 2012 at 09:37:52AM +0800, Magicloud Magiclouds wrote: Hi, Say I have a package that only appends --constraint=template-haskell==2.7.0.0 --constraint=warp-tls==1.2.1 could I install it. Now I want to release the package, then how could I have these constraint into the .cabal

Re: [Haskell-cafe] Adding to the haskell wiki

2012-07-16 Thread Brent Yorgey
On Mon, Jul 16, 2012 at 02:00:46PM +0200, Nathan Hüsken wrote: Hey, I have been a passive member of the haskell community for quite some time now. I have benefit from the community a lot through the mailing list, the haskell webpage and other channels. Thanks for all that! Now I am trying

Re: [Haskell-cafe] Best way to build a GHC backend?

2012-07-09 Thread Brent Yorgey
On Sun, Jul 08, 2012 at 09:21:08AM -0600, Jonathan Geddes wrote: I agree that the Raison d'être for a .NET or JVM backend is interop. Perhaps that's not worth the effort of an entirely new backend. JavaScript is a different beast, however. I said before: From my point of view, languages

Re: [Haskell-cafe] combining predicates, noob question

2012-07-09 Thread Brent Yorgey
On Sat, Jul 07, 2012 at 09:42:01PM -0300, Sebastián Krynski wrote: Ok , thanks for the answers, I understand now what liftM2 does. In this case would it be silly to use combinerPred (and maybe a newType Predicate a = a - Bool) for the sake of readability or shoud I stick with a - Bool

Re: [Haskell-cafe] combining predicates, noob question

2012-07-06 Thread Brent Yorgey
On Fri, Jul 06, 2012 at 03:17:54PM -0300, Felipe Almeida Lessa wrote: On Fri, Jul 6, 2012 at 2:11 PM, Sebastián Krynski skryn...@gmail.com wrote: As I was using predicates (a - bool) , it appeared the need for combining them with a boolean operator (bool - bool - bool) in order to get a new

Re: [Haskell-cafe] class instances for kinds with finite ty constrs, does this make sense?

2012-06-08 Thread Brent Yorgey
On Thu, Jun 07, 2012 at 07:32:45PM +0100, ex falso wrote: we always have to put the class restriction (TupleLength l) there, even though all possible type constructors of [*] have a TupleLength instance defined! Yes, and this is a feature, for at least two reasons. First: to the extent that

Re: [Haskell-cafe] Restricted Monad question

2012-06-04 Thread Brent Yorgey
On Mon, Jun 04, 2012 at 11:35:20AM +0200, Ismael Figueroa Palet wrote: Hi, I was wondering about defining a restricted monad, and found out this blog post: http://blog.omega-prime.co.uk/?p=127 In GHC 7.4.1 still the recommended way is using the rmonad package, right? You can do it however

Re: [Haskell-cafe] Installation of the New Haskell Platform

2012-06-04 Thread Brent Yorgey
On Mon, Jun 04, 2012 at 11:04:36AM -0400, Victor Miller wrote: Before I install it (on on Mac OS X Lion) is there anything, manually, that I need to do in order to keep all of the cabal packages that I've installed, or are the reinstalled automatically? Neither. If you install a new version

Re: [Haskell-cafe] Formalisation for types of monads

2012-05-24 Thread Brent Yorgey
On Wed, May 23, 2012 at 09:24:06AM +0200, Ertugrul Söylemez wrote: Yves Parès yves.pa...@gmail.com wrote: Note about []: Don't even mention foldl. The folding combinator for lists is foldr, period. Yes, I do agree. I came to this when I realized foldr gave the church encoding

Re: [Haskell-cafe] cool tools

2012-05-21 Thread Brent Yorgey
On Thu, May 17, 2012 at 03:05:22PM +0100, Chris Dornan wrote: I have been playing around with the latest cabal-install (0.14.0) and it is working really nicely. Having unpacked a cabal bundle you can now type 'cabal install' inside the root and it will work everything out as if you had asked

Re: [Haskell-cafe] Learn you

2012-05-02 Thread Brent Yorgey
I am curious how the title was translated. Of course, the English title Learn You a Haskell for Great Good uses intentionally ungrammatical/unidiomatic English for humorous effect. Is the Japanese title also ungrammatical/unidiomatic Japanese? Or do Japanese speakers not find that humorous?

Re: [Haskell-cafe] Multi-site haddock documentation with proper links?

2012-04-25 Thread Brent Yorgey
It is possible. I have done it for http://projects.haskell.org/diagrams/doc/index.html But it is not fun, and it took me several days of work (spread over two weeks) to figure out the proper magic incantations to get everything to work properly. I really ought to write up a blog post with

Re: [Haskell-cafe] is the evaluation order deterministic when using applicative with IO

2012-03-16 Thread Brent Yorgey
On Fri, Mar 16, 2012 at 12:30:13PM +0100, Twan van Laarhoven wrote: If you want to avoid the side effects of boolTest2 when boolTest1 returns true, you will need to implement a monadic or, something like orM ma mb = do a - ma if a then return True else mb Note also

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

2012-03-16 Thread Brent Yorgey
Hi everyone, I am currently teaching a half-credit introductory Haskell class for undergraduates. This is the second time I've taught it. The last time, for their final project I gave them the option of contributing to an open-source project; a couple groups took me up on it and I think it

[Haskell-cafe] ANNOUNCE: diagrams 0.5

2012-03-09 Thread Brent Yorgey
: - Peter Hall - Ian Ross - Michael Sloan - Ryan Yates - Brent Yorgey with contributions from: - Sam Griffin - Claude Heiland-Allen - John Lato - Vilhelm Sjoberg - Luite Stegeman - Kanchalai Suveepattananont - Scott Walck

Re: [Haskell-cafe] The (!) operation

2012-03-08 Thread Brent Yorgey
On Thu, Mar 08, 2012 at 07:53:48PM +0100, Christopher Done wrote: On 8 March 2012 18:32, Anthony Cowley acow...@seas.upenn.edu wrote: Perhaps Data.Key meets your needs? http://hackage.haskell.org/packages/archive/keys/2.1.2/doc/html/Data-Key.html Ah, perhaps indeed. Thanks! On 8 March

Re: [Haskell-cafe] FreeSect -- generalised sections syntax extension

2012-03-04 Thread Brent Yorgey
On Sat, Mar 03, 2012 at 10:37:10PM -0500, Ras Far wrote: letters correspond to grammar, words, or meaning. So we've got love, too (Aramaic word “Abba” = love of God or so...) Not quite, it's a familiar/intimate form of father, cf English papa, dada or daddy. -Brent

Re: [Haskell-cafe] Does somebody know about these functions?

2012-02-28 Thread Brent Yorgey
On Tue, Feb 28, 2012 at 06:06:25PM +0100, Johan Holmquist wrote: inter :: (a - a - b) - [a] - [b] inter f [] = [] inter f l  = map (uncurry f) $ zip l (tail l) I've never seen this function defined anywhere, but it looks nice. withPair :: (a' - b' - c) - (a - a') - (b - b') - (a,b) - c

Re: [Haskell-cafe] Using multiplate to get free variables from a syntax tree

2012-02-24 Thread Brent Yorgey
On Thu, Feb 23, 2012 at 01:18:22PM -0800, Matt Brown wrote: Hi all, I'm reading the haskellwiki article on multiplate. Is it possible to modify the getVariablesPlate example to return the free variables? One idea I had is to store an environment in a reader monad, and use local to update

Re: [Haskell-cafe] how to print out intermediate results in a recursive function?

2012-02-04 Thread Brent Yorgey
On Sat, Feb 04, 2012 at 12:23:07PM -0600, Qi Qi wrote: Hello, I have a question;how can I print out the intermediate number lists in a mergesort recursive function like the following one. merge [] ys = ys merge xs [] = xs merge (x:xs) (y:ys) = if x = y then x :

Re: [Haskell-cafe] how to print out intermediate results in a recursive function?

2012-02-04 Thread Brent Yorgey
On Sun, Feb 05, 2012 at 01:17:31AM -0600, Qi Qi wrote: Brilliant! That's what I was looking for. Thanks for all the replies. Sometimes, I suspect that Haskell not only makes easier of the hard things for imperative programming languages but also makes harder of some easy things. This is

Re: [Haskell-cafe] ANN: combinatorics

2012-02-03 Thread Brent Yorgey
On Fri, Feb 03, 2012 at 01:06:16AM -0500, wren ng thornton wrote: On 2/2/12 6:46 PM, Carter Schonwald wrote: On Thu, Feb 2, 2012 at 4:06 PM, Ivan Lazar Miljenovic wrote: On 3 February 2012 07:11, Brent Yorgey wrote: On Wed, Feb 01, 2012 at 01:53:03AM -0500, wren ng thornton wrote: [2

Re: [Haskell-cafe] ANN: combinatorics

2012-02-02 Thread Brent Yorgey
On Wed, Feb 01, 2012 at 01:53:03AM -0500, wren ng thornton wrote: [2] HaskellForMaths, gamma, statistics, erf, math-functions, combinat,... To this list I'd like to add 'species' and also the specialized 'multiset-comb' packages. The former doesn't build under recent GHCs but I plan to fix

Re: [Haskell-cafe] Natural Transformations and fmap

2012-01-23 Thread Brent Yorgey
On Mon, Jan 23, 2012 at 09:06:52PM -0800, Ryan Ingram wrote: On Mon, Jan 23, 2012 at 8:05 PM, Daniel Fischer daniel.is.fisc...@googlemail.com wrote: On Tuesday 24 January 2012, 04:39:03, Ryan Ingram wrote: At the end of that paste, I prove the three Haskell monad laws from the functor

Re: [Haskell-cafe] Simple type-class experiment turns out not so simple...

2012-01-08 Thread Brent Yorgey
On Fri, Jan 06, 2012 at 10:51:58AM +, Steve Horne wrote: If I specify both extensions (-XMultiParamTypeClasses and -XFlexibleInstances) it seems to work, but needing two language extensions is a pretty strong hint that I'm doing it the wrong way. Not necessarily. These two extensions in

Re: [Haskell-cafe] Solved but strange error in type inference

2012-01-03 Thread Brent Yorgey
The other much simpler solution no one has mentioned yet is to just pull 'subsome' out as its own top-level declaration. Having such a big function nested locally within a 'let' is ugly anyway, and it makes it harder to test and debug than necessary. -Brent On Tue, Jan 03, 2012 at 05:44:01PM

Re: [Haskell-cafe] Reifying case expressions [was: Re: On stream processing, and a new release of timeplot coming]

2011-12-28 Thread Brent Yorgey
On Mon, Dec 26, 2011 at 12:32:13PM +0400, Eugene Kirpichov wrote: 2011/12/26 Gábor Lehel illiss...@gmail.com On Sun, Dec 25, 2011 at 9:19 PM, Eugene Kirpichov ekirpic...@gmail.com wrote: Hello Heinrich, Thanks, that's sure some food for thought! A few notes: * This is

[Haskell-cafe] Images in Haddock documentation: best practices?

2011-12-24 Thread Brent Yorgey
Hi all, Although it doesn't seem to be documented in the user manual (!), Haddock supports inline images, using a url syntax. I'd like to include some images in the documentation for a package I'm writing, but not sure of the best way. I can, of course, just make the images available under my

Re: [Haskell-cafe] [Alternative] some/many narrative

2011-12-15 Thread Brent Yorgey
On Thu, Dec 15, 2011 at 07:29:20PM +1300, Chris Wong wrote: Okay, so how about the following as a user narrative for some and many? ... I was in the middle of writing my own version of Applicative when I stumbled on this intense debate. Here's what I wrote for the documentation:

Re: [Haskell-cafe] Alternative versus Monoid

2011-12-15 Thread Brent Yorgey
On Thu, Dec 15, 2011 at 06:49:13PM +1000, Gregory Crosswhite wrote: So at the end of the day... what is the point of even making Maybe and [] instances of Alternative? The Alternative and Monoid instances for [] are equivalent. However, the Alternative and Monoid instances for Maybe are

Re: [Haskell-cafe] [Alternative] some/many narrative

2011-12-15 Thread Brent Yorgey
On Thu, Dec 15, 2011 at 09:34:14AM -0800, Bryan O'Sullivan wrote: On Wed, Dec 14, 2011 at 10:29 PM, Chris Wong chrisyco+haskell-c...@gmail.com wrote: -- [Warning]: This is only defined for actions that eventually fail -- after being performed repeatedly, such as parsing. For pure

Re: [Haskell-cafe] Alternative versus Monoid

2011-12-15 Thread Brent Yorgey
On Thu, Dec 15, 2011 at 09:05:13PM +, Conor McBride wrote: On 15 Dec 2011, at 15:19, Brent Yorgey wrote: On Thu, Dec 15, 2011 at 06:49:13PM +1000, Gregory Crosswhite wrote: So at the end of the day... what is the point of even making Maybe and [] instances of Alternative

Re: [Haskell-cafe] ANNOUNCE: hxournal-0.5.0.0 - A pen notetaking program written in haskell

2011-12-14 Thread Brent Yorgey
On Wed, Dec 14, 2011 at 04:53:38PM +0100, Ivan Perez wrote: I think not. The version in hackage is still hxournal-0.5.0.0. Unless, of course, you can update a package that's already been submitted without increasing the version number. Is that possible? (I actually don't know) Thankfully, it

Re: [Haskell-cafe] Chuan-Kai Lin's Unimo framework

2011-12-12 Thread Brent Yorgey
On Mon, Dec 12, 2011 at 03:17:38PM +0100, Jean-Luc Delatre wrote: Does anybody has an hands on experience of using Chuan-Kai Lin's Unimo framework? No, but if you want to define monads operationally I would instead recommend using the 'operational' package:

Re: [Haskell-cafe] [ANNOUNCEMENT] xmobar 0.14

2011-12-11 Thread Brent Yorgey
On Sun, Dec 11, 2011 at 05:09:44PM +0400, Sergey Mironov wrote: Hi. I am Awesome WM user thinking about swithcing to the xmonad. Could I take an opportunity and ask about mouse support in xmonad/xmobar ? Actually, I assume that xmobar does nothing with mouse, but what is a common way of

Re: [Haskell-cafe] More liberal than liberal type synonyms

2011-12-08 Thread Brent Yorgey
On Wed, Dec 07, 2011 at 04:47:47PM +0100, Gábor Lehel wrote: On Wed, Dec 7, 2011 at 1:07 PM, Dmitry Kulagin dmitry.kula...@gmail.com wrote: For short, type synonyms work for mere aliases, but not for full-fledged type-level non-inductive functions. And sometimes we intuitively want to

Re: [Haskell-cafe] (no subject)

2011-11-28 Thread Brent Yorgey
On Mon, Nov 28, 2011 at 04:20:54PM -0600, Antoine Latter wrote: On Mon, Nov 28, 2011 at 4:12 PM, Willem Obbens dub...@hotmail.com wrote: Hello, I get this error when I try to derive an instance of the Show typeclass: Abc.hs:21:60:     Couldn't match expected type `Vector' with actual type

Re: [Haskell-cafe] A Mascot

2011-11-17 Thread Brent Yorgey
On Thu, Nov 17, 2011 at 10:28:47AM +0100, Alexander Bernauer wrote: On Tue, Nov 15, 2011 at 08:18:04PM -0800, John Meacham wrote: People tend to concentrate on the lambda which cooresponds to the functional aspect of haskell when designing logos. Not nearly enough attention is paid to the

Re: [Haskell-cafe] capri cabal-dev virtualenv cab

2011-11-08 Thread Brent Yorgey
On Tue, Nov 08, 2011 at 10:04:20AM -0800, Rogan Creswick wrote: On Mon, Nov 7, 2011 at 11:40 PM, Rustom Mody rustompm...@gmail.com wrote: Does anyone give me a little comparison of these? virtualenv: I'm not familiar with virtualenv, but from skimming the site, it looks like it does

Re: [Haskell-cafe] Is it possible to get the information of instances of a type?

2011-10-26 Thread Brent Yorgey
On Wed, Oct 26, 2011 at 09:15:41AM -0700, Nathan Howell wrote: On Wed, Oct 26, 2011 at 6:53 AM, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: But in Haskell, could I write a code to list the classes that a type instanced? TemplateHaskell as well. It's possible with

Re: [Haskell-cafe] Is it possible to get the information of instances of a type?

2011-10-26 Thread Brent Yorgey
On Wed, Oct 26, 2011 at 09:10:23PM +0400, MigMit wrote: Can't be done. Even if this particular module doesn't contain instance Class Type, it's quite possible that the said instance would be defined in another module, about which this one knows nothing about. That doesn't mean it can't be

[Haskell-cafe] ANN: Monad.Reader Issue 19

2011-10-26 Thread Brent Yorgey
I am pleased to announce that Issue 19 of The Monad.Reader, a special issue on parallelism and concurrency, is now available: http://themonadreader.files.wordpress.com/2011/10/issue19.pdf Issue 19 consists of the following three articles: * Mighttpd – a High Performance Web Server in

Re: [Haskell-cafe] ANN: diagrams 0.4

2011-10-25 Thread Brent Yorgey
On Mon, Oct 24, 2011 at 11:55:53AM -0700, David Barbour wrote: Thanks. Diagrams package seems it could be promising for a declarative UI model - i.e. integration with functional reactive programming and similar models - so long as I'm willing to sacrifice `native` look and feel, which

Re: [Haskell-cafe] ANN: diagrams 0.4

2011-10-25 Thread Brent Yorgey
On Mon, Oct 24, 2011 at 01:58:33PM -0700, Jason Dagit wrote: On Sun, Oct 23, 2011 at 11:47 AM, Brent Yorgey byor...@seas.upenn.edu wrote: I am pleased to announce the release of version 0.4 of diagrams, a full-featured framework and embedded domain-specific language for declarative drawing

Re: [Haskell-cafe] ANN: diagrams 0.4

2011-10-24 Thread Brent Yorgey
On Mon, Oct 24, 2011 at 08:21:30AM +0530, Rustom Mody wrote: Thanks. This is attractive. I remember (vaguely) a 'live page' ie where one could enter (into the browser) changes to the diagrams code and see the results immediately. Is that page there? (Or am I mixing up with something else?)

Re: [Haskell-cafe] ANN: diagrams 0.4

2011-10-24 Thread Brent Yorgey
On Mon, Oct 24, 2011 at 03:46:26PM +1100, Ivan Lazar Miljenovic wrote: Hmmm... might be interesting to try and use dot/neato/etc. to do the layout of a graph, and then use diagrams for the actual visualisation... I agree! This has been on my list of things-to-do-with-diagrams-eventually for

  1   2   3   4   5   >