From sean.seefried at gmail.com Mon Jun 1 03:49:45 2015 From: sean.seefried at gmail.com (Sean Seefried) Date: Mon, 1 Jun 2015 13:49:45 +1000 Subject: [Haskell-cafe] A Dockerfile to provision a build environment for an Android game written in Haskell Message-ID: Fellow Haskell users! For the last few months I've been working on a small game targeting Android devices. It's still in development and will probably change radically from what I've already done. However, in the process of developing this game I've managed to develop a Dockerfile that will provision a build environment to build the game, which I think is worth releasing to the Haskell community right away. I'd appreciate some assistance in validating that it, in fact, works. The repo containing the Dockerfile is hosted at: https://github.com/sseefried/docker-epidemic-build-env The repo containing the game is: https://github.com/sseefried/open-epidemic-game Please use the latest version of Docker when you attempt to build this, at least version 1.6. Be aware that this will take a long time to build. You will need to download an image from THe Docker Hub Registry that is about 1.1G and then pull down even more files when building all the C and Haskell libraries. Be patient and if you have any issues please let me know via GitHub. Oh, and if you want to see a demo of what you are building click here: https://goo.gl/FZFPsm (It's a very simple game at present. Don't expect too much.) Enjoy! Sean -------------- next part -------------- An HTML attachment was scrubbed... URL: From masahiro.sakai at gmail.com Mon Jun 1 11:05:04 2015 From: masahiro.sakai at gmail.com (Masahiro Sakai) Date: Mon, 1 Jun 2015 20:05:04 +0900 Subject: [Haskell-cafe] ANN: toysolver 0.3.0 released Message-ID: Dear all, I'm announcing the release of the toysolver package. http://hackage.haskell.org/package/toysolver https://github.com/msakai/toysolver It provides solver implementations of various problems including SAT, Max-SAT, PBS (Pseudo Boolean Satisfaction), PBO (Pseudo Boolean Optimization), MILP (Mixed Integer Linear Programming) and non-linear real arithmetic. In particular it contains moderately-fast pure-Haskell SAT solver 'toysat'. It can also be used as a backend for ersatz and satchmo. http://hackage.haskell.org/package/ersatz-toysat http://hackage.haskell.org/package/satchmo-toysat Regards, -- Masahiro Sakai From kc1956 at gmail.com Mon Jun 1 20:17:07 2015 From: kc1956 at gmail.com (KC) Date: Mon, 1 Jun 2015 13:17:07 -0700 Subject: [Haskell-cafe] I think someone had a complicated program to use brackets for array indexing - is it possible to use a DSL for this? Message-ID: I think someone had a complicated program to use brackets for array indexing - is it possible to use a DSL for this? That is, to use myArray [5] and have a DSL convert it to standard Haskell syntax -- -- Sent from an expensive device which will be obsolete in a few months! :D Casey -------------- next part -------------- An HTML attachment was scrubbed... URL: From tikhon at jelv.is Mon Jun 1 20:21:29 2015 From: tikhon at jelv.is (Tikhon Jelvis) Date: Mon, 1 Jun 2015 13:21:29 -0700 Subject: [Haskell-cafe] I think someone had a complicated program to use brackets for array indexing - is it possible to use a DSL for this? In-Reply-To: References: Message-ID: You could make myArray a function that takes a list as an input. Of course, all your other array functions have to account for this too. A potential advantage is that this approach leaves the underlying array type abstract, so you could mix and match different data structure on the backend. (IntMap, Array, Vector? etc.) A disadvantage is that this is non-standard usage which could be confusing to people and there's no way I know of to statically ensure the list passed in always had one element. That is, myArray [1, 2] would be legal and result in a runtime error. I don't know of a way to do it while using a normal array type directly. On Mon, Jun 1, 2015 at 1:17 PM, KC wrote: > I think someone had a complicated program to use brackets for array > indexing - is it possible to use a DSL for this? > > That is, to use myArray [5] and have a DSL convert it to standard Haskell > syntax > > -- > -- > > Sent from an expensive device which will be obsolete in a few months! :D > > Casey > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kc1956 at gmail.com Mon Jun 1 20:29:27 2015 From: kc1956 at gmail.com (KC) Date: Mon, 1 Jun 2015 13:29:27 -0700 Subject: [Haskell-cafe] I think someone had a complicated program to use brackets for array indexing - is it possible to use a DSL for this? In-Reply-To: References: Message-ID: Then a tuple might work better as input to a function to index into an array e.g. myArray (5) -- -- Sent from an expensive device which will be obsolete in a few months! :D Casey On Jun 1, 2015 1:21 PM, "Tikhon Jelvis" wrote: > You could make myArray a function that takes a list as an input. Of > course, all your other array functions have to account for this too. A > potential advantage is that this approach leaves the underlying array type > abstract, so you could mix and match different data structure on the > backend. (IntMap, Array, Vector? etc.) > > A disadvantage is that this is non-standard usage which could be confusing > to people and there's no way I know of to statically ensure the list passed > in always had one element. That is, myArray [1, 2] would be legal and > result in a runtime error. > > I don't know of a way to do it while using a normal array type directly. > > On Mon, Jun 1, 2015 at 1:17 PM, KC wrote: > >> I think someone had a complicated program to use brackets for array >> indexing - is it possible to use a DSL for this? >> >> That is, to use myArray [5] and have a DSL convert it to standard Haskell >> syntax >> >> -- >> -- >> >> Sent from an expensive device which will be obsolete in a few months! :D >> >> Casey >> >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tikhon at jelv.is Mon Jun 1 20:32:25 2015 From: tikhon at jelv.is (Tikhon Jelvis) Date: Mon, 1 Jun 2015 13:32:25 -0700 Subject: [Haskell-cafe] I think someone had a complicated program to use brackets for array indexing - is it possible to use a DSL for this? In-Reply-To: References: Message-ID: Yep. Well, tuples of one element aren't great, but a function Int -> a is a reasonable interface for an array type. But you won't get the nice bracket syntax you want. More generally, though, the problem is that this type is more general, so you can't make any assumptions about it. A function Int -> a can do whatever, not just look things up in an array. Depending on what you need, this could be fine, but how would you write a function for length? Thinking about it a bit more, it's really not the best approach for most cases, but it's the only way I can think of for making bracket syntax (or something like it) work. On Mon, Jun 1, 2015 at 1:29 PM, KC wrote: > Then a tuple might work better as input to a function to index into an > array > > e.g. myArray (5) > > -- > -- > > Sent from an expensive device which will be obsolete in a few months! :D > > Casey > > On Jun 1, 2015 1:21 PM, "Tikhon Jelvis" wrote: > >> You could make myArray a function that takes a list as an input. Of >> course, all your other array functions have to account for this too. A >> potential advantage is that this approach leaves the underlying array type >> abstract, so you could mix and match different data structure on the >> backend. (IntMap, Array, Vector? etc.) >> >> A disadvantage is that this is non-standard usage which could be >> confusing to people and there's no way I know of to statically ensure the >> list passed in always had one element. That is, myArray [1, 2] would be >> legal and result in a runtime error. >> >> I don't know of a way to do it while using a normal array type directly. >> >> On Mon, Jun 1, 2015 at 1:17 PM, KC wrote: >> >>> I think someone had a complicated program to use brackets for array >>> indexing - is it possible to use a DSL for this? >>> >>> That is, to use myArray [5] and have a DSL convert it to standard >>> Haskell syntax >>> >>> -- >>> -- >>> >>> Sent from an expensive device which will be obsolete in a few months! :D >>> >>> Casey >>> >>> >>> _______________________________________________ >>> Haskell-Cafe mailing list >>> Haskell-Cafe at haskell.org >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From allbery.b at gmail.com Mon Jun 1 20:35:40 2015 From: allbery.b at gmail.com (Brandon Allbery) Date: Mon, 1 Jun 2015 16:35:40 -0400 Subject: [Haskell-cafe] I think someone had a complicated program to use brackets for array indexing - is it possible to use a DSL for this? In-Reply-To: References: Message-ID: On Mon, Jun 1, 2015 at 4:29 PM, KC wrote: > Then a tuple might work better as input to a function to index into an > array > > e.g. myArray (5) > Aside from 1-tuples not being a thing? (That's the same as (myArray 5).) -- brandon s allbery kf8nh sine nomine associates allbery.b at gmail.com ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From kc1956 at gmail.com Mon Jun 1 20:56:45 2015 From: kc1956 at gmail.com (KC) Date: Mon, 1 Jun 2015 13:56:45 -0700 Subject: [Haskell-cafe] I think someone had a complicated program to use brackets for array indexing - is it possible to use a DSL for this? In-Reply-To: References: Message-ID: I'm a part time tutor even though I don't look Elizabethan I was trying to lower the learning curve for students Maybe I'll point them to http://dev.stephendiehl.com/hask/ And Data.Vector -- -- Sent from an expensive device which will be obsolete in a few months! :D Casey On Jun 1, 2015 1:35 PM, "Brandon Allbery" wrote: > On Mon, Jun 1, 2015 at 4:29 PM, KC wrote: > >> Then a tuple might work better as input to a function to index into an >> array >> >> e.g. myArray (5) >> > > Aside from 1-tuples not being a thing? (That's the same as (myArray 5).) > > -- > brandon s allbery kf8nh sine nomine > associates > allbery.b at gmail.com > ballbery at sinenomine.net > unix, openafs, kerberos, infrastructure, xmonad > http://sinenomine.net > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk Mon Jun 1 21:10:43 2015 From: tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk (Tom Ellis) Date: Mon, 1 Jun 2015 22:10:43 +0100 Subject: [Haskell-cafe] ANN: toysolver 0.3.0 released In-Reply-To: References: Message-ID: <20150601211042.GK6144@weber> On Mon, Jun 01, 2015 at 08:05:04PM +0900, Masahiro Sakai wrote: > I'm announcing the release of the toysolver package. > > http://hackage.haskell.org/package/toysolver > https://github.com/msakai/toysolver Thanks for the library. It's good to have more native Haskell solutions for this. Can I ask why the solvers are constructed using IO, rather than with a pure interface? Thanks, Tom From carter.schonwald at gmail.com Mon Jun 1 21:51:50 2015 From: carter.schonwald at gmail.com (Carter Schonwald) Date: Mon, 1 Jun 2015 17:51:50 -0400 Subject: [Haskell-cafe] I think someone had a complicated program to use brackets for array indexing - is it possible to use a DSL for this? In-Reply-To: References: Message-ID: There's some plans to allow more flexible overloaded list syntax that, once done, would allow list style notation for static sized tuples/lists. But it's probably not gonna be mature till ghc 7.14 at the current rate. Hopefully 7.12, but more likely 7.14 On Monday, June 1, 2015, KC wrote: > I'm a part time tutor even though I don't look Elizabethan > > I was trying to lower the learning curve for students > > Maybe I'll point them to > http://dev.stephendiehl.com/hask/ > And > Data.Vector > > -- > -- > > Sent from an expensive device which will be obsolete in a few months! :D > > Casey > > On Jun 1, 2015 1:35 PM, "Brandon Allbery" > wrote: > >> On Mon, Jun 1, 2015 at 4:29 PM, KC > > wrote: >> >>> Then a tuple might work better as input to a function to index into an >>> array >>> >>> e.g. myArray (5) >>> >> >> Aside from 1-tuples not being a thing? (That's the same as (myArray 5).) >> >> -- >> brandon s allbery kf8nh sine nomine >> associates >> allbery.b at gmail.com >> ballbery at sinenomine.net >> >> unix, openafs, kerberos, infrastructure, xmonad >> http://sinenomine.net >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From byron.hale at einfo.com Tue Jun 2 00:17:43 2015 From: byron.hale at einfo.com (Byron Hale) Date: Mon, 01 Jun 2015 17:17:43 -0700 Subject: [Haskell-cafe] ANN: Bayhac 2015 June 12, 13, 14 in Mountain View, CA Message-ID: <556CF627.5020300@einfo.com> Bayhac 2015 will be held June 12, 13, 14 at Hackers Dojo in Mountain View, CA. See http://bayhac.org/ to register. Light rail service is available from Caltrain to near Hackers Dojo. In addition, there can be shuttle service from Caltrain first thing in the morning and in the evening. Some known speakers are: Conal Elliott, Phil Freeman, Greg Weber, and Dan Burton You! If you would like to give a talk, send an email to bayhac2015-admin at googlegroups.com with the title and a brief explanation of what the talk will be on. It can be on anything Haskell related! We are also looking out for people who might be interested in conducting a more hands-on workshop. Twitter: https://twitter.com/bayhac2015 Byron Hale byron.hale at einfo.com @Hale_ByronL From ok at cs.otago.ac.nz Tue Jun 2 00:48:10 2015 From: ok at cs.otago.ac.nz (ok at cs.otago.ac.nz) Date: Tue, 2 Jun 2015 12:48:10 +1200 Subject: [Haskell-cafe] I think someone had a complicated program to use brackets for array indexing - is it possible to use a DSL for this? In-Reply-To: References: Message-ID: <6c63502aa89eb85e6802c5402d019fe0.squirrel@chasm.otago.ac.nz> > I'm a part time tutor even though I don't look Elizabethan > > I was trying to lower the learning curve for students Using square brackets for array indexing in Haskell would be more a case of putting a stumbling block in their way than lowering the learning curve. Fortran uses A(I), not A[I], and has for the last fifty-some years. The official definition of Simula 67 uses A(I) as well, despite its predecessor Algol 60 using a[i]. COBOL uses A(I), and has done so nearly as long as Fortran. PL/I (yes, it still exists) uses A(I), not A[I]. BASIC uses A(I), this is still so in Visual Basic.NET. If memory serves me correctly, MINITAB uses parentheses, not brackets. Is a pattern beginning to emerge? Lying to the students by implicitly telling them "all programming languages use square brackets for array indexing" will be doing them no favour. Even lying about Haskell is no kindness. From tikhon at jelv.is Tue Jun 2 00:52:41 2015 From: tikhon at jelv.is (Tikhon Jelvis) Date: Mon, 1 Jun 2015 17:52:41 -0700 Subject: [Haskell-cafe] I think someone had a complicated program to use brackets for array indexing - is it possible to use a DSL for this? In-Reply-To: <6c63502aa89eb85e6802c5402d019fe0.squirrel@chasm.otago.ac.nz> References: <6c63502aa89eb85e6802c5402d019fe0.squirrel@chasm.otago.ac.nz> Message-ID: If you teach them about how operators are normal functions in Haskell, using an operator to index into an array makes the indexing operation less magical?a big pedagogical boon, in my view. The fewer special cases in the language you're teaching, the better, and looking similar to other languages is not a good reason for a special case. Especially since the similarity could be misleading!) On Mon, Jun 1, 2015 at 5:48 PM, wrote: > > I'm a part time tutor even though I don't look Elizabethan > > > > I was trying to lower the learning curve for students > > Using square brackets for array indexing in Haskell > would be more a case of putting a stumbling block in > their way than lowering the learning curve. > > Fortran uses A(I), not A[I], and has for the last fifty-some > years. The official definition of Simula 67 uses A(I) as > well, despite its predecessor Algol 60 using a[i]. COBOL > uses A(I), and has done so nearly as long as Fortran. PL/I > (yes, it still exists) uses A(I), not A[I]. BASIC uses > A(I), this is still so in Visual Basic.NET. If memory > serves me correctly, MINITAB uses parentheses, not brackets. > > Is a pattern beginning to emerge? > > Lying to the students by implicitly telling them "all programming > languages use square brackets for array indexing" will be doing > them no favour. Even lying about Haskell is no kindness. > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kc1956 at gmail.com Tue Jun 2 01:00:33 2015 From: kc1956 at gmail.com (KC) Date: Mon, 1 Jun 2015 18:00:33 -0700 Subject: [Haskell-cafe] I think someone had a complicated program to use brackets for array indexing - is it possible to use a DSL for this? In-Reply-To: References: <6c63502aa89eb85e6802c5402d019fe0.squirrel@chasm.otago.ac.nz> Message-ID: On Jun 1, 2015 5:52 PM, "Tikhon Jelvis" wrote: If you teach them about how operators are normal functions in Haskell, using an operator to index into an array makes the indexing operation less magical?a big pedagogical boon, in my view. The fewer special cases in the language you're teaching, the better, and looking similar to other languages is not a good reason for a special case. Especially since the similarity could be misleading!) Good point (s) -- -- Sent from an expensive device which will be obsolete in a few months! :D Casey -------------- next part -------------- An HTML attachment was scrubbed... URL: From cma at bitemyapp.com Tue Jun 2 01:06:42 2015 From: cma at bitemyapp.com (Christopher Allen) Date: Mon, 1 Jun 2015 20:06:42 -0500 Subject: [Haskell-cafe] I think someone had a complicated program to use brackets for array indexing - is it possible to use a DSL for this? In-Reply-To: References: <6c63502aa89eb85e6802c5402d019fe0.squirrel@chasm.otago.ac.nz> Message-ID: Strongly agreed with ok and Tikhon. I've tried these weird pidgins and localized fabrications wrapped around Haskell before, it's only a stumbling block. Haskell is simple, you don't have to lie - just encourage them not to draw false analogies. On Mon, Jun 1, 2015 at 7:52 PM, Tikhon Jelvis wrote: > If you teach them about how operators are normal functions in Haskell, > using an operator to index into an array makes the indexing operation less > magical?a big pedagogical boon, in my view. The fewer special cases in the > language you're teaching, the better, and looking similar to other > languages is not a good reason for a special case. > > Especially since the similarity could be misleading!) > > On Mon, Jun 1, 2015 at 5:48 PM, wrote: > >> > I'm a part time tutor even though I don't look Elizabethan >> > >> > I was trying to lower the learning curve for students >> >> Using square brackets for array indexing in Haskell >> would be more a case of putting a stumbling block in >> their way than lowering the learning curve. >> >> Fortran uses A(I), not A[I], and has for the last fifty-some >> years. The official definition of Simula 67 uses A(I) as >> well, despite its predecessor Algol 60 using a[i]. COBOL >> uses A(I), and has done so nearly as long as Fortran. PL/I >> (yes, it still exists) uses A(I), not A[I]. BASIC uses >> A(I), this is still so in Visual Basic.NET. If memory >> serves me correctly, MINITAB uses parentheses, not brackets. >> >> Is a pattern beginning to emerge? >> >> Lying to the students by implicitly telling them "all programming >> languages use square brackets for array indexing" will be doing >> them no favour. Even lying about Haskell is no kindness. >> >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at utf8.me Tue Jun 2 01:31:00 2015 From: tim at utf8.me (Timothy Humphries) Date: Mon, 1 Jun 2015 18:31:00 -0700 Subject: [Haskell-cafe] Blog platform written in Haskell In-Reply-To: <20150531173238.GA8136@nibbler> References: <5B4731BB-48A6-4EB7-90AC-09B4D13985E5@gmail.com> <20150531173238.GA8136@nibbler> Message-ID: <4B860A34-7F43-4711-8554-600252CD22D6@utf8.me> You might be interested in Lambda CMS (http://lambdacms.org). "It requires a programmer to setup. [..] Once deployed, the content is manageable for a non-technical end user." > On 31 May 2015, at 10:32, Tobias Dammers wrote: > > FWIW, I'm working on a fairly generic CMS platform that could easily be > bashed into a blog type website (assuming that you'd use something like > disqus for comments), but it's not quite ready for prime time yet... > > On Sun, May 31, 2015 at 04:56:29PM +0200, Nicola Gigante wrote: >> Hi all, >> >> Is there a blog platform written in Haskell? I mean something >> dynamic (as opposed to a static site generator like hakyll) like >> WordPress but written in Haskell. >> >> Does something like that exist? >> >> Greetings, >> Nicola >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -- > Tobias Dammers - tdammers at gmail.com > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 455 bytes Desc: Message signed with OpenPGP using GPGMail URL: From ok at cs.otago.ac.nz Tue Jun 2 02:08:52 2015 From: ok at cs.otago.ac.nz (ok at cs.otago.ac.nz) Date: Tue, 2 Jun 2015 14:08:52 +1200 Subject: [Haskell-cafe] Rounding Message-ID: The Haskell 2010 report defines, in chapter 9, round :: (Real a, Fractional a, Integral b) => a -> b round x = let (n, r) = properFraction x -- n = truncate x, r = x-n (same sign as x) m = if r < 0 then n - 1 else n + 1 in case signum (abs r - 0.5) of -1 -> n -- round in if |r| < 0.5 1 -> m -- round out if |r| > 0.5 0 -> if even n then n else m (commented and slightly rearranged). The traditional definition of rounding to integer, so traditional that it is actually given in the OED, is basically round x = truncate (x + signum x * 0.5) There was a discussion of rounding recently in another mailing list and I put together this table: * Round x.5 OUT Ada, Algol W, C, COBOL, Fortran, Matlab, Pascal, PL/I, Python, Quintus Prolog, Smalltalk. The pre-computing tradition. * Round x.5 to EVEN Common Lisp, R, Haskell, SML, F#, Wolfram Language. * Round x.5 UP to positive infinity Java, JavaScript, ISO Prolog, Algol 60 * Rounding of x.5 UNSPECIFIED Algol 68, IMP 77 What I was wondering was whether anyone on this list knew why Haskell has the break-ties-to-even definition instead of the traditional break-ties-out one. (And please don't say that it is to get statistical unbiasedness, because given the kinds of data distribution I see, it _isn't_ unbiased.) From magnus at therning.org Tue Jun 2 07:30:22 2015 From: magnus at therning.org (Magnus Therning) Date: Tue, 2 Jun 2015 09:30:22 +0200 Subject: [Haskell-cafe] Rounding In-Reply-To: References: Message-ID: On 2 June 2015 at 04:08, wrote: > The Haskell 2010 report defines, in chapter 9, > round :: (Real a, Fractional a, Integral b) => a -> b > > round x = > let (n, r) = properFraction x > -- n = truncate x, r = x-n (same sign as x) > m = if r < 0 then n - 1 else n + 1 > in case signum (abs r - 0.5) of > -1 -> n -- round in if |r| < 0.5 > 1 -> m -- round out if |r| > 0.5 > 0 -> if even n then n else m > > > (commented and slightly rearranged). The traditional > definition of rounding to integer, so traditional that it > is actually given in the OED, is basically > > round x = truncate (x + signum x * 0.5) > > There was a discussion of rounding recently in another mailing > list and I put together this table: > > * Round x.5 OUT > Ada, Algol W, C, COBOL, Fortran, Matlab, Pascal, PL/I, > Python, Quintus Prolog, Smalltalk. The pre-computing tradition. > > * Round x.5 to EVEN > Common Lisp, R, Haskell, SML, F#, Wolfram Language. > > * Round x.5 UP to positive infinity > Java, JavaScript, ISO Prolog, Algol 60 > > * Rounding of x.5 UNSPECIFIED > Algol 68, IMP 77 > > What I was wondering was whether anyone on this list knew why > Haskell has the break-ties-to-even definition instead of the > traditional break-ties-out one. (And please don't say that it > is to get statistical unbiasedness, because given the kinds of > data distribution I see, it _isn't_ unbiased.) This is pure conjecture, but reading about "round half to even" on Wikipedia () shows that it has the most aliases of all tie-breaking strategies, it is also the rounding used in IEEE 754. /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus at therning.org jabber: magnus at therning.org twitter: magthe http://therning.org/magnus From nicola.gigante at gmail.com Tue Jun 2 08:44:19 2015 From: nicola.gigante at gmail.com (Nicola Gigante) Date: Tue, 2 Jun 2015 10:44:19 +0200 Subject: [Haskell-cafe] Blog platform written in Haskell In-Reply-To: <4B860A34-7F43-4711-8554-600252CD22D6@utf8.me> References: <5B4731BB-48A6-4EB7-90AC-09B4D13985E5@gmail.com> <20150531173238.GA8136@nibbler> <4B860A34-7F43-4711-8554-600252CD22D6@utf8.me> Message-ID: <9B1670FA-0793-4C20-B091-E4DE08B61770@gmail.com> > Il giorno 02/giu/2015, alle ore 03:31, Timothy Humphries ha scritto: > > You might be interested in Lambda CMS (http://lambdacms.org). > > "It requires a programmer to setup. [..] Once deployed, the content is manageable for a non-technical end user." Thanks to everyone that has answered. LambdaCMS looks like the thing closer to what I was looking for. So as I can see there?s nothing like a ?haskell WordPress?. I mean something easy to use and targeted at end users, that just happens to be written in Haskell. That would be a cool use case showroom for skeptics web developers, wouldn?t it? Especially after a couple of years of development and no security exploits found ;P I hope someone will do it sooner or later (or that lambacms develops enough to be competitive). Greetings, Nicola From dct25-561bs at mythic-beasts.com Tue Jun 2 13:26:06 2015 From: dct25-561bs at mythic-beasts.com (David Turner) Date: Tue, 2 Jun 2015 14:26:06 +0100 Subject: [Haskell-cafe] Consecutive FFI calls In-Reply-To: References: Message-ID: Hi Takenobu, My question is more about consecutive FFI calls on the same Haskell thread, of which there are I suppose 8 cases in your model: the thread is {unbound,bound}, the first call is {safe,unsafe} and the second is {safe,unsafe}. If the thread is bound, there's no problem as the two calls happen on the same OS thread. No memory barriers are needed. If the thread is unbound, the two calls may occur on distinct OS threads. Although the first call must have returned before the second is made, it doesn't immediately follow that there has been a memory barrier in between. I'm not sure it matters whether either call is safe or unsafe. As a Haskell thread can migrate to a different OS thread at any point, I don't think it's possible to put appropriate memory barriers in the source. I've been looking at the GHC source and commentary and believe the answer is 'yes', but can anyone from ghc-dev comment on the following? If a Haskell thread moves to a different OS thread then yieldCapability() will at some point be called. This function normally calls ACQUIRE_LOCK, which is either pthread_mutex_lock() or EnterCriticalSection() in the threaded runtime (on Linux and Win32 respectively). It looks like both of these count as full memory barriers. I think in the (rare) case where yieldCapability() only does a GC and then exits, the fact that it's always called in a loop means that eventually *some* Task or other emits a memory barrier. Thanks in advance, David On 30 May 2015 at 04:10, Takenobu Tani wrote: > Hi David, > > I'm not 100% sure, especially semantics, and I'm studying too. > I don't have an answer, but I describe the related matters in order to > organize my head. > > At first: > "memory barrier" ... is order control mechanism between memory accesses. > "bound thread" ... is association mechanism between ffi calls and a > specified thread. > > And: > "memory barrier" ... is depend on cpu hardware architecture(x86, ARM, > ...). > "OS level thread" ... is depend on OS(Linux, Windows, ...). > > Last: > There are four cases about ffi call [1]: > (1) safe ffi call on unbound thread(forkIO) > (2) unsafe ffi call on unbound thread(forkIO) > (3) safe ffi call on bound thread(main, forkOS) > (4) unsafe ffi call on bound thread(main, forkOS) > > I think, maybe (2) and (4) have not guarantee with memory ordering. > Because they might be inlined and optimized. > > If (1) and (3) always use pthread api (or memory barrier api) for thread/HEC > context switch, > they are guarantee. > But I think that it would not guarantee the full case. > > > I feel that order issues are very difficult. > I think order issues can be safely solved by explicit notation, > like explicit memory barrier notation, STM,... > > > If I have misunderstood, please teach me :-) > > > [1]: > http://takenobu-hs.github.io/downloads/haskell_ghc_illustrated.pdf#page=98 > > Cheers, > Takenobu > > > > 2015-05-29 1:24 GMT+09:00 David Turner : >> >> Hi, >> >> If I make a sequence of FFI calls (on a single Haskell thread) but >> which end up being called from different OS threads, is there any kind >> of ordering guarantee given? More specifically, is there a full memory >> barrier at the point where a Haskell thread migrates to a new OS >> thread? >> >> Many thanks, >> >> David >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > From donn at avvanta.com Tue Jun 2 13:36:16 2015 From: donn at avvanta.com (Donn Cave) Date: Tue, 2 Jun 2015 06:36:16 -0700 (PDT) Subject: [Haskell-cafe] Blog platform written in Haskell In-Reply-To: <9B1670FA-0793-4C20-B091-E4DE08B61770@gmail.com> References: <5B4731BB-48A6-4EB7-90AC-09B4D13985E5@gmail.com> <20150531173238.GA8136@nibbler> <4B860A34-7F43-4711-8554-600252CD22D6@utf8.me> <9B1670FA-0793-4C20-B091-E4DE08B61770@gmail.com> Message-ID: <20150602133616.77CBF93C9E@mail.avvanta.com> Quoth Nicola Gigante , > LambdaCMS looks like the thing closer to what I was looking for. > So as I can see there???s nothing like a ???haskell WordPress???. > I mean something easy to use and targeted at end users, that just > happens to be written in Haskell. > > That would be a cool use case showroom for skeptics web developers, > wouldn???t it? Especially after a couple of years of development and > no security exploits found ;P After brief experience with Drupal, I'd propose that the blog platform market is pretty well served by WordPress, Drupal, Joomla, et al., and a better strategy would be something that supports general web development that isn't tied to a particular model like a blog. That seems like the weakness of the "content management systems" that you currently have to pick from. They all support an infinite variety of trivial variations on the blog model, but make it hard to really go anywhere else. Donn From nicola.gigante at gmail.com Tue Jun 2 13:57:00 2015 From: nicola.gigante at gmail.com (Nicola Gigante) Date: Tue, 2 Jun 2015 15:57:00 +0200 Subject: [Haskell-cafe] Blog platform written in Haskell In-Reply-To: <20150602133616.77CBF93C9E@mail.avvanta.com> References: <5B4731BB-48A6-4EB7-90AC-09B4D13985E5@gmail.com> <20150531173238.GA8136@nibbler> <4B860A34-7F43-4711-8554-600252CD22D6@utf8.me> <9B1670FA-0793-4C20-B091-E4DE08B61770@gmail.com> <20150602133616.77CBF93C9E@mail.avvanta.com> Message-ID: <6F4E36D0-B6B2-46EB-9C21-4767A55368BD@gmail.com> > Il giorno 02/giu/2015, alle ore 15:36, Donn Cave ha scritto: > > After brief experience with Drupal, I'd propose that the blog platform > market is pretty well served by WordPress, Drupal, Joomla, et al., > and a better strategy would be something that supports general web > development that isn't tied to a particular model like a blog. > That seems like the weakness of the "content management systems" > that you currently have to pick from. They all support an infinite > variety of trivial variations on the blog model, but make it hard > to really go anywhere else. > I agree. However, I still think that a mature solution on par with WordPress & co. would serve as a great catalyst for adoption on the web. Q: Are you trying to tell me that Haskell is good for web development? A: Sure, look at the industry-strength XYZ CMS Q: WordPress does the same A: Yes, but this had 1% of security vulnerabilities in the last year, and it runs twice as fast. Of course the same could be said for any applicative context, not just web CMSes (uh, just realized a blog itself could be an Applicative ;) Greetings, Nicola From mwm at mired.org Tue Jun 2 14:16:19 2015 From: mwm at mired.org (Mike Meyer) Date: Tue, 2 Jun 2015 09:16:19 -0500 Subject: [Haskell-cafe] Blog platform written in Haskell In-Reply-To: <20150602133616.77CBF93C9E@mail.avvanta.com> References: <5B4731BB-48A6-4EB7-90AC-09B4D13985E5@gmail.com> <20150531173238.GA8136@nibbler> <4B860A34-7F43-4711-8554-600252CD22D6@utf8.me> <9B1670FA-0793-4C20-B091-E4DE08B61770@gmail.com> <20150602133616.77CBF93C9E@mail.avvanta.com> Message-ID: On Tue, Jun 2, 2015 at 8:36 AM, Donn Cave wrote: > nd a better strategy would be something that supports general web > development that isn't tied to a particular model like a blog. > That seems like the weakness of the "content management systems" > that you currently have to pick from. They all support an infinite > variety of trivial variations on the blog model, but make it hard > to really go anywhere else. > Assuming that anything that supports articles posted by users along with a mechanism to announce new articles qualifies as "variations on the blog model", what would another model be? I assume that the school of haskell hasn't been mentioned because the source hasn't been released yet? Or at least I couldn't find it. -------------- next part -------------- An HTML attachment was scrubbed... URL: From donn at avvanta.com Tue Jun 2 14:49:30 2015 From: donn at avvanta.com (Donn Cave) Date: Tue, 2 Jun 2015 07:49:30 -0700 (PDT) Subject: [Haskell-cafe] Blog platform written in Haskell In-Reply-To: References: <5B4731BB-48A6-4EB7-90AC-09B4D13985E5@gmail.com> <20150531173238.GA8136@nibbler> <4B860A34-7F43-4711-8554-600252CD22D6@utf8.me> <9B1670FA-0793-4C20-B091-E4DE08B61770@gmail.com> <20150602133616.77CBF93C9E@mail.avvanta.com> Message-ID: <20150602144930.E4E3393C8A@mail.avvanta.com> Quoth Mike Meyer , > Assuming that anything that supports articles posted by users along with a > mechanism to announce new articles qualifies as "variations on the blog > model", what would another model be? Just more general. In my case, I have content that's not wholly dissimilar from that, but had my own ideas as to how to organize and manage it, and then drupal rapidly got to be more trouble than it was worth. For example, if you don't want that mechanism to announce new articles on the front page, then you can install a front page extension ... but the conflict with the basic design that assumes this structure creates some tension. That's what I'm talking about - sure, provide the mechanisms, but don't build the assumptions about form and structure into that support. So I just threw it out and I generate my own web pages, but of course drupal supports lots of stuff that I'll probably miss someday. I don't know, maybe every web site owner really exactly wants a blog, but since there are a few well established competitors already in that domain, a different approach seems like a better bet. Donn From mwm at mired.org Tue Jun 2 14:59:31 2015 From: mwm at mired.org (Mike Meyer) Date: Tue, 2 Jun 2015 09:59:31 -0500 Subject: [Haskell-cafe] Blog platform written in Haskell In-Reply-To: <20150602144930.E4E3393C8A@mail.avvanta.com> References: <5B4731BB-48A6-4EB7-90AC-09B4D13985E5@gmail.com> <20150531173238.GA8136@nibbler> <4B860A34-7F43-4711-8554-600252CD22D6@utf8.me> <9B1670FA-0793-4C20-B091-E4DE08B61770@gmail.com> <20150602133616.77CBF93C9E@mail.avvanta.com> <20150602144930.E4E3393C8A@mail.avvanta.com> Message-ID: On Tue, Jun 2, 2015 at 9:49 AM, Donn Cave wrote: > Just more general. In my case, I have content that's not wholly dissimilar > from that, but had my own ideas as to how to organize and manage it, and > then drupal rapidly got to be more trouble than it was worth. For example, > if you don't want that mechanism to announce new articles on the front > page, > then you can install a front page extension ... but the conflict with the > basic design that assumes this structure creates some tension. That's > what I'm talking about - sure, provide the mechanisms, but don't build the > assumptions about form and structure into that support. So I just threw > it out and I generate my own web pages, but of course drupal supports > lots of stuff that I'll probably miss someday. So what you really want is a more flexible approach. I get that. I use both blogger & pages, as the different models they provide meet different needs, which occasionally leads to questions about where something should go. This sounds like something where the ability to compose functionality - as opposed inherit it - should be an advantage. At least until you hide it behind a GUI. -------------- next part -------------- An HTML attachment was scrubbed... URL: From toby at paccrat.org Tue Jun 2 16:37:37 2015 From: toby at paccrat.org (Toby Goodwin) Date: 02 Jun 2015 16:37:37 -0000 Subject: [Haskell-cafe] Blog platform written in Haskell In-Reply-To: References: <5B4731BB-48A6-4EB7-90AC-09B4D13985E5@gmail.com> <20150531173238.GA8136@nibbler> <4B860A34-7F43-4711-8554-600252CD22D6@utf8.me> <9B1670FA-0793-4C20-B091-E4DE08B61770@gmail.com> <20150602133616.77CBF93C9E@mail.avvanta.com> <20150602144930.E4E3393C8A@mail.avvanta.com> Message-ID: <1433263057.763.lithium.flare.email@hydrogen.mpv6.com> There seems to be considerable interest in this. I personally (and I suspect many others here!) have implemented several websites using either Hakyll or custom Yesod code. In most of those cases, something like WordPress or Drupal would have done the job. But working for a web hosting company, I spend more time than I would like clearing up the mess created by pwned PHP sites. A few times I've dreamed of building a "better CMS" in Haskell. It's not a project for a lone hacker. But if a few of us got together, I think we could make something wonderful. Interested? Join my new mailing list and prepare to take on the world! haskell-cms at googlegroups.com Toby. From jeremy at n-heptane.com Tue Jun 2 17:25:35 2015 From: jeremy at n-heptane.com (Jeremy Shaw) Date: Tue, 2 Jun 2015 12:25:35 -0500 Subject: [Haskell-cafe] Blog platform written in Haskell In-Reply-To: <5B4731BB-48A6-4EB7-90AC-09B4D13985E5@gmail.com> References: <5B4731BB-48A6-4EB7-90AC-09B4D13985E5@gmail.com> Message-ID: Hello, clckwrks aims to be exactly that -- a Wordpress, but written in Haskell. Like wordpress it supports themes and plugins. The groundwork is already laid so that you can eventually one-click install themes and plugins into a running clckwrks server without even restarting it. The goal by clckwrks 3.0 is that users who know absolutely nothing about Haskell should be able to install, configure, and use clckwrks and never have a clue what language it is written in. They will just one-click install the plugins and themes they need and manage it via the admin interface. As I said, the basics of this already exist -- themes and plugins exist and are administered through the web interface. on-the-fly loading of plugins has been done at a proof-of-concept level, but more work is needed to make it transparent to the end user. The core of clckwrks has not been receiving direct attention recently but not because it is unloved. Recent focus has been on the stripe payment plugin, revamping the authentication library, figuring out how to deploy clckwrks automatically via nix, using hydra for continuous integration testing, etc. I am getting back to more focus on the clckwrks core now though. Current improvements I'd like to see are better I18N support and moving towards a SPA friendly architecture. - jeremy On Sun, May 31, 2015 at 9:56 AM, Nicola Gigante wrote: > Hi all, > > Is there a blog platform written in Haskell? I mean something > dynamic (as opposed to a static site generator like hakyll) like > WordPress but written in Haskell. > > Does something like that exist? > > Greetings, > Nicola > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zemyla at gmail.com Tue Jun 2 19:39:45 2015 From: zemyla at gmail.com (Zemyla) Date: Tue, 2 Jun 2015 14:39:45 -0500 Subject: [Haskell-cafe] Four Designs for a Monad Message-ID: I'm working on writing a Haskell wrapper for the GNU Lightning code generation library (http://www.gnu.org/software/lightning/), which in C consists of a series of macros that write to a certain global state in a pointer _jit, such as jit_add or jit_call. Now, I figure that can be wrapped fairly simply in a monad, which we'll call the Lightning monad: -- syntax given here is just a sample. incr = lightningEmit $ do prolog in <- arg getArg R0, in addi R0, R0, 1 retr R0 However, I've come up with four possible designs for the Lightning monad. All but one would be reader monad transformers holding the pointer to the JIT state. 1) Lightning m a, where m is a MonadIO. Pros: Users have the power of the monads they are using within. Cons: Complexity, especially with having to handle monads with multiple returns like ListT. 2) Lightning a, which just wraps IO, and is a MonadIO. Pros: Allows the use of other IO functions in the monad. Cons: Allows the use of other IO functions in the monad. 3) Lightning a, which just wraps IO, and is not a MonadIO. Pros: Simplicity; possibly permitting the code generation to be unwrapped with unsafePerformIO. Cons: Referential integrity could still be violated. 4) Lightning a, which would be a free monad over the Lightning operations allowed. Pros: Evaluation (in the IO monad) would be certain to be pure, which would permit or accommodate it being a monad transformer, or converted to a pure function on architectures where the Lightning library is not available. Cons: Assembling, then disassembling to reassemble, a long list of instructions produces significant overhead, rendering it less suitable for JIT purposes. Interacting with the generated code is more difficult. Are there any other options I am missing? Are there any possibly game-changing pros or cons I have failed to notice? Thanks, Paul Drees -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeremy at n-heptane.com Tue Jun 2 20:58:35 2015 From: jeremy at n-heptane.com (Jeremy Shaw) Date: Tue, 2 Jun 2015 15:58:35 -0500 Subject: [Haskell-cafe] Blog platform written in Haskell In-Reply-To: <20150602133616.77CBF93C9E@mail.avvanta.com> References: <5B4731BB-48A6-4EB7-90AC-09B4D13985E5@gmail.com> <20150531173238.GA8136@nibbler> <4B860A34-7F43-4711-8554-600252CD22D6@utf8.me> <9B1670FA-0793-4C20-B091-E4DE08B61770@gmail.com> <20150602133616.77CBF93C9E@mail.avvanta.com> Message-ID: That is the direction that clckwrks has naturally ended up heading in. In the first version, it had blog stuff builtin. But as things got refactored the blog/cms stuff just became another general purpose plugin -- not part of the core. In fact, the authentication layer is even taking a step in that direction. It is still hardwired into the core, but it uses the clckwrks plugin architecture. At its core, clckwrks is just a general framework with allows you to dynamically load and unload components and themes. But it does not put many constraints on what those plugins need to do. I have taken existing standalone web apps and turned them into clckwrks plugins with little effort. In theory, you can save development time though by building a web application that builds on top of existing plugins -- such as a media plugin, cms plugin, payment plugin, etc. That way you can focus on the unique aspects of your site instead of wasting a lot of time on the boring mechanics of dealing with payment processing, serving files from S3, etc. - jeremy On Tue, Jun 2, 2015 at 8:36 AM, Donn Cave wrote: > Quoth Nicola Gigante , > > LambdaCMS looks like the thing closer to what I was looking for. > > So as I can see there?s nothing like a ?haskell WordPress?. > > I mean something easy to use and targeted at end users, that just > > happens to be written in Haskell. > > > > That would be a cool use case showroom for skeptics web developers, > > wouldn?t it? Especially after a couple of years of development and > > no security exploits found ;P > > After brief experience with Drupal, I'd propose that the blog platform > market is pretty well served by WordPress, Drupal, Joomla, et al., > and a better strategy would be something that supports general web > development that isn't tied to a particular model like a blog. > That seems like the weakness of the "content management systems" > that you currently have to pick from. They all support an infinite > variety of trivial variations on the blog model, but make it hard > to really go anywhere else. > > Donn > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From heraldhoi at gmail.com Wed Jun 3 07:19:04 2015 From: heraldhoi at gmail.com (Geraldus) Date: Wed, 03 Jun 2015 07:19:04 +0000 Subject: [Haskell-cafe] Pixel by pixel image processing Message-ID: Hi cafe! I want to do some trivial masking manipulation on PNG images: take a picture, crop it to square shape and then make a circular mask, i.e. take all pixels that lies outside circle with radius equal to half of image width and placed at image center and replace that pixels with zero opacity once (hope this description is clear enough). I've found two packages for image processing so far: `friday` [1] and `unm-hip` [2], but can't figure out which of them suits my needs, maybe there are some other packages I miss? [1] https://hackage.haskell.org/package/friday [2] https://hackage.haskell.org/package/unm-hip -------------- next part -------------- An HTML attachment was scrubbed... URL: From vagarenko at gmail.com Wed Jun 3 07:29:11 2015 From: vagarenko at gmail.com (Alexey Vagarenko) Date: Wed, 3 Jun 2015 00:29:11 -0700 (PDT) Subject: [Haskell-cafe] Pixel by pixel image processing In-Reply-To: References: Message-ID: Hello, There is also https://hackage.haskell.org/package/JuicyPixels ?????, 3 ???? 2015 ?., 13:19:23 UTC+6 ???????????? Geraldus ???????: > > Hi cafe! > > I want to do some trivial masking manipulation on PNG images: take a > picture, crop it to square shape and then make a circular mask, i.e. take > all pixels that lies outside circle with radius equal to half of image > width and placed at image center and replace that pixels with zero opacity > once (hope this description is clear enough). > > I've found two packages for image processing so far: `friday` [1] and > `unm-hip` [2], but can't figure out which of them suits my needs, maybe > there are some other packages I miss? > > [1] https://hackage.haskell.org/package/friday > [2] https://hackage.haskell.org/package/unm-hip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bneijt at gmail.com Wed Jun 3 08:24:55 2015 From: bneijt at gmail.com (Bram Neijt) Date: Wed, 3 Jun 2015 10:24:55 +0200 Subject: [Haskell-cafe] Pixel by pixel image processing In-Reply-To: References: Message-ID: I did some combine images into a single large image code using GTK, Cairo and Pixbuf: https://github.com/bneijt/commitbook/blob/master/src/Rendering.hs I would consider Cairo[1] another. Greetings, Bram [1] http://cairographics.org/ On Wed, Jun 3, 2015 at 9:29 AM, Alexey Vagarenko wrote: > Hello, > > There is also https://hackage.haskell.org/package/JuicyPixels > > ?????, 3 ???? 2015 ?., 13:19:23 UTC+6 ???????????? Geraldus ???????: >> >> Hi cafe! >> >> I want to do some trivial masking manipulation on PNG images: take a >> picture, crop it to square shape and then make a circular mask, i.e. take >> all pixels that lies outside circle with radius equal to half of image width >> and placed at image center and replace that pixels with zero opacity once >> (hope this description is clear enough). >> >> I've found two packages for image processing so far: `friday` [1] and >> `unm-hip` [2], but can't figure out which of them suits my needs, maybe >> there are some other packages I miss? >> >> [1] https://hackage.haskell.org/package/friday >> [2] https://hackage.haskell.org/package/unm-hip > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > From dons00 at gmail.com Wed Jun 3 08:50:26 2015 From: dons00 at gmail.com (Don Stewart) Date: Wed, 03 Jun 2015 08:50:26 +0000 Subject: [Haskell-cafe] Haskell dev role in Strats at Standard Chartered (Singapore) Message-ID: I have an open position for a Haskell developer to join Standard Chartered's Strats team in Singapore. More details at: https://donsbot.wordpress.com/2015/06/03/haskell-dev-role-in-strats-at-standard-chartered-singapore/ -- Don -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsyl20 at gmail.com Wed Jun 3 09:52:00 2015 From: hsyl20 at gmail.com (Sylvain Henry) Date: Wed, 3 Jun 2015 11:52:00 +0200 Subject: [Haskell-cafe] Pixel by pixel image processing In-Reply-To: References: Message-ID: Hi, Here is a solution using JuicyPixels: import Codec.Picture import Codec.Picture.Types main :: IO () main = do Right img <- readImage "test.png" _ <- writeDynamicPng "test2.png" (dynamicPixelMap circleImage img) return () circleImage :: Pixel a => Image a -> Image a circleImage img = generateImage (\x y -> f x y $ pixelAt img x y) edge edge where edge = min (imageWidth img) (imageHeight img) f x y a = if x'*x' + y'*y' < e'*e' then a else colorMap (const 0) a where e' = edge `div` 2 x' = x - e' y' = y - e' Sylvain 2015-06-03 9:19 GMT+02:00 Geraldus : > Hi cafe! > > I want to do some trivial masking manipulation on PNG images: take a > picture, crop it to square shape and then make a circular mask, i.e. take > all pixels that lies outside circle with radius equal to half of image > width and placed at image center and replace that pixels with zero opacity > once (hope this description is clear enough). > > I've found two packages for image processing so far: `friday` [1] and > `unm-hip` [2], but can't figure out which of them suits my needs, maybe > there are some other packages I miss? > > [1] https://hackage.haskell.org/package/friday > [2] https://hackage.haskell.org/package/unm-hip > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From heraldhoi at gmail.com Wed Jun 3 10:00:54 2015 From: heraldhoi at gmail.com (Geraldus) Date: Wed, 03 Jun 2015 10:00:54 +0000 Subject: [Haskell-cafe] Pixel by pixel image processing In-Reply-To: References: Message-ID: Thank you everybody! *JuicyPixels* was the first package I have thought about, but I've mistaken about its functionality and didn't mentioned it here. *Sylvain*, thank you a lot! You've made my day! ??, 3 ???? 2015 ?. ? 14:52, Sylvain Henry : > Hi, > > Here is a solution using JuicyPixels: > > import Codec.Picture > import Codec.Picture.Types > > > main :: IO () > main = do > Right img <- readImage "test.png" > _ <- writeDynamicPng "test2.png" (dynamicPixelMap circleImage img) > return () > > circleImage :: Pixel a => Image a -> Image a > circleImage img = generateImage (\x y -> f x y $ pixelAt img x y) edge edge > where > edge = min (imageWidth img) (imageHeight img) > f x y a = if x'*x' + y'*y' < e'*e' > then a > else colorMap (const 0) a > where > e' = edge `div` 2 > x' = x - e' > y' = y - e' > > Sylvain > > 2015-06-03 9:19 GMT+02:00 Geraldus : > >> Hi cafe! >> >> I want to do some trivial masking manipulation on PNG images: take a >> picture, crop it to square shape and then make a circular mask, i.e. take >> all pixels that lies outside circle with radius equal to half of image >> width and placed at image center and replace that pixels with zero opacity >> once (hope this description is clear enough). >> >> I've found two packages for image processing so far: `friday` [1] and >> `unm-hip` [2], but can't figure out which of them suits my needs, maybe >> there are some other packages I miss? >> >> [1] https://hackage.haskell.org/package/friday >> [2] https://hackage.haskell.org/package/unm-hip >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From takenobu.hs at gmail.com Wed Jun 3 13:07:08 2015 From: takenobu.hs at gmail.com (Takenobu Tani) Date: Wed, 3 Jun 2015 22:07:08 +0900 Subject: [Haskell-cafe] Consecutive FFI calls In-Reply-To: References: Message-ID: Hi David, Interesting. I don't have an answer, but I write few things. Your case is: * consecutive FFI calls * on the same Haskell Thread Consecutive FFI call cases are: (1) do { safe_ffiCall1; safe_ffiCall2 } (2) do { safe_ffiCall1; unsafe_ffiCall2 } (3) do { unsafe_ffiCall1; safe_ffiCall2 } (4) do { unsafe_ffiCall1; unsafe_ffiCall2 } I think at least answer is 'no' with case (4). There are no memory barrier between unsafe_ffiCall1 and 2. And apologies if I'm missing context. Although a haskell thread can migrate to a different OS thread at any point, you can put a memory barrier primitive (like "mfence" instruction [1][2][3]) at each target points before or after each ffi calls. Of course, it's expensive if you put for each ffi calls. And you should abstract from cpu hardware. (I found useful explicit memory barrier api[4].) I feel that the _exact_ memory barrier on out-of-order cpu, multi core, memory mapped IO, ... is very expensive. It's only satisfy by explicit "hardware memory barrier mechanism". And it's difficult that exact memory barrier satisfy all case by the combination of some implicit mechanism. BTW, does it truly need memory barrier? Also C language, exact memory barrier is expensive. And, Maybe, ghc-devs are very busy to ship ghc7.10.2 :-) [1]: Chapter 8.2, http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf [2]: MFENCE, http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-system-programming-manual-325384.pdf [3]: Chapter 7.5.5, http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-optimization-manual.pdf [4]: https://hackage.haskell.org/package/atomic-primops Cheers, Takenobu 2015-06-02 22:26 GMT+09:00 David Turner : > Hi Takenobu, > > My question is more about consecutive FFI calls on the same Haskell > thread, of which there are I suppose 8 cases in your model: the thread > is {unbound,bound}, the first call is {safe,unsafe} and the second is > {safe,unsafe}. If the thread is bound, there's no problem as the two > calls happen on the same OS thread. No memory barriers are needed. If > the thread is unbound, the two calls may occur on distinct OS threads. > Although the first call must have returned before the second is made, > it doesn't immediately follow that there has been a memory barrier in > between. I'm not sure it matters whether either call is safe or > unsafe. As a Haskell thread can migrate to a different OS thread at > any point, I don't think it's possible to put appropriate memory > barriers in the source. > > I've been looking at the GHC source and commentary and believe the > answer is 'yes', but can anyone from ghc-dev comment on the following? > > If a Haskell thread moves to a different OS thread then > yieldCapability() will at some point be called. This function normally > calls ACQUIRE_LOCK, which is either pthread_mutex_lock() or > EnterCriticalSection() in the threaded runtime (on Linux and Win32 > respectively). It looks like both of these count as full memory > barriers. I think in the (rare) case where yieldCapability() only does > a GC and then exits, the fact that it's always called in a loop means > that eventually *some* Task or other emits a memory barrier. > > Thanks in advance, > > David > > > > > > > > > On 30 May 2015 at 04:10, Takenobu Tani wrote: > > Hi David, > > > > I'm not 100% sure, especially semantics, and I'm studying too. > > I don't have an answer, but I describe the related matters in order to > > organize my head. > > > > At first: > > "memory barrier" ... is order control mechanism between memory > accesses. > > "bound thread" ... is association mechanism between ffi calls and a > > specified thread. > > > > And: > > "memory barrier" ... is depend on cpu hardware architecture(x86, ARM, > > ...). > > "OS level thread" ... is depend on OS(Linux, Windows, ...). > > > > Last: > > There are four cases about ffi call [1]: > > (1) safe ffi call on unbound thread(forkIO) > > (2) unsafe ffi call on unbound thread(forkIO) > > (3) safe ffi call on bound thread(main, forkOS) > > (4) unsafe ffi call on bound thread(main, forkOS) > > > > I think, maybe (2) and (4) have not guarantee with memory ordering. > > Because they might be inlined and optimized. > > > > If (1) and (3) always use pthread api (or memory barrier api) for > thread/HEC > > context switch, > > they are guarantee. > > But I think that it would not guarantee the full case. > > > > > > I feel that order issues are very difficult. > > I think order issues can be safely solved by explicit notation, > > like explicit memory barrier notation, STM,... > > > > > > If I have misunderstood, please teach me :-) > > > > > > [1]: > > > http://takenobu-hs.github.io/downloads/haskell_ghc_illustrated.pdf#page=98 > > > > Cheers, > > Takenobu > > > > > > > > 2015-05-29 1:24 GMT+09:00 David Turner : > >> > >> Hi, > >> > >> If I make a sequence of FFI calls (on a single Haskell thread) but > >> which end up being called from different OS threads, is there any kind > >> of ordering guarantee given? More specifically, is there a full memory > >> barrier at the point where a Haskell thread migrates to a new OS > >> thread? > >> > >> Many thanks, > >> > >> David > >> _______________________________________________ > >> Haskell-Cafe mailing list > >> Haskell-Cafe at haskell.org > >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From acowley at seas.upenn.edu Wed Jun 3 17:15:33 2015 From: acowley at seas.upenn.edu (Anthony Cowley) Date: Wed, 3 Jun 2015 13:15:33 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax Message-ID: Hi Everyone, I didn't think this would see any resistance as it doesn't break anything, but this is the internet, so, if you haven't already, take a look at this GHC feature request The idea is that rather than writing, import Data.Map (Map) import qualified Data.Map as M you could instead write, import Data.Map (Map) as M The Map identifier would imported unqualified, while M would be introduced as an alias for the qualified import of Data.Map. Note that, currently, following a parenthesized group with the "as" keyword is a parse error. So allowing this syntax would not affect any currently working programs. I've mentioned this proposal before and gotten good response, so I finally wrote it up last night after people on IRC responded positively to it. As well as IRC and trac, I put the link up on Twitter to get it in front of a large audience, and here's what we have after a bit over 12 hours (not counting the handful of supporters in IRC): +20 -2 You can see the tweet at I'll try to summarize the two negative votes: 1) This isn't that big a burden, and we should instead focus on controlled export of class instances; and 2) We should instead focus on exporting name spaces, and that the ordering of parentheses and the "as" keyword is too close to the existing "import Foo as F(foo)" syntax. Since there are these negative votes, I think it best if as many people as possible at least see the proposal so the GHC developers can get a better sense for the overall response. Anthony From michael at snoyman.com Wed Jun 3 17:18:55 2015 From: michael at snoyman.com (Michael Snoyman) Date: Wed, 03 Jun 2015 17:18:55 +0000 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: Message-ID: That's nifty. Just about every module in the project I'm working on now has two lines like the former (and the same for Set). I like the new syntax, +1. On Wed, Jun 3, 2015 at 8:15 PM Anthony Cowley wrote: > Hi Everyone, > > I didn't think this would see any resistance as it doesn't break > anything, but this is the internet, so, if you haven't already, take a > look at this GHC feature request > > > The idea is that rather than writing, > > import Data.Map (Map) > import qualified Data.Map as M > > you could instead write, > > import Data.Map (Map) as M > > The Map identifier would imported unqualified, while M would be > introduced as an alias for the qualified import of Data.Map. > > Note that, currently, following a parenthesized group with the "as" > keyword is a parse error. So allowing this syntax would not affect any > currently working programs. > > I've mentioned this proposal before and gotten good response, so I > finally wrote it up last night after people on IRC responded > positively to it. As well as IRC and trac, I put the link up on > Twitter to get it in front of a large audience, and here's what we > have after a bit over 12 hours (not counting the handful of supporters > in IRC): > > +20 > -2 > > You can see the tweet at > > > I'll try to summarize the two negative votes: 1) This isn't that big a > burden, and we should instead focus on controlled export of class > instances; and 2) We should instead focus on exporting name spaces, > and that the ordering of parentheses and the "as" keyword is too close > to the existing "import Foo as F(foo)" syntax. > > Since there are these negative votes, I think it best if as many > people as possible at least see the proposal so the GHC developers can > get a better sense for the overall response. > > Anthony > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at bergmark.nl Wed Jun 3 17:31:33 2015 From: adam at bergmark.nl (Adam Bergmark) Date: Wed, 3 Jun 2015 19:31:33 +0200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: Message-ID: +1, I thought of the exact same syntax at some point. On Wed, Jun 3, 2015 at 7:18 PM, Michael Snoyman wrote: > That's nifty. Just about every module in the project I'm working on now > has two lines like the former (and the same for Set). I like the new > syntax, +1. > > On Wed, Jun 3, 2015 at 8:15 PM Anthony Cowley > wrote: > >> Hi Everyone, >> >> I didn't think this would see any resistance as it doesn't break >> anything, but this is the internet, so, if you haven't already, take a >> look at this GHC feature request >> >> >> The idea is that rather than writing, >> >> import Data.Map (Map) >> import qualified Data.Map as M >> >> you could instead write, >> >> import Data.Map (Map) as M >> >> The Map identifier would imported unqualified, while M would be >> introduced as an alias for the qualified import of Data.Map. >> >> Note that, currently, following a parenthesized group with the "as" >> keyword is a parse error. So allowing this syntax would not affect any >> currently working programs. >> >> I've mentioned this proposal before and gotten good response, so I >> finally wrote it up last night after people on IRC responded >> positively to it. As well as IRC and trac, I put the link up on >> Twitter to get it in front of a large audience, and here's what we >> have after a bit over 12 hours (not counting the handful of supporters >> in IRC): >> >> +20 >> -2 >> >> You can see the tweet at >> >> >> I'll try to summarize the two negative votes: 1) This isn't that big a >> burden, and we should instead focus on controlled export of class >> instances; and 2) We should instead focus on exporting name spaces, >> and that the ordering of parentheses and the "as" keyword is too close >> to the existing "import Foo as F(foo)" syntax. >> >> Since there are these negative votes, I think it best if as many >> people as possible at least see the proposal so the GHC developers can >> get a better sense for the overall response. >> >> Anthony >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eir at cis.upenn.edu Wed Jun 3 17:43:12 2015 From: eir at cis.upenn.edu (Richard Eisenberg) Date: Wed, 3 Jun 2015 13:43:12 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: Message-ID: <05505243-26E6-438C-A172-6B77662552BA@cis.upenn.edu> I have to say I'm a big -1 on the proposed syntax -- it's awfully confusing to have the import list mean something entirely different before the `as` compared to after the `as`. I proposed a different syntax on the ticket (https://ghc.haskell.org/trac/ghc/ticket/10478#comment:3), which I paste here for ease of access. --- I'm in favor of abbreviating the syntax in this common scenario, but I don't like your choice of syntax, I'm afraid. It would give {{{ import Data.Map (Map) as M -- (1) }}} a very different meaning from {{{ import Data.Map as M (Map) -- (2) }}} (1) imports all of `Data.Map`, qualified with the alias `M`, and imports the name `Map` unqualified. (2) imports only the name `Map` (unqualified) while also aliasing `Data.Map`. Having these two coexist seems like we're asking users to be confused. What about {{{ import Data.Map (Map) qualified as M * }}} ? The general schema, which replaces the current syntax. This schema does not permit some current syntax, but it would be easy to extend it to be backward-compatible. I've chosen not to for this presentation to avoid clutter. {{{ import_statement ::= 'import' module_name maybe_name_list import_specifiers module_name ::= ... maybe_name_list ::= name_list | name_list ::= '(' names ')' | '*' import_specifiers ::= | import_specifier import_specifiers import_specifier ::= 'hiding' name_list | qualified_spec name_list qualified_spec ::= 'qualified' | 'qualified' 'as' name }}} The top-level `maybe_name_list` would list all unqualified imports. If it is omitted, and there are no `qualified_spec`s, then all names would be imported unqualified. If it is omitted and there are one or more `qualified_spec`s, then no names would be imported unqualified. Each `import_specifier` either adds qualified names (perhaps under a module synonym) or removes names. Removing names with `hiding` removes those names from the `qualified_spec` (or top-level `maybe_name_list`) immediately preceding the `hiding`. The special `name_list` `*` (note that it is ''not'' in parentheses, to avoid ambiguity) means "all names". This schema allows one import statement to import a mix of qualified and unqualified names, and even allows using different module synonyms for different sets of qualified names. The legacy `import` syntax could desugar to this form, which seems strictly more expressive. For example: {{{ import qualified Foo --> import Foo qualified * import qualified Bar as B --> import Bar qualified as B * import Baz hiding (wurble) --> import Baz hiding (wurble) }}} Thoughts? Richard On Jun 3, 2015, at 1:31 PM, Adam Bergmark wrote: > +1, I thought of the exact same syntax at some point. > > On Wed, Jun 3, 2015 at 7:18 PM, Michael Snoyman wrote: > That's nifty. Just about every module in the project I'm working on now has two lines like the former (and the same for Set). I like the new syntax, +1. > > On Wed, Jun 3, 2015 at 8:15 PM Anthony Cowley wrote: > Hi Everyone, > > I didn't think this would see any resistance as it doesn't break > anything, but this is the internet, so, if you haven't already, take a > look at this GHC feature request > > > The idea is that rather than writing, > > import Data.Map (Map) > import qualified Data.Map as M > > you could instead write, > > import Data.Map (Map) as M > > The Map identifier would imported unqualified, while M would be > introduced as an alias for the qualified import of Data.Map. > > Note that, currently, following a parenthesized group with the "as" > keyword is a parse error. So allowing this syntax would not affect any > currently working programs. > > I've mentioned this proposal before and gotten good response, so I > finally wrote it up last night after people on IRC responded > positively to it. As well as IRC and trac, I put the link up on > Twitter to get it in front of a large audience, and here's what we > have after a bit over 12 hours (not counting the handful of supporters > in IRC): > > +20 > -2 > > You can see the tweet at > > > I'll try to summarize the two negative votes: 1) This isn't that big a > burden, and we should instead focus on controlled export of class > instances; and 2) We should instead focus on exporting name spaces, > and that the ordering of parentheses and the "as" keyword is too close > to the existing "import Foo as F(foo)" syntax. > > Since there are these negative votes, I think it best if as many > people as possible at least see the proposal so the GHC developers can > get a better sense for the overall response. > > Anthony > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe -------------- next part -------------- An HTML attachment was scrubbed... URL: From amindfv at gmail.com Wed Jun 3 18:23:10 2015 From: amindfv at gmail.com (amindfv at gmail.com) Date: Wed, 3 Jun 2015 14:23:10 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: Message-ID: I'd be +1 provided we can write e.g.: import Data.Map (Map) as M (fromList) And then we'd get only the Map type and M.fromList Tom El Jun 3, 2015, a las 13:15, Anthony Cowley escribi?: > Hi Everyone, > > I didn't think this would see any resistance as it doesn't break > anything, but this is the internet, so, if you haven't already, take a > look at this GHC feature request > > > The idea is that rather than writing, > > import Data.Map (Map) > import qualified Data.Map as M > > you could instead write, > > import Data.Map (Map) as M > > The Map identifier would imported unqualified, while M would be > introduced as an alias for the qualified import of Data.Map. > > Note that, currently, following a parenthesized group with the "as" > keyword is a parse error. So allowing this syntax would not affect any > currently working programs. > > I've mentioned this proposal before and gotten good response, so I > finally wrote it up last night after people on IRC responded > positively to it. As well as IRC and trac, I put the link up on > Twitter to get it in front of a large audience, and here's what we > have after a bit over 12 hours (not counting the handful of supporters > in IRC): > > +20 > -2 > > You can see the tweet at > > > I'll try to summarize the two negative votes: 1) This isn't that big a > burden, and we should instead focus on controlled export of class > instances; and 2) We should instead focus on exporting name spaces, > and that the ordering of parentheses and the "as" keyword is too close > to the existing "import Foo as F(foo)" syntax. > > Since there are these negative votes, I think it best if as many > people as possible at least see the proposal so the GHC developers can > get a better sense for the overall response. > > Anthony > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe From eric at seidel.io Wed Jun 3 18:29:46 2015 From: eric at seidel.io (Eric Seidel) Date: Wed, 03 Jun 2015 11:29:46 -0700 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: Message-ID: <1433356186.1567028.286030721.62EBC822@webmail.messagingengine.com> I don't have a strong opinion on the choice of syntax, but am a major +1 on combining the two imports into one. On Wed, Jun 3, 2015, at 10:15, Anthony Cowley wrote: > Hi Everyone, > > I didn't think this would see any resistance as it doesn't break > anything, but this is the internet, so, if you haven't already, take a > look at this GHC feature request > > > The idea is that rather than writing, > > import Data.Map (Map) > import qualified Data.Map as M > > you could instead write, > > import Data.Map (Map) as M > > The Map identifier would imported unqualified, while M would be > introduced as an alias for the qualified import of Data.Map. > > Note that, currently, following a parenthesized group with the "as" > keyword is a parse error. So allowing this syntax would not affect any > currently working programs. > > I've mentioned this proposal before and gotten good response, so I > finally wrote it up last night after people on IRC responded > positively to it. As well as IRC and trac, I put the link up on > Twitter to get it in front of a large audience, and here's what we > have after a bit over 12 hours (not counting the handful of supporters > in IRC): > > +20 > -2 > > You can see the tweet at > > > I'll try to summarize the two negative votes: 1) This isn't that big a > burden, and we should instead focus on controlled export of class > instances; and 2) We should instead focus on exporting name spaces, > and that the ordering of parentheses and the "as" keyword is too close > to the existing "import Foo as F(foo)" syntax. > > Since there are these negative votes, I think it best if as many > people as possible at least see the proposal so the GHC developers can > get a better sense for the overall response. > > Anthony > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe From _deepfire at feelingofgreen.ru Wed Jun 3 18:32:41 2015 From: _deepfire at feelingofgreen.ru (Kosyrev Serge) Date: Wed, 03 Jun 2015 21:32:41 +0300 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: (sfid-20150603_213048_939050_3C11BA68) (Anthony Cowley's message of "Wed, 3 Jun 2015 13:15:33 -0400") References: Message-ID: <87382863sm.fsf@andromedae.feelingofgreen.ru> Anthony Cowley writes: > The idea is that rather than writing, > > import Data.Map (Map) The head parses this in following steps: 1. import FQMN ? we're going to directly import from FQMN 2. import FQMN (?) ? ok, the scope is restricted by the parens > import qualified Data.Map as M 1. import qualified FQMN ? we're going to import qualified names from FQMN 2. import qualified FQMN as X ? ok, and the prefix is going to be X > you could instead write, > > import Data.Map (Map) as M ?and you see how this is broken: 1. import FQMN ? we're going to directly import from FQMN (not!) In other words, if you intend to keep all three cases, you're going to have an ugly inconsistency. Sure, it's small and contained, but still it's an inconsistency that's going to have a non-zero cost in the long run. -- respectfully, ??????? ?????? From amindfv at gmail.com Wed Jun 3 18:41:15 2015 From: amindfv at gmail.com (amindfv at gmail.com) Date: Wed, 3 Jun 2015 14:41:15 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <87382863sm.fsf@andromedae.feelingofgreen.ru> References: <87382863sm.fsf@andromedae.feelingofgreen.ru> Message-ID: El Jun 3, 2015, a las 14:32, Kosyrev Serge <_deepfire at feelingofgreen.ru> escribi?: > Anthony Cowley writes: >> The idea is that rather than writing, >> >> import Data.Map (Map) > > The head parses this in following steps: > > 1. import FQMN ? we're going to directly import from FQMN > 2. import FQMN (?) ? ok, the scope is restricted by the parens > >> import qualified Data.Map as M > > 1. import qualified FQMN ? we're going to import qualified names from FQMN > 2. import qualified FQMN as X ? ok, and the prefix is going to be X > >> you could instead write, >> >> import Data.Map (Map) as M > > ?and you see how this is broken: > > 1. import FQMN ? we're going to directly import from FQMN (not!) > > > In other words, if you intend to keep all three cases, you're going to > have an ugly inconsistency. Sure, it's small and contained, but still > it's an inconsistency that's going to have a non-zero cost in the long run. > > I think the existing syntax that this most-closely corresponds to is "import Data.Map as Map" (note the "as" without "qualified") Tom > -- > respectfully, > ??????? ?????? > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe From _deepfire at feelingofgreen.ru Wed Jun 3 18:45:59 2015 From: _deepfire at feelingofgreen.ru (Kosyrev Serge) Date: Wed, 03 Jun 2015 21:45:59 +0300 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: (sfid-20150603_223827_885364_D7DA4F6E) (amindfv@gmail.com's message of "Wed, 3 Jun 2015 14:23:10 -0400") References: Message-ID: <87y4k04om0.fsf@andromedae.feelingofgreen.ru> amindfv at gmail.com writes: > I'd be +1 provided we can write e.g.: > > import Data.Map (Map) as M (fromList) > > And then we'd get only the Map type and M.fromList Then wouldn't it also make sense to also: 1. eliminate the arguably confusing double-import through as-without-qualified: import FQMN as M .. (which imports the exportlist of FQMN twice) Does a lot of code use that? Is this a good practice? Do we want to encourage this kind of usage? 2. and take advantage of the reduced complexity by implying "qualified", wheneved "as" is present, by replacing: import qualified FQMN as M ? with import FQMN as M ? 3. effectively drop the "qualified" keyword from use (can be done lazily) It would break things, though. -- ? ???????e?, ??????? ?????? From ezyang at mit.edu Wed Jun 3 18:58:28 2015 From: ezyang at mit.edu (Edward Z. Yang) Date: Wed, 03 Jun 2015 11:58:28 -0700 Subject: [Haskell-cafe] Consecutive FFI calls In-Reply-To: References: Message-ID: <1433357750-sup-1872@sabre> The ordering is guaranteed, because full synchronization is used when threads migrate. (It goes something like, a capability with a full run queue grabs all idle capabilities, distributes its threads to those capabilities, and then releases them. The act of acquiring and releasing a capability is a synchronization point.) Cheers, Edward Excerpts from David Turner's message of 2015-05-28 09:24:50 -0700: > Hi, > > If I make a sequence of FFI calls (on a single Haskell thread) but > which end up being called from different OS threads, is there any kind > of ordering guarantee given? More specifically, is there a full memory > barrier at the point where a Haskell thread migrates to a new OS > thread? > > Many thanks, > > David From acowley at seas.upenn.edu Wed Jun 3 19:01:55 2015 From: acowley at seas.upenn.edu (Anthony Cowley) Date: Wed, 3 Jun 2015 15:01:55 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <05505243-26E6-438C-A172-6B77662552BA@cis.upenn.edu> References: <05505243-26E6-438C-A172-6B77662552BA@cis.upenn.edu> Message-ID: On Wed, Jun 3, 2015 at 1:43 PM, Richard Eisenberg wrote: > I have to say I'm a big -1 on the proposed syntax -- it's awfully confusing > to have the import list mean something entirely different before the `as` > compared to after the `as`. I proposed a different syntax on the ticket > (https://ghc.haskell.org/trac/ghc/ticket/10478#comment:3), which I paste > here for ease of access. Calling this "awfully confusing" is dramatically overstating things. A quick grep over all of the Stackage package set sources suggests that the "import Foo as F (foo)" syntax is used in less than 0.3% of all import statements. If the rule that the "explicit import list is always imported unqualified" really is too confusing (even though it is the current rule), you could guess wrong every time and only misunderstand three out of a thousand imports you encounter in the wild. I think this is a tiny tail wagging an otherwise healthy dog. That we can get rid of the word "qualified" for a common case without breaking anything seems like a clear win to me. But I appreciate some people disagree, which is why I thought it was important to make the broad support visible rather than surprise anyone. If there is enough opposition (we're around 25-3 at the moment), we can let the sleeping dog lie. As to the alternative proposal, I'm less positive on it as it seems unnecessarily verbose given the original option, and the fact that, as presented, it breaks existing code makes it a non-starter. Anthony > > --- > I'm in favor of abbreviating the syntax in this common scenario, but I don't > like your choice of syntax, I'm afraid. It would give > > {{{ > import Data.Map (Map) as M -- (1) > }}} > > a very different meaning from > > {{{ > import Data.Map as M (Map) -- (2) > }}} > > (1) imports all of `Data.Map`, qualified with the alias `M`, and imports the > name `Map` unqualified. (2) imports only the name `Map` (unqualified) while > also aliasing `Data.Map`. > Having these two coexist seems like we're asking users to be confused. > > What about > > {{{ > import Data.Map (Map) > qualified as M * > }}} > > ? > > The general schema, which replaces the current syntax. This schema does not > permit some current syntax, but it would be easy to extend it to be > backward-compatible. I've chosen not to for this presentation to avoid > clutter. > > {{{ > import_statement ::= 'import' module_name maybe_name_list import_specifiers > module_name ::= ... > maybe_name_list ::= name_list | > name_list ::= '(' names ')' | '*' > import_specifiers ::= | import_specifier import_specifiers > import_specifier ::= 'hiding' name_list | qualified_spec name_list > qualified_spec ::= 'qualified' | 'qualified' 'as' name > }}} > > The top-level `maybe_name_list` would list all unqualified imports. If it is > omitted, and there are no `qualified_spec`s, then all names would be > imported unqualified. If it is omitted and there are one or more > `qualified_spec`s, then no names would be imported unqualified. > > Each `import_specifier` either adds qualified names (perhaps under a module > synonym) or removes names. Removing names with `hiding` removes those names > from the `qualified_spec` (or top-level `maybe_name_list`) immediately > preceding the `hiding`. > > The special `name_list` `*` (note that it is ''not'' in parentheses, to > avoid ambiguity) means "all names". > > This schema allows one import statement to import a mix of qualified and > unqualified names, and even allows using different module synonyms for > different sets of qualified names. The legacy `import` syntax could desugar > to this form, which seems strictly more expressive. For example: > > {{{ > import qualified Foo --> import Foo qualified * > import qualified Bar as B --> import Bar qualified as B * > import Baz hiding (wurble) --> import Baz hiding (wurble) > }}} > > Thoughts? > > Richard > > On Jun 3, 2015, at 1:31 PM, Adam Bergmark wrote: > > +1, I thought of the exact same syntax at some point. > > On Wed, Jun 3, 2015 at 7:18 PM, Michael Snoyman wrote: >> >> That's nifty. Just about every module in the project I'm working on now >> has two lines like the former (and the same for Set). I like the new syntax, >> +1. >> >> On Wed, Jun 3, 2015 at 8:15 PM Anthony Cowley >> wrote: >>> >>> Hi Everyone, >>> >>> I didn't think this would see any resistance as it doesn't break >>> anything, but this is the internet, so, if you haven't already, take a >>> look at this GHC feature request >>> >>> >>> The idea is that rather than writing, >>> >>> import Data.Map (Map) >>> import qualified Data.Map as M >>> >>> you could instead write, >>> >>> import Data.Map (Map) as M >>> >>> The Map identifier would imported unqualified, while M would be >>> introduced as an alias for the qualified import of Data.Map. >>> >>> Note that, currently, following a parenthesized group with the "as" >>> keyword is a parse error. So allowing this syntax would not affect any >>> currently working programs. >>> >>> I've mentioned this proposal before and gotten good response, so I >>> finally wrote it up last night after people on IRC responded >>> positively to it. As well as IRC and trac, I put the link up on >>> Twitter to get it in front of a large audience, and here's what we >>> have after a bit over 12 hours (not counting the handful of supporters >>> in IRC): >>> >>> +20 >>> -2 >>> >>> You can see the tweet at >>> >>> >>> I'll try to summarize the two negative votes: 1) This isn't that big a >>> burden, and we should instead focus on controlled export of class >>> instances; and 2) We should instead focus on exporting name spaces, >>> and that the ordering of parentheses and the "as" keyword is too close >>> to the existing "import Foo as F(foo)" syntax. >>> >>> Since there are these negative votes, I think it best if as many >>> people as possible at least see the proposal so the GHC developers can >>> get a better sense for the overall response. >>> >>> Anthony >>> _______________________________________________ >>> Haskell-Cafe mailing list >>> Haskell-Cafe at haskell.org >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > From acowley at seas.upenn.edu Wed Jun 3 19:07:45 2015 From: acowley at seas.upenn.edu (Anthony Cowley) Date: Wed, 3 Jun 2015 15:07:45 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <87y4k04om0.fsf@andromedae.feelingofgreen.ru> References: <87y4k04om0.fsf@andromedae.feelingofgreen.ru> Message-ID: On Wed, Jun 3, 2015 at 2:45 PM, Kosyrev Serge <_deepfire at feelingofgreen.ru> wrote: > amindfv at gmail.com writes: >> I'd be +1 provided we can write e.g.: >> >> import Data.Map (Map) as M (fromList) >> >> And then we'd get only the Map type and M.fromList > > Then wouldn't it also make sense to also: > > 1. eliminate the arguably confusing double-import through as-without-qualified: > > import FQMN as M .. (which imports the exportlist of FQMN twice) > > Does a lot of code use that? Is this a good practice? Do we want > to encourage this kind of usage? > > 2. and take advantage of the reduced complexity by implying > "qualified", wheneved "as" is present, by replacing: > > import qualified FQMN as M ? > > with > > import FQMN as M ? > > 3. effectively drop the "qualified" keyword from use (can be done lazily) > > It would break things, though. > This (2) is what I would want to do, too, ideally. However, the breakage really makes it inviable. I tried to quantify the use of the other syntax in another email. I grepped through the source of all the packages in the Stackage Nightly package set and found that less 0.3% of imports use that syntax. It's a small number, but it's not zero, so the breakage would be unacceptable. However, I do think the number is small enough the potential confusion due to syntax similarity is not a huge concern, but that's a subjective anticipation of a possible future and some people will disagree. Anthony From eir at cis.upenn.edu Wed Jun 3 19:49:02 2015 From: eir at cis.upenn.edu (Richard Eisenberg) Date: Wed, 3 Jun 2015 15:49:02 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <05505243-26E6-438C-A172-6B77662552BA@cis.upenn.edu> Message-ID: Thanks for providing the numbers -- it's always helpful to keep in mind how common an idiom is. I would like to point out that my proposal *is* meant to be fully backward-compatible. I just didn't put the backward-compatible bits in the grammar I laid out, because I thought they would obscure the point. The existing syntax would remain, entirely unchanged. Richard On Jun 3, 2015, at 3:01 PM, Anthony Cowley wrote: > On Wed, Jun 3, 2015 at 1:43 PM, Richard Eisenberg wrote: >> I have to say I'm a big -1 on the proposed syntax -- it's awfully confusing >> to have the import list mean something entirely different before the `as` >> compared to after the `as`. I proposed a different syntax on the ticket >> (https://ghc.haskell.org/trac/ghc/ticket/10478#comment:3), which I paste >> here for ease of access. > > Calling this "awfully confusing" is dramatically overstating things. A > quick grep over all of the Stackage package set sources suggests that > the "import Foo as F (foo)" syntax is used in less than 0.3% of all > import statements. If the rule that the "explicit import list is > always imported unqualified" really is too confusing (even though it > is the current rule), you could guess wrong every time and only > misunderstand three out of a thousand imports you encounter in the > wild. > > I think this is a tiny tail wagging an otherwise healthy dog. That we > can get rid of the word "qualified" for a common case without breaking > anything seems like a clear win to me. But I appreciate some people > disagree, which is why I thought it was important to make the broad > support visible rather than surprise anyone. If there is enough > opposition (we're around 25-3 at the moment), we can let the sleeping > dog lie. > > As to the alternative proposal, I'm less positive on it as it seems > unnecessarily verbose given the original option, and the fact that, as > presented, it breaks existing code makes it a non-starter. > > Anthony > > > >> >> --- >> I'm in favor of abbreviating the syntax in this common scenario, but I don't >> like your choice of syntax, I'm afraid. It would give >> >> {{{ >> import Data.Map (Map) as M -- (1) >> }}} >> >> a very different meaning from >> >> {{{ >> import Data.Map as M (Map) -- (2) >> }}} >> >> (1) imports all of `Data.Map`, qualified with the alias `M`, and imports the >> name `Map` unqualified. (2) imports only the name `Map` (unqualified) while >> also aliasing `Data.Map`. >> Having these two coexist seems like we're asking users to be confused. >> >> What about >> >> {{{ >> import Data.Map (Map) >> qualified as M * >> }}} >> >> ? >> >> The general schema, which replaces the current syntax. This schema does not >> permit some current syntax, but it would be easy to extend it to be >> backward-compatible. I've chosen not to for this presentation to avoid >> clutter. >> >> {{{ >> import_statement ::= 'import' module_name maybe_name_list import_specifiers >> module_name ::= ... >> maybe_name_list ::= name_list | >> name_list ::= '(' names ')' | '*' >> import_specifiers ::= | import_specifier import_specifiers >> import_specifier ::= 'hiding' name_list | qualified_spec name_list >> qualified_spec ::= 'qualified' | 'qualified' 'as' name >> }}} >> >> The top-level `maybe_name_list` would list all unqualified imports. If it is >> omitted, and there are no `qualified_spec`s, then all names would be >> imported unqualified. If it is omitted and there are one or more >> `qualified_spec`s, then no names would be imported unqualified. >> >> Each `import_specifier` either adds qualified names (perhaps under a module >> synonym) or removes names. Removing names with `hiding` removes those names >> from the `qualified_spec` (or top-level `maybe_name_list`) immediately >> preceding the `hiding`. >> >> The special `name_list` `*` (note that it is ''not'' in parentheses, to >> avoid ambiguity) means "all names". >> >> This schema allows one import statement to import a mix of qualified and >> unqualified names, and even allows using different module synonyms for >> different sets of qualified names. The legacy `import` syntax could desugar >> to this form, which seems strictly more expressive. For example: >> >> {{{ >> import qualified Foo --> import Foo qualified * >> import qualified Bar as B --> import Bar qualified as B * >> import Baz hiding (wurble) --> import Baz hiding (wurble) >> }}} >> >> Thoughts? >> >> Richard >> >> On Jun 3, 2015, at 1:31 PM, Adam Bergmark wrote: >> >> +1, I thought of the exact same syntax at some point. >> >> On Wed, Jun 3, 2015 at 7:18 PM, Michael Snoyman wrote: >>> >>> That's nifty. Just about every module in the project I'm working on now >>> has two lines like the former (and the same for Set). I like the new syntax, >>> +1. >>> >>> On Wed, Jun 3, 2015 at 8:15 PM Anthony Cowley >>> wrote: >>>> >>>> Hi Everyone, >>>> >>>> I didn't think this would see any resistance as it doesn't break >>>> anything, but this is the internet, so, if you haven't already, take a >>>> look at this GHC feature request >>>> >>>> >>>> The idea is that rather than writing, >>>> >>>> import Data.Map (Map) >>>> import qualified Data.Map as M >>>> >>>> you could instead write, >>>> >>>> import Data.Map (Map) as M >>>> >>>> The Map identifier would imported unqualified, while M would be >>>> introduced as an alias for the qualified import of Data.Map. >>>> >>>> Note that, currently, following a parenthesized group with the "as" >>>> keyword is a parse error. So allowing this syntax would not affect any >>>> currently working programs. >>>> >>>> I've mentioned this proposal before and gotten good response, so I >>>> finally wrote it up last night after people on IRC responded >>>> positively to it. As well as IRC and trac, I put the link up on >>>> Twitter to get it in front of a large audience, and here's what we >>>> have after a bit over 12 hours (not counting the handful of supporters >>>> in IRC): >>>> >>>> +20 >>>> -2 >>>> >>>> You can see the tweet at >>>> >>>> >>>> I'll try to summarize the two negative votes: 1) This isn't that big a >>>> burden, and we should instead focus on controlled export of class >>>> instances; and 2) We should instead focus on exporting name spaces, >>>> and that the ordering of parentheses and the "as" keyword is too close >>>> to the existing "import Foo as F(foo)" syntax. >>>> >>>> Since there are these negative votes, I think it best if as many >>>> people as possible at least see the proposal so the GHC developers can >>>> get a better sense for the overall response. >>>> >>>> Anthony >>>> _______________________________________________ >>>> Haskell-Cafe mailing list >>>> Haskell-Cafe at haskell.org >>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>> >>> >>> _______________________________________________ >>> Haskell-Cafe mailing list >>> Haskell-Cafe at haskell.org >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>> >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> >> >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> From shumovichy at gmail.com Wed Jun 3 19:53:29 2015 From: shumovichy at gmail.com (Yuras Shumovich) Date: Wed, 03 Jun 2015 22:53:29 +0300 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: Message-ID: <1433361209.18957.7.camel@gmail.com> On Wed, 2015-06-03 at 13:15 -0400, Anthony Cowley wrote: > I'll try to summarize the two negative votes: 1) This isn't that big a > burden, and we should instead focus on controlled export of class > instances; and 2) We should instead focus on exporting name spaces, > and that the ordering of parentheses and the "as" keyword is too close > to the existing "import Foo as F(foo)" syntax. Hello, You counted me as -1, but I'm not against the proposal. I just expressed my concerns in the my comment on Trac. Actually I'd prefer "import Foo as F(foo)" to import "foo" qualified. Too often I write such import by mistake (missing "qualified"), and get compilation error later. Unfortunately it will break code. Thanks, Yuras. > > Since there are these negative votes, I think it best if as many > people as possible at least see the proposal so the GHC developers can > get a better sense for the overall response. > > Anthony > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe From dct25-561bs at mythic-beasts.com Wed Jun 3 20:05:35 2015 From: dct25-561bs at mythic-beasts.com (David Turner) Date: Wed, 3 Jun 2015 21:05:35 +0100 Subject: [Haskell-cafe] Consecutive FFI calls In-Reply-To: <1433357750-sup-1872@sabre> References: <1433357750-sup-1872@sabre> Message-ID: Excellent, thanks! On 3 Jun 2015 7:58 pm, "Edward Z. Yang" wrote: > The ordering is guaranteed, because full synchronization is used > when threads migrate. (It goes something like, a capability with > a full run queue grabs all idle capabilities, distributes its > threads to those capabilities, and then releases them. The act > of acquiring and releasing a capability is a synchronization point.) > > Cheers, > Edward > > Excerpts from David Turner's message of 2015-05-28 09:24:50 -0700: > > Hi, > > > > If I make a sequence of FFI calls (on a single Haskell thread) but > > which end up being called from different OS threads, is there any kind > > of ordering guarantee given? More specifically, is there a full memory > > barrier at the point where a Haskell thread migrates to a new OS > > thread? > > > > Many thanks, > > > > David > -------------- next part -------------- An HTML attachment was scrubbed... URL: From _deepfire at feelingofgreen.ru Wed Jun 3 21:11:20 2015 From: _deepfire at feelingofgreen.ru (Kosyrev Serge) Date: Thu, 04 Jun 2015 00:11:20 +0300 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: (sfid-20150603_232245_303769_F5E53B4C) (Anthony Cowley's message of "Wed, 3 Jun 2015 15:07:45 -0400") References: <87y4k04om0.fsf@andromedae.feelingofgreen.ru> Message-ID: <87oakw4hvr.fsf_-_@andromedae.feelingofgreen.ru> Anthony Cowley writes: > On Wed, Jun 3, 2015 at 2:45 PM, Kosyrev Serge > <_deepfire at feelingofgreen.ru> wrote: >> Then wouldn't it also make sense to also: >> >> 1. eliminate the arguably confusing double-import through as-without-qualified: >> >> import FQMN as M .. (which imports the exportlist of FQMN twice) >> >> Does a lot of code use that? Is this a good practice? Do we want >> to encourage this kind of usage? >> >> 2. and take advantage of the reduced complexity by implying >> "qualified", wheneved "as" is present, by replacing: >> >> import qualified FQMN as M ? >> >> with >> >> import FQMN as M ? >> >> 3. effectively drop the "qualified" keyword from use (can be done lazily) >> >> It would break things, though. >> > > This (2) is what I would want to do, too, ideally. However, the > breakage really makes it inviable. > > I tried to quantify the use of the other syntax in another email. I > grepped through the source of all the packages in the Stackage Nightly > package set and found that less 0.3% of imports use that syntax. It's > a small number, but it's not zero, so the breakage would be > unacceptable. One can look at it this way -- the breakage is a fixed, one-time cost, whereas the confusion has a running cost. So in the end, the real question is what is our planning horizon. -- respectfully, ??????? ?????? From rasen.dubi at gmail.com Thu Jun 4 00:43:02 2015 From: rasen.dubi at gmail.com (Alexey Shmalko) Date: Thu, 4 Jun 2015 03:43:02 +0300 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <87oakw4hvr.fsf_-_@andromedae.feelingofgreen.ru> References: <87y4k04om0.fsf@andromedae.feelingofgreen.ru> <87oakw4hvr.fsf_-_@andromedae.feelingofgreen.ru> Message-ID: I like Richard's syntax more. The only note is that I'd like to omit asterisk when it's last in line. Then the only case when * should be stated is something semantically similar to import Foo as F (which I found silly anyway). Here are more examples: import Foo qualified --> import qualified Foo import Foo qualified as F --> import qualified Foo as F import Foo (foo) qualified as F --> import Foo as F (foo) import Foo * qualified as F --> import Foo as F It doesn't seem to break backward compatibility for me (am I wrong?). This syntax also fixes alignment of module names in import list. You don't need to align anything because all module names are right after "import". From rf at rufflewind.com Thu Jun 4 02:24:57 2015 From: rf at rufflewind.com (Phil Ruffwind) Date: Wed, 3 Jun 2015 22:24:57 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <87oakw4hvr.fsf_-_@andromedae.feelingofgreen.ru> References: <87y4k04om0.fsf@andromedae.feelingofgreen.ru> <87oakw4hvr.fsf_-_@andromedae.feelingofgreen.ru> Message-ID: > One can look at it this way -- the breakage is a fixed, one-time cost, > whereas the confusion has a running cost. It's not necessarily that simple. Breaking old code can also breaks all the tutorials, articles, and documentation scattered all over the Internet. That cost could last a long time. AFAIK Haskell hasn't done anything so drastic as to change the existing syntax, except to _remove_ things that were already strongly discouraged like n+k. It will also introduce confusion of a different kind, as programmers will find it strange that their formerly correct code code having suddenly changed semantics. Personally I look forward to having to waste fewer keystrokes on the dreaded import list. Having to explicitly write 'qualified' in acrowley's syntax would be less desirable, though still an overall improvement from the current state of things. From spam at scientician.net Thu Jun 4 04:17:07 2015 From: spam at scientician.net (Bardur Arantsson) Date: Thu, 04 Jun 2015 06:17:07 +0200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <87y4k04om0.fsf@andromedae.feelingofgreen.ru> <87oakw4hvr.fsf_-_@andromedae.feelingofgreen.ru> Message-ID: On 06/04/2015 04:24 AM, Phil Ruffwind wrote: >> One can look at it this way -- the breakage is a fixed, one-time cost, >> whereas the confusion has a running cost. > > It's not necessarily that simple. Breaking old code can also breaks > all the tutorials, articles, and documentation scattered all over the > Internet. That cost could last a long time. AFAIK Haskell hasn't > done anything so drastic as to change the existing syntax, except to > _remove_ things that were already strongly discouraged like n+k. It > will also introduce confusion of a different kind, as programmers will > find it strange that their formerly correct code code having suddenly > changed semantics. > Of course we should take such concerns seriously, but given the rarity of such usage it would seem to indicate that not many people are using the "problematic" syntax in practice... which could be an indication that a) haven't learned/copy&pasted it from a tutorial/book, and/or b) haven't found it useful even if they *did* learn/copy&paste from a tutorial/book. So there's that... > Personally I look forward to having to waste fewer keystrokes on the > dreaded import list. Having to explicitly write 'qualified' in > acrowley's syntax would be less desirable, though still an overall > improvement from the current state of things. My only worry here would be that the logical conclusion to this is you end up with a language which can only ever go towards a *local* optimimum. Regards, From spam at scientician.net Thu Jun 4 04:22:37 2015 From: spam at scientician.net (Bardur Arantsson) Date: Thu, 04 Jun 2015 06:22:37 +0200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <87y4k04om0.fsf@andromedae.feelingofgreen.ru> <87oakw4hvr.fsf_-_@andromedae.feelingofgreen.ru> Message-ID: On 06/04/2015 06:17 AM, Bardur Arantsson wrote: > On 06/04/2015 04:24 AM, Phil Ruffwind wrote: >>> One can look at it this way -- the breakage is a fixed, one-time cost, >>> whereas the confusion has a running cost. >> >> It's not necessarily that simple. Breaking old code can also breaks >> all the tutorials, articles, and documentation scattered all over the >> Internet. That cost could last a long time. AFAIK Haskell hasn't >> done anything so drastic as to change the existing syntax, except to >> _remove_ things that were already strongly discouraged like n+k. It >> will also introduce confusion of a different kind, as programmers will >> find it strange that their formerly correct code code having suddenly >> changed semantics. >> > > Of course we should take such concerns seriously, but given the rarity > of such usage it would seem to indicate that not many people are using > the "problematic" syntax in practice... which could be an indication > that a) haven't learned/copy&pasted it from a tutorial/book, and/or b) > haven't found it useful even if they *did* learn/copy&paste from a > tutorial/book. > > So there's that... > Dangit, just ignore this bit. I misread what the 0.3% thing applied to in Anthony Cowley's email. From _deepfire at feelingofgreen.ru Thu Jun 4 14:43:36 2015 From: _deepfire at feelingofgreen.ru (Kosyrev Serge) Date: Thu, 04 Jun 2015 17:43:36 +0300 Subject: [Haskell-cafe] UNS: Re: Proposal: Shorter Import Syntax In-Reply-To: (sfid-20150604_045757_305707_3A09DFAD) (Alexey Shmalko's message of "Thu, 4 Jun 2015 03:43:02 +0300") References: <87y4k04om0.fsf@andromedae.feelingofgreen.ru> <87oakw4hvr.fsf_-_@andromedae.feelingofgreen.ru> Message-ID: <87d21b4jqf.fsf@andromedae.feelingofgreen.ru> Alexey Shmalko writes: > I like Richard's syntax more. The only note is that I'd like to omit > asterisk when it's last in line. Then the only case when * should be > stated is something semantically similar to > > import Foo as F > > (which I found silly anyway). > > Here are more examples: > import Foo qualified --> import qualified Foo > import Foo qualified as F --> import qualified Foo as F > import Foo (foo) qualified as F --> import Foo as F (foo) > import Foo * qualified as F --> import Foo as F This looks far more comprehensible to me as well, precisely because I feel like I can assign stable meaning to the words. > It doesn't seem to break backward compatibility for me (am I wrong?). > > This syntax also fixes alignment of module names in import list. You > don't need to align anything because all module names are right after > "import". -- respectfully, ??????? ?????? From acowley at seas.upenn.edu Thu Jun 4 18:14:00 2015 From: acowley at seas.upenn.edu (Anthony Cowley) Date: Thu, 4 Jun 2015 14:14:00 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <1433361209.18957.7.camel@gmail.com> References: <1433361209.18957.7.camel@gmail.com> Message-ID: Sorry, Yuras! I wanted to make sure the dissenting voices were heard. The current vote count is ~28-4. It seems like we're on the precipice of a fatal bike shedding, so I'm counting all the votes for keeping "quantified" as negative (as that's what Richard stated for himself), and trying to be conservative counting the +1's. I hope that's enough of a majority. To put things in perspective again, the Stackage package set has 10x as many qualified imports as unqualified imports that use the "as" keyword. The point here is to slightly smooth things out for the 10-1 majority case. While I do appreciate that these two lines can potentially be mistaken for each other, import Map as M (fromList) import Map (fromList) as M I think the movement of the explicit import group is quite visibly striking, and, as previously noted, you could misread the former every time and only misunderstand 0.3% of import statements you read. Preserving the "qualified" keyword is better than no change at all, but is, I think, gratuitous preservation of a minor wart. Given the support for the original proposal, I'd hate to snatch defeat from the jaws of victory here. Anthony On Wed, Jun 3, 2015 at 3:53 PM, Yuras Shumovich wrote: > On Wed, 2015-06-03 at 13:15 -0400, Anthony Cowley wrote: >> I'll try to summarize the two negative votes: 1) This isn't that big a >> burden, and we should instead focus on controlled export of class >> instances; and 2) We should instead focus on exporting name spaces, >> and that the ordering of parentheses and the "as" keyword is too close >> to the existing "import Foo as F(foo)" syntax. > > Hello, > > You counted me as -1, but I'm not against the proposal. I just expressed > my concerns in the my comment on Trac. > > Actually I'd prefer "import Foo as F(foo)" to import "foo" qualified. > Too often I write such import by mistake (missing "qualified"), and get > compilation error later. Unfortunately it will break code. > > Thanks, > Yuras. > >> >> Since there are these negative votes, I think it best if as many >> people as possible at least see the proposal so the GHC developers can >> get a better sense for the overall response. >> >> Anthony >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > From spam at scientician.net Thu Jun 4 20:23:26 2015 From: spam at scientician.net (Bardur Arantsson) Date: Thu, 04 Jun 2015 22:23:26 +0200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <1433361209.18957.7.camel@gmail.com> Message-ID: On 06/04/2015 08:14 PM, Anthony Cowley wrote: > Sorry, Yuras! I wanted to make sure the dissenting voices were heard. > > The current vote count is ~28-4. It seems like we're on the precipice > of a fatal bike shedding, so I'm counting all the votes for keeping > "quantified" as negative (as that's what Richard stated for himself), > and trying to be conservative counting the +1's. I hope that's enough > of a majority. > > To put things in perspective again, the Stackage package set has 10x > as many qualified imports as unqualified imports that use the "as" > keyword. The point here is to slightly smooth things out for the 10-1 > majority case. > > While I do appreciate that these two lines can potentially be mistaken > for each other, > > import Map as M (fromList) > import Map (fromList) as M > > I think the movement of the explicit import group is quite visibly > striking, and, as previously noted, you could misread the former every > time and only misunderstand 0.3% of import statements you read. > > Preserving the "qualified" keyword is better than no change at all, > but is, I think, gratuitous preservation of a minor wart. Given the > support for the original proposal, I'd hate to snatch defeat from the > jaws of victory here. > (I thought I'd posted this earlier, but I guess not from my news reader's idea of concensus reality as decided by GMANE.org.) +1 to whatever syntax is decided upon as long as it doesn't break too much existing code (i.e. published/Hackage code). Down with bikeshedding for its own sake! :) That said, I agree with "qualified" being a bit annoying, but overall I think I've come around to the viewpoint that gradual evolution is probably better in this specific case -- at some point (maybe the year 20x5) it might be the case that everyone is using the new syntax and old syntax could be dropped over a few deprecation cycles. Ideally, that's what *should* happen if the change is compelling enough! Regards, From hvr at gnu.org Thu Jun 4 20:46:26 2015 From: hvr at gnu.org (Herbert Valerio Riedel) Date: Thu, 04 Jun 2015 22:46:26 +0200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: (Bardur Arantsson's message of "Thu, 04 Jun 2015 22:23:26 +0200") References: <1433361209.18957.7.camel@gmail.com> Message-ID: <87wpzj5hi5.fsf@gnu.org> On 2015-06-04 at 22:23:26 +0200, Bardur Arantsson wrote: [...] >> Preserving the "qualified" keyword is better than no change at all, >> but is, I think, gratuitous preservation of a minor wart. Given the >> support for the original proposal, I'd hate to snatch defeat from the >> jaws of victory here. >> > > (I thought I'd posted this earlier, but I guess not from my news > reader's idea of concensus reality as decided by GMANE.org.) > > +1 to whatever syntax is decided upon as long as it doesn't break too > much existing code (i.e. published/Hackage code). Down with bikeshedding > for its own sake! :) > [..] Clearly, this new syntax won't be available by default when only {-# LANGUAGE Haskell2010 #-} is active. So I assume this is going to be a new language extension enabled by a new to-be-named LANGUAGE-pragma (and if it stands the test of time, be enabled by default in, say {-# LANGUAGE Haskell2020 #-})? If so, why is it a concern if there's code breakage, as this new syntax will be an explicit opt-in? Cheers, hvr From rasen.dubi at gmail.com Thu Jun 4 21:05:42 2015 From: rasen.dubi at gmail.com (Alexey Shmalko) Date: Thu, 04 Jun 2015 21:05:42 +0000 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <87wpzj5hi5.fsf@gnu.org> References: <1433361209.18957.7.camel@gmail.com> <87wpzj5hi5.fsf@gnu.org> Message-ID: If I understand correctly, the initial proposal was to enable the new syntax by default and it mustn't break any code (full backward-compatible). On Thu, Jun 4, 2015 at 11:46 PM Herbert Valerio Riedel wrote: > On 2015-06-04 at 22:23:26 +0200, Bardur Arantsson wrote: > > [...] > > >> Preserving the "qualified" keyword is better than no change at all, > >> but is, I think, gratuitous preservation of a minor wart. Given the > >> support for the original proposal, I'd hate to snatch defeat from the > >> jaws of victory here. > >> > > > > (I thought I'd posted this earlier, but I guess not from my news > > reader's idea of concensus reality as decided by GMANE.org.) > > > > +1 to whatever syntax is decided upon as long as it doesn't break too > > much existing code (i.e. published/Hackage code). Down with bikeshedding > > for its own sake! :) > > [..] > > Clearly, this new syntax won't be available by default when only > > {-# LANGUAGE Haskell2010 #-} > > is active. So I assume this is going to be a new language extension > enabled by a new to-be-named LANGUAGE-pragma (and if it stands the test > of time, be enabled by default in, say {-# LANGUAGE Haskell2020 #-})? If > so, why is it a concern if there's code breakage, as this new syntax > will be an explicit opt-in? > > Cheers, > hvr > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From spam at scientician.net Thu Jun 4 21:10:28 2015 From: spam at scientician.net (Bardur Arantsson) Date: Thu, 04 Jun 2015 23:10:28 +0200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <1433361209.18957.7.camel@gmail.com> <87wpzj5hi5.fsf@gnu.org> Message-ID: On 06/04/2015 11:05 PM, Alexey Shmalko wrote: > If I understand correctly, the initial proposal was to enable the new > syntax by default and it mustn't break any code (full backward-compatible). > Yes, indeed. ... and personally, I *don't* necessarily think that an -X flag is the solution. I think something along the lines of "gofix" (see https://golang.org/cmd/fix/) could actually do the second part of this transition, if we want to drop the "qualified" bit and the consequences are unambiguous in 20x5. Regards, From acowley at seas.upenn.edu Thu Jun 4 21:20:07 2015 From: acowley at seas.upenn.edu (Anthony Cowley) Date: Thu, 4 Jun 2015 17:20:07 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <87wpzj5hi5.fsf@gnu.org> References: <1433361209.18957.7.camel@gmail.com> <87wpzj5hi5.fsf@gnu.org> Message-ID: <8FB5DAB3-C158-4C79-ABF5-438FF05821F4@seas.upenn.edu> > On Jun 4, 2015, at 4:46 PM, Herbert Valerio Riedel wrote: > > On 2015-06-04 at 22:23:26 +0200, Bardur Arantsson wrote: > > [...] > >>> Preserving the "qualified" keyword is better than no change at all, >>> but is, I think, gratuitous preservation of a minor wart. Given the >>> support for the original proposal, I'd hate to snatch defeat from the >>> jaws of victory here. >> >> (I thought I'd posted this earlier, but I guess not from my news >> reader's idea of concensus reality as decided by GMANE.org.) >> >> +1 to whatever syntax is decided upon as long as it doesn't break too >> much existing code (i.e. published/Hackage code). Down with bikeshedding >> for its own sake! :) >> [..] > > Clearly, this new syntax won't be available by default when only > > {-# LANGUAGE Haskell2010 #-} > > is active. So I assume this is going to be a new language extension > enabled by a new to-be-named LANGUAGE-pragma (and if it stands the test > of time, be enabled by default in, say {-# LANGUAGE Haskell2020 #-})? If > so, why is it a concern if there's code breakage, as this new syntax > will be an explicit opt-in? > > Cheers, > hvr 1) Most language extensions allow new syntax, but don't break existing code. To the extent that there is breakage, it is vastly more minimal than something like disallowing the "qualified" keyword. The original proposal sticks with that tradition: nothing breaks, more is allowed. 2) The notion that Haskell has a standard is a needless drag on usage of the language. GHC can, and probably should, have a compatibility mode for historical reasons, but the language standard hasn't been touched in five years, and the last edition consisted of minor changes to what is now a 17 year old standard. There is no language committee, and no manifest expectation of updating the standard. There is a single compiler in wide use, and common use of that compiler involves manually enabling half a dozen extensions. C++ manages an infinitely healthier update process despite living in a war zone between competing interests. We are simply plagued by intransigence. 3) Enough people disagree with point 2 that ShortImports would be needed as an extension. Anthony From hvr at gnu.org Thu Jun 4 21:22:37 2015 From: hvr at gnu.org (Herbert Valerio Riedel) Date: Thu, 04 Jun 2015 23:22:37 +0200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: (Alexey Shmalko's message of "Thu, 04 Jun 2015 21:05:42 +0000") References: <1433361209.18957.7.camel@gmail.com> <87wpzj5hi5.fsf@gnu.org> Message-ID: <87pp5b5ftu.fsf@gnu.org> On 2015-06-04 at 23:05:42 +0200, Alexey Shmalko wrote: > If I understand correctly, the initial proposal was to enable the new > syntax by default and it mustn't break any code (full > backward-compatible). That would be a departure from how language extensions were handled in GHC in the past afaik, and if there's no language pragma to toggle this new syntax, Cabal has no way to know that a new language syntax is required and that thereby needs exclude (not implemented yet) the affected package versions from the install-plan configuration space. Cheers, hvr From acowley at seas.upenn.edu Thu Jun 4 21:36:01 2015 From: acowley at seas.upenn.edu (Anthony Cowley) Date: Thu, 4 Jun 2015 17:36:01 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <87pp5b5ftu.fsf@gnu.org> References: <1433361209.18957.7.camel@gmail.com> <87wpzj5hi5.fsf@gnu.org> <87pp5b5ftu.fsf@gnu.org> Message-ID: > On Jun 4, 2015, at 5:22 PM, Herbert Valerio Riedel wrote: > >> On 2015-06-04 at 23:05:42 +0200, Alexey Shmalko wrote: >> If I understand correctly, the initial proposal was to enable the new >> syntax by default and it mustn't break any code (full >> backward-compatible). > > That would be a departure from how language extensions were handled in > GHC in the past afaik, and if there's no language pragma to toggle this > new syntax, Cabal has no way to know that a new language syntax is > required and that thereby needs exclude (not implemented yet) the > affected package versions from the install-plan configuration space. I can't parse your last sentence. The proposed syntax is currently a parse error, so a package that used it could depend on a GHC new enough to support it (eg with a base version constraint). No older packages would cause any errors whatsoever. Anthony From allbery.b at gmail.com Thu Jun 4 21:41:38 2015 From: allbery.b at gmail.com (Brandon Allbery) Date: Thu, 4 Jun 2015 17:41:38 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <1433361209.18957.7.camel@gmail.com> <87wpzj5hi5.fsf@gnu.org> <87pp5b5ftu.fsf@gnu.org> Message-ID: On Thu, Jun 4, 2015 at 5:36 PM, Anthony Cowley wrote: > > > On Jun 4, 2015, at 5:22 PM, Herbert Valerio Riedel wrote: > > new syntax, Cabal has no way to know that a new language syntax is > > required and that thereby needs exclude (not implemented yet) the > > affected package versions from the install-plan configuration space. > > I can't parse your last sentence. The proposed syntax is currently a parse > error, so a package that used it could depend on a GHC new enough to > support it (eg with a base version constraint). No older packages would > cause any errors whatsoever. > Your unstated assumption is that everyone always has the latest ghc. How do people who are on, say, Debian or CentOS, deal with a language change that is not compatible with their compiler? How does cabal avoid pulling in package versions using the new incompatible syntax? -- brandon s allbery kf8nh sine nomine associates allbery.b at gmail.com ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at orlitzky.com Thu Jun 4 21:43:14 2015 From: michael at orlitzky.com (Michael Orlitzky) Date: Thu, 04 Jun 2015 17:43:14 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <1433361209.18957.7.camel@gmail.com> Message-ID: <5570C672.2050703@orlitzky.com> On 06/04/2015 02:14 PM, Anthony Cowley wrote: > Sorry, Yuras! I wanted to make sure the dissenting voices were heard. > > The current vote count is ~28-4. It seems like we're on the precipice > of a fatal bike shedding, so I'm counting all the votes for keeping > "quantified" as negative (as that's what Richard stated for himself), > and trying to be conservative counting the +1's. I hope that's enough > of a majority. > > To put things in perspective again, the Stackage package set has 10x > as many qualified imports as unqualified imports that use the "as" > keyword. The point here is to slightly smooth things out for the 10-1 > majority case. > > While I do appreciate that these two lines can potentially be mistaken > for each other, > > import Map as M (fromList) > import Map (fromList) as M > > I think the movement of the explicit import group is quite visibly > striking, and, as previously noted, you could misread the former every > time and only misunderstand 0.3% of import statements you read. > Here's what I don't like about this, although I'm not necessarily giving it the thumbs down. Currently, the parentheses come at the end of the line, like import Foo (bar) import qualified Foo as F (bar) So, when your import list gets huge, it's easy to break: import Foo ( bar1, bar2, ,,,, barN ) import qualified Foo as F ( baz1, baz2, ,,,, bazN ) With the new syntax, you have two towers of names: import Foo ( bar1, bar2, ..., barN ) as F ( -- This line is ugly and important and buried baz1, baz2, ... bazN ) From acowley at gmail.com Thu Jun 4 22:03:16 2015 From: acowley at gmail.com (Anthony Cowley) Date: Thu, 4 Jun 2015 18:03:16 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <1433361209.18957.7.camel@gmail.com> <87wpzj5hi5.fsf@gnu.org> <87pp5b5ftu.fsf@gnu.org> Message-ID: > On Jun 4, 2015, at 5:41 PM, Brandon Allbery wrote: > >> On Thu, Jun 4, 2015 at 5:36 PM, Anthony Cowley wrote: >> > On Jun 4, 2015, at 5:22 PM, Herbert Valerio Riedel wrote: >> > new syntax, Cabal has no way to know that a new language syntax is >> > required and that thereby needs exclude (not implemented yet) the >> > affected package versions from the install-plan configuration space. >> >> I can't parse your last sentence. The proposed syntax is currently a parse error, so a package that used it could depend on a GHC new enough to support it (eg with a base version constraint). No older packages would cause any errors whatsoever. > > Your unstated assumption is that everyone always has the latest ghc. > > How do people who are on, say, Debian or CentOS, deal with a language change that is not compatible with their compiler? How does cabal avoid pulling in package versions using the new incompatible syntax? > I guess I'm just not familiar with how Debian and CentOS work, because this doesn't seem like a change to me, but you and hvr have much more experience than I do. How do those systems deal with a package that has a lower bound on base? If I require base >= 7.9, does that get thrown out to work with GHC 7.4? How does that work? Anthony > -- > brandon s allbery kf8nh sine nomine associates > allbery.b at gmail.com ballbery at sinenomine.net > unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From acowley at seas.upenn.edu Thu Jun 4 22:04:21 2015 From: acowley at seas.upenn.edu (Anthony Cowley) Date: Thu, 4 Jun 2015 18:04:21 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <1433361209.18957.7.camel@gmail.com> <87wpzj5hi5.fsf@gnu.org> <87pp5b5ftu.fsf@gnu.org> Message-ID: <46BC394E-55FE-4979-8940-6E787BEBBA88@seas.upenn.edu> > On Jun 4, 2015, at 5:41 PM, Brandon Allbery wrote: > >> On Thu, Jun 4, 2015 at 5:36 PM, Anthony Cowley wrote: >> > On Jun 4, 2015, at 5:22 PM, Herbert Valerio Riedel wrote: >> > new syntax, Cabal has no way to know that a new language syntax is >> > required and that thereby needs exclude (not implemented yet) the >> > affected package versions from the install-plan configuration space. >> >> I can't parse your last sentence. The proposed syntax is currently a parse error, so a package that used it could depend on a GHC new enough to support it (eg with a base version constraint). No older packages would cause any errors whatsoever. > > Your unstated assumption is that everyone always has the latest ghc. > > How do people who are on, say, Debian or CentOS, deal with a language change that is not compatible with their compiler? How does cabal avoid pulling in package versions using the new incompatible syntax? > I guess I'm just not familiar with how Debian and CentOS work, because this doesn't seem like a change to me, but you and hvr have much more experience than I do. How do those systems deal with a package that has a lower bound on base? If I require base >= 7.9, does that get thrown out to work with GHC 7.4? How does that work? Anthony -------------- next part -------------- An HTML attachment was scrubbed... URL: From allbery.b at gmail.com Thu Jun 4 22:25:38 2015 From: allbery.b at gmail.com (Brandon Allbery) Date: Thu, 4 Jun 2015 18:25:38 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <1433361209.18957.7.camel@gmail.com> <87wpzj5hi5.fsf@gnu.org> <87pp5b5ftu.fsf@gnu.org> Message-ID: On Thu, Jun 4, 2015 at 6:03 PM, Anthony Cowley wrote: > If I require base >= 7.9, does that get thrown out to work with GHC 7.4? > How does that work? So... to declare that I am using a new language construct, I place a bound on base. I'm sure this makes sense to someone, somewhere.... -- brandon s allbery kf8nh sine nomine associates allbery.b at gmail.com ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From acowley at seas.upenn.edu Thu Jun 4 22:45:10 2015 From: acowley at seas.upenn.edu (Anthony Cowley) Date: Thu, 4 Jun 2015 18:45:10 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <1433361209.18957.7.camel@gmail.com> <87wpzj5hi5.fsf@gnu.org> <87pp5b5ftu.fsf@gnu.org> Message-ID: On Thu, Jun 4, 2015 at 6:25 PM, Brandon Allbery wrote: > On Thu, Jun 4, 2015 at 6:03 PM, Anthony Cowley wrote: >> >> If I require base >= 7.9, does that get thrown out to work with GHC 7.4? >> How does that work? > > > So... to declare that I am using a new language construct, I place a bound > on base. > > I'm sure this makes sense to someone, somewhere.... Let's please step back, 1) I said we'd need a LANGUAGE pragma in response to hvr 2) A question was asked about enabling it by default 3) hvr said this would need a way of letting cabal know not to build it 4) I said it could be signaled with a bound on base 5) You said this assumed everyone had the latest GHC Your response was a non sequitur. As it happens, if you have code that hits a bug in GHC, then a pretty effective way of ensuring that cabal-install doesn't try to build it with an older GHC is to put a lower bound on base. I'm sorry if that is offensive. Anthony From spam at scientician.net Thu Jun 4 23:15:49 2015 From: spam at scientician.net (Bardur Arantsson) Date: Fri, 05 Jun 2015 01:15:49 +0200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <1433361209.18957.7.camel@gmail.com> <87wpzj5hi5.fsf@gnu.org> <87pp5b5ftu.fsf@gnu.org> Message-ID: On 06/04/2015 11:41 PM, Brandon Allbery wrote: > On Thu, Jun 4, 2015 at 5:36 PM, Anthony Cowley > wrote: >> Meta-point: Can we please stop cc'ing everyone on everything? It's getting pretty annoying and "reply-to-list" should be available in every decent e-mail client. Sure, if someone explicitly states that they aren't on the list, please do CC them, but that *not* the common case, so please act accordingly. (I'm getting a lot of "duplicates" because I'm already "silently" subscribed for a variety of mailing lists, but I use gmane.org to maintain sanity.) Regards, From kyagrd at gmail.com Fri Jun 5 03:29:50 2015 From: kyagrd at gmail.com (Ki Yung Ahn) Date: Thu, 04 Jun 2015 20:29:50 -0700 Subject: [Haskell-cafe] The evil GADTs extension in ghci 7.8.4 (maybe in other versions too?) Message-ID: \y -> let x = (\z -> y) in x x is a perfectly fine there whose type is a -> a. (1) With no options, ghci infers its type correctly. (2) However, with -XGADTs, type check fails and raises occurs check. (3) We can remedy this by supplying some additional options (4) Howver, if you put -XGADTs option at the end, it fails again :( kyagrd at kyahp:~$ ghci GHCi, version 7.8.4: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude> :t \y -> let x = (\z -> y) in x x \y -> let x = (\z -> y) in x x :: t -> t Prelude> :q Leaving GHCi. kyagrd at kyahp:~$ ghci -XGADTs GHCi, version 7.8.4: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude> :t \y -> let x = (\z -> y) in x x :1:30: Occurs check: cannot construct the infinite type: t0 ~ t0 -> t Relevant bindings include x :: t0 -> t (bound at :1:11) y :: t (bound at :1:2) In the first argument of ?x?, namely ?x? In the expression: x x Prelude> :q Leaving GHCi. ~$ ghci -XGADTs -XNoMonoLocalBinds -XNoMonomorphismRestriction GHCi, version 7.8.4: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude> :t \y -> let x = (\z -> y) in x x \y -> let x = (\z -> y) in x x :: t -> t Prelude> :q Leaving GHCi. ~$ ghci -XNoMonoLocalBinds -XNoMonomorphismRestriction -XGADTs GHCi, version 7.8.4: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude> :t \y -> let x = (\z -> y) in x x :1:30: Occurs check: cannot construct the infinite type: t0 ~ t0 -> t Relevant bindings include x :: t0 -> t (bound at :1:11) y :: t (bound at :1:2) In the first argument of ?x?, namely ?x? From ezyang at mit.edu Fri Jun 5 03:31:57 2015 From: ezyang at mit.edu (Edward Z. Yang) Date: Thu, 04 Jun 2015 20:31:57 -0700 Subject: [Haskell-cafe] The evil GADTs extension in ghci 7.8.4 (maybe in other versions too?) In-Reply-To: References: Message-ID: <1433475098-sup-1820@sabre> This is because -XGADTs implies -XMonoLocalBinds. Edward Excerpts from Ki Yung Ahn's message of 2015-06-04 20:29:50 -0700: > \y -> let x = (\z -> y) in x x > > is a perfectly fine there whose type is a -> a. > (1) With no options, ghci infers its type correctly. > (2) However, with -XGADTs, type check fails and raises occurs check. > (3) We can remedy this by supplying some additional options > (4) Howver, if you put -XGADTs option at the end, it fails again :( > > > kyagrd at kyahp:~$ ghci > GHCi, version 7.8.4: http://www.haskell.org/ghc/ :? for help > Loading package ghc-prim ... linking ... done. > Loading package integer-gmp ... linking ... done. > Loading package base ... linking ... done. > Prelude> :t \y -> let x = (\z -> y) in x x > \y -> let x = (\z -> y) in x x :: t -> t > Prelude> :q > Leaving GHCi. > > > kyagrd at kyahp:~$ ghci -XGADTs > GHCi, version 7.8.4: http://www.haskell.org/ghc/ :? for help > Loading package ghc-prim ... linking ... done. > Loading package integer-gmp ... linking ... done. > Loading package base ... linking ... done. > Prelude> :t \y -> let x = (\z -> y) in x x > > :1:30: > Occurs check: cannot construct the infinite type: t0 ~ t0 -> t > Relevant bindings include > x :: t0 -> t (bound at :1:11) > y :: t (bound at :1:2) > In the first argument of ?x?, namely ?x? > In the expression: x x > Prelude> :q > Leaving GHCi. > > > ~$ ghci -XGADTs -XNoMonoLocalBinds -XNoMonomorphismRestriction > GHCi, version 7.8.4: http://www.haskell.org/ghc/ :? for help > Loading package ghc-prim ... linking ... done. > Loading package integer-gmp ... linking ... done. > Loading package base ... linking ... done. > Prelude> :t \y -> let x = (\z -> y) in x x > \y -> let x = (\z -> y) in x x :: t -> t > Prelude> :q > Leaving GHCi. > > > ~$ ghci -XNoMonoLocalBinds -XNoMonomorphismRestriction -XGADTs > GHCi, version 7.8.4: http://www.haskell.org/ghc/ :? for help > Loading package ghc-prim ... linking ... done. > Loading package integer-gmp ... linking ... done. > Loading package base ... linking ... done. > Prelude> :t \y -> let x = (\z -> y) in x x > > :1:30: > Occurs check: cannot construct the infinite type: t0 ~ t0 -> t > Relevant bindings include > x :: t0 -> t (bound at :1:11) > y :: t (bound at :1:2) > In the first argument of ?x?, namely ?x? > From ezyang at mit.edu Fri Jun 5 03:43:53 2015 From: ezyang at mit.edu (Edward Z. Yang) Date: Thu, 04 Jun 2015 20:43:53 -0700 Subject: [Haskell-cafe] The evil GADTs extension in ghci 7.8.4 (maybe in other versions too?) In-Reply-To: References: <1433475098-sup-1820@sabre> Message-ID: <1433475711-sup-8101@sabre> GHC used to always generalize let-bindings, but our experience with GADTs lead us to decide that let should not be generalized with GADTs. So, it's not like we /wanted/ MonoLocalBinds, but that having them makes the GADT machinery simpler. This blog post gives more details on the matter: https://ghc.haskell.org/trac/ghc/blog/LetGeneralisationInGhc7 Edward Excerpts from Ki Yung Ahn's message of 2015-06-04 20:37:27 -0700: > Such order dependent could be very confusing for the users. I thought I > turned off certain feature but some other extension turning it on is > strange. Wouldn't it be better to decouple GADT and MonoLocalBinds? > > 2015? 06? 04? 20:31? Edward Z. Yang ?(?) ? ?: > > This is because -XGADTs implies -XMonoLocalBinds. > > > > Edward > > > > Excerpts from Ki Yung Ahn's message of 2015-06-04 20:29:50 -0700: > >> \y -> let x = (\z -> y) in x x > >> > >> is a perfectly fine there whose type is a -> a. > >> (1) With no options, ghci infers its type correctly. > >> (2) However, with -XGADTs, type check fails and raises occurs check. > >> (3) We can remedy this by supplying some additional options > >> (4) Howver, if you put -XGADTs option at the end, it fails again :( > >> > >> > >> kyagrd at kyahp:~$ ghci > >> GHCi, version 7.8.4: http://www.haskell.org/ghc/ :? for help > >> Loading package ghc-prim ... linking ... done. > >> Loading package integer-gmp ... linking ... done. > >> Loading package base ... linking ... done. > >> Prelude> :t \y -> let x = (\z -> y) in x x > >> \y -> let x = (\z -> y) in x x :: t -> t > >> Prelude> :q > >> Leaving GHCi. > >> > >> > >> kyagrd at kyahp:~$ ghci -XGADTs > >> GHCi, version 7.8.4: http://www.haskell.org/ghc/ :? for help > >> Loading package ghc-prim ... linking ... done. > >> Loading package integer-gmp ... linking ... done. > >> Loading package base ... linking ... done. > >> Prelude> :t \y -> let x = (\z -> y) in x x > >> > >> :1:30: > >> Occurs check: cannot construct the infinite type: t0 ~ t0 -> t > >> Relevant bindings include > >> x :: t0 -> t (bound at :1:11) > >> y :: t (bound at :1:2) > >> In the first argument of ?x?, namely ?x? > >> In the expression: x x > >> Prelude> :q > >> Leaving GHCi. > >> > >> > >> ~$ ghci -XGADTs -XNoMonoLocalBinds -XNoMonomorphismRestriction > >> GHCi, version 7.8.4: http://www.haskell.org/ghc/ :? for help > >> Loading package ghc-prim ... linking ... done. > >> Loading package integer-gmp ... linking ... done. > >> Loading package base ... linking ... done. > >> Prelude> :t \y -> let x = (\z -> y) in x x > >> \y -> let x = (\z -> y) in x x :: t -> t > >> Prelude> :q > >> Leaving GHCi. > >> > >> > >> ~$ ghci -XNoMonoLocalBinds -XNoMonomorphismRestriction -XGADTs > >> GHCi, version 7.8.4: http://www.haskell.org/ghc/ :? for help > >> Loading package ghc-prim ... linking ... done. > >> Loading package integer-gmp ... linking ... done. > >> Loading package base ... linking ... done. > >> Prelude> :t \y -> let x = (\z -> y) in x x > >> > >> :1:30: > >> Occurs check: cannot construct the infinite type: t0 ~ t0 -> t > >> Relevant bindings include > >> x :: t0 -> t (bound at :1:11) > >> y :: t (bound at :1:2) > >> In the first argument of ?x?, namely ?x? > >> > > _______________________________________________ > > Glasgow-haskell-users mailing list > > Glasgow-haskell-users at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users > > > From ok at cs.otago.ac.nz Fri Jun 5 03:48:52 2015 From: ok at cs.otago.ac.nz (Richard A. O'Keefe) Date: Fri, 5 Jun 2015 15:48:52 +1200 Subject: [Haskell-cafe] Rounding In-Reply-To: References: Message-ID: <12C3FFD8-1B6F-4D8D-89DA-6D7F009F216A@cs.otago.ac.nz> On 2/06/2015, at 7:30 pm, Magnus Therning wrote: > This is pure conjecture, but reading about "round half to even" on > Wikipedia () > shows that it has the most aliases of all tie-breaking strategies, it > is also the rounding used in IEEE 754. I'm not really interested in "pure conjecture" at this point. For what it's worth, in my copy of IEEE 754 it says 5.4. Conversion Between Floating-Point and Integer Formats It shall be possible to convert between all supported floating-point formats and all supported integer formats. Conversion to integer shall be effected by rounding as specified in Section 4. Conversions between floating-point integers and integer formats shall be exact unless an exception arises as specified in 7.1. 5.5. Round Floating-Point Number to Integer Value It shall be possible to round a floating-point number to an integral valued floating-point number in the same format. The rounding shall be as specified in Section 4, with the understanding that when rounding to nearest, if the difference between the unrounded operand and the rounded result is exactly one half, the rounded result is even. Section 4 specifies round-to-nearest-breaking-ties-to-even, round-to-plus-infinity, round-to-minus-infinity, and round-to-zero. Reading closely, we see that 5.4: it must be *possible* to convert between any size of float and any size of integer using any one of the four rounding rules at the user's choice. So the *effects* of RealFrac's {floor, ceiling, truncate, round} are required, but not those specific names. 5.5: it must be possible to convert any size of float to integer in the same format. This is subject to the current rounding mode. C's rint{,l,f} function does this. If there is anything in Haskell 2010 that meets the requirements of section 5.5, I have been unable to find it. Since IEEE 754 conformance is not a goal of Haskell (there is, for example, no way in Haskell 2010 to set the rounding direction), there has to be some *other* reason than IEEE conformance to explain the adoption of the break-ties-to-even rule for rounding. In any case, good support for IEEE 754 arithmetic since C99 hasn't stopped C providing rounding functions with the traditional semantics *as well as* ones with IEEE semantics. From ok at cs.otago.ac.nz Fri Jun 5 04:23:27 2015 From: ok at cs.otago.ac.nz (Richard A. O'Keefe) Date: Fri, 5 Jun 2015 16:23:27 +1200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: Message-ID: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> On 4/06/2015, at 5:15 am, Anthony Cowley wrote: > The idea is that rather than writing, > > import Data.Map (Map) > import qualified Data.Map as M > > you could instead write, > > import Data.Map (Map) as M This puts the list (Map) in the wrong place. You know how in English, "heavy" parts of a sentence go at the end? The "heavy" part of an import declaration is the impspec. > The Map identifier would imported unqualified, while M would be > introduced as an alias for the qualified import of Data.Map. I find that confusing. I expected it to mean that only Data.Map.Map would be available and that it would have to be referred to as M.Map. The core problem is that this is a bit too close to English syntax, where the placement of "as M" after (Map) suggests that it refers to (Map), rather than to Data.Map. The new syntax does not let us do anything we cannot do now. It is also asking too much to ask people to distinguish between import Full as Local (thingy) -- current import Full (thingy) as Local -- proposed Whatever its faults, the current scheme at least makes it obvious that 'as Local' refers to 'Full', not '(thingy)'. From malcolm.wallace at me.com Fri Jun 5 05:52:52 2015 From: malcolm.wallace at me.com (Malcolm Wallace) Date: Fri, 05 Jun 2015 06:52:52 +0100 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> Message-ID: <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> I agree with everything Richard says here. Not only is the proposed syntax bad, but I don't see any good motivation for the general idea of making minor tweaks to the imports section. I don't find it at all annoying to use a couple of lines to be completely explicit about which names are always qualified, which are optionally qualified, and the qualifier to use; and indeed I am a heavy user of the 'as' form, both with and without 'qualified'. I think there is a burden on the proposer to demonstrate a decent power-to-weight ratio for the change, and saving a few characters at the expense of introducing considerable confusion just does not seem right to me. "The new syntax does not let us do anything we cannot do now." On the other hand, I could imagine a different import system altogether being attractive, perhaps a higher-order one like ML modules, although someone would have to flesh out the details. Regards, Malcolm > On 5 Jun 2015, at 05:23, "Richard A. O'Keefe" wrote: > > >> On 4/06/2015, at 5:15 am, Anthony Cowley wrote: >> The idea is that rather than writing, >> >> import Data.Map (Map) >> import qualified Data.Map as M >> >> you could instead write, >> >> import Data.Map (Map) as M > > This puts the list (Map) in the wrong place. > You know how in English, "heavy" parts of a sentence go at the end? > The "heavy" part of an import declaration is the impspec. > >> The Map identifier would imported unqualified, while M would be >> introduced as an alias for the qualified import of Data.Map. > > I find that confusing. I expected it to mean that > only Data.Map.Map would be available and that it would > have to be referred to as M.Map. The core problem is > that this is a bit too close to English syntax, where > the placement of "as M" after (Map) suggests that it > refers to (Map), rather than to Data.Map. > > The new syntax does not let us do anything we cannot do now. > > It is also asking too much to ask people to distinguish > between > > import Full as Local (thingy) -- current > import Full (thingy) as Local -- proposed > > Whatever its faults, the current scheme at least makes > it obvious that 'as Local' refers to 'Full', not '(thingy)'. > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe From amos.robinson at gmail.com Fri Jun 5 06:04:04 2015 From: amos.robinson at gmail.com (Amos Robinson) Date: Fri, 05 Jun 2015 06:04:04 +0000 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> Message-ID: I have little to add, except I agree with Richard and Malcolm: this just seems like a confusing hack to me. On Fri, 5 Jun 2015 at 15:53 Malcolm Wallace wrote: > I agree with everything Richard says here. Not only is the proposed > syntax bad, but I don't see any good motivation for the general idea of > making minor tweaks to the imports section. I don't find it at all > annoying to use a couple of lines to be completely explicit about which > names are always qualified, which are optionally qualified, and the > qualifier to use; and indeed I am a heavy user of the 'as' form, both with > and without 'qualified'. > > I think there is a burden on the proposer to demonstrate a decent > power-to-weight ratio for the change, and saving a few characters at the > expense of introducing considerable confusion just does not seem right to > me. "The new syntax does not let us do anything we cannot do now." On the > other hand, I could imagine a different import system altogether being > attractive, perhaps a higher-order one like ML modules, although someone > would have to flesh out the details. > > Regards, > Malcolm > > > On 5 Jun 2015, at 05:23, "Richard A. O'Keefe" wrote: > > > > > >> On 4/06/2015, at 5:15 am, Anthony Cowley > wrote: > >> The idea is that rather than writing, > >> > >> import Data.Map (Map) > >> import qualified Data.Map as M > >> > >> you could instead write, > >> > >> import Data.Map (Map) as M > > > > This puts the list (Map) in the wrong place. > > You know how in English, "heavy" parts of a sentence go at the end? > > The "heavy" part of an import declaration is the impspec. > > > >> The Map identifier would imported unqualified, while M would be > >> introduced as an alias for the qualified import of Data.Map. > > > > I find that confusing. I expected it to mean that > > only Data.Map.Map would be available and that it would > > have to be referred to as M.Map. The core problem is > > that this is a bit too close to English syntax, where > > the placement of "as M" after (Map) suggests that it > > refers to (Map), rather than to Data.Map. > > > > The new syntax does not let us do anything we cannot do now. > > > > It is also asking too much to ask people to distinguish > > between > > > > import Full as Local (thingy) -- current > > import Full (thingy) as Local -- proposed > > > > Whatever its faults, the current scheme at least makes > > it obvious that 'as Local' refers to 'Full', not '(thingy)'. > > > > > > _______________________________________________ > > Haskell-Cafe mailing list > > Haskell-Cafe at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From malcolm.wallace at me.com Fri Jun 5 08:07:09 2015 From: malcolm.wallace at me.com (malcolm.wallace) Date: Fri, 05 Jun 2015 08:07:09 +0000 (GMT) Subject: [Haskell-cafe] Proposal: Shorter Import Syntax Message-ID: <512f7cd7-f6d5-47a2-b6c6-784bf1bfe2d0@me.com> Here are some more numbers. ?In our private code base of ~12,400 modules totalling >2,300,000 LoC, there are ~143,800 import lines, of which ~65,000 use the "as" syntax. ?Of those, ~8,000 have no "qualified", and the remaining ~57,000 use "qualified". ?So I make that about 5.6% of our imports. ?I think this is quite a lot higher than the Stackage figure, because this code is mostly applications rather than libraries, so it tends to use a larger range of imported functionality from lots of different semi-independent domains. ?The chance of naming-overlap for separate concepts is therefore much greater, leading to our common idiom for optional qualification of names with short module synonyms (often single letters). Regards, Malcolm On 03 Jun, 2015,at 08:08 PM, Anthony Cowley wrote: ?I?grepped through the source of all the packages in the Stackage Nightly package set and found that less 0.3% of imports use that syntax. It's a small number, but it's not zero, so the breakage would be unacceptable. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk Fri Jun 5 08:07:14 2015 From: tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk (Tom Ellis) Date: Fri, 5 Jun 2015 09:07:14 +0100 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <1433361209.18957.7.camel@gmail.com> <87wpzj5hi5.fsf@gnu.org> <87pp5b5ftu.fsf@gnu.org> Message-ID: <20150605080714.GA13259@weber> On Fri, Jun 05, 2015 at 01:15:49AM +0200, Bardur Arantsson wrote: > Meta-point: Can we please stop cc'ing everyone on everything? It's > getting pretty annoying and "reply-to-list" should be available in every > decent e-mail client. [...] > (I'm getting a lot of "duplicates" because I'm already "silently" > subscribed for a variety of mailing lists, but I use gmane.org to > maintain sanity.) I am strongly in support of this. Receiving duplicates is unnecessary and rather frustrating. Tom From fa-ml at ariis.it Fri Jun 5 10:54:36 2015 From: fa-ml at ariis.it (Francesco Ariis) Date: Fri, 5 Jun 2015 12:54:36 +0200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <20150605080714.GA13259@weber> References: <1433361209.18957.7.camel@gmail.com> <87wpzj5hi5.fsf@gnu.org> <87pp5b5ftu.fsf@gnu.org> <20150605080714.GA13259@weber> Message-ID: <20150605105436.GA1183@casa.casa> On Fri, Jun 05, 2015 at 09:07:14AM +0100, Tom Ellis wrote: > I am strongly in support of this. Receiving duplicates is unnecessary and > rather frustrating. Hello Tom, as a mutt user, you are probably interested in: # mark duplicates for deletion folder-hook yourfolder 'push "~="' From eric at seidel.io Fri Jun 5 14:28:53 2015 From: eric at seidel.io (Eric Seidel) Date: Fri, 05 Jun 2015 07:28:53 -0700 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <20150605080714.GA13259@weber> References: <1433361209.18957.7.camel@gmail.com> <87wpzj5hi5.fsf@gnu.org> <87pp5b5ftu.fsf@gnu.org> <20150605080714.GA13259@weber> Message-ID: <1433514533.2290107.287766913.04D9EE3E@webmail.messagingengine.com> On Fri, Jun 5, 2015, at 01:07, Tom Ellis wrote: > On Fri, Jun 05, 2015 at 01:15:49AM +0200, Bardur Arantsson wrote: > > Meta-point: Can we please stop cc'ing everyone on everything? It's > > getting pretty annoying and "reply-to-list" should be available in every > > decent e-mail client. > [...] > > (I'm getting a lot of "duplicates" because I'm already "silently" > > subscribed for a variety of mailing lists, but I use gmane.org to > > maintain sanity.) > > I am strongly in support of this. Receiving duplicates is unnecessary > and > rather frustrating. I'm also in favor of reply-to-list, but as a stopgap you can tell mailman to not send you any postings where you already appear in the To or Cc list. Eric From acowley at seas.upenn.edu Fri Jun 5 16:46:10 2015 From: acowley at seas.upenn.edu (Anthony Cowley) Date: Fri, 5 Jun 2015 12:46:10 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <512f7cd7-f6d5-47a2-b6c6-784bf1bfe2d0@me.com> References: <512f7cd7-f6d5-47a2-b6c6-784bf1bfe2d0@me.com> Message-ID: Okay, we're at 28-7, now. This is a syntax proposal, so it falls into similar territory to existing things like TupleSections, LambdaCase, MultiWayIf, etc., and presumably the eagerly awaited SC-proposed (::Type) syntax. Anthony On Fri, Jun 5, 2015 at 4:07 AM, malcolm.wallace wrote: > Here are some more numbers. In our private code base of ~12,400 modules > totalling >2,300,000 LoC, there are ~143,800 import lines, of which ~65,000 > use the "as" syntax. Of those, ~8,000 have no "qualified", and the > remaining ~57,000 use "qualified". So I make that about 5.6% of our > imports. I think this is quite a lot higher than the Stackage figure, > because this code is mostly applications rather than libraries, so it tends > to use a larger range of imported functionality from lots of different > semi-independent domains. The chance of naming-overlap for separate > concepts is therefore much greater, leading to our common idiom for optional > qualification of names with short module synonyms (often single letters). > > Regards, > Malcolm > > > On 03 Jun, 2015,at 08:08 PM, Anthony Cowley wrote: > > I grepped through the source of all the packages in the Stackage Nightly > package set and found that less 0.3% of imports use that syntax. It's > a small number, but it's not zero, so the breakage would be > unacceptable. > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > From joehillen at gmail.com Fri Jun 5 18:25:20 2015 From: joehillen at gmail.com (Joe Hillenbrand) Date: Fri, 5 Jun 2015 11:25:20 -0700 Subject: [Haskell-cafe] [Hiring] Infrastructure Engineer @ Elastic (makers of Elasticsearch) Location: Anywhere Message-ID: Although not strictly a Haskell developer position. Haskel experience/interest is a huge plus. https://www.elastic.co/about/careers/engineering/infrastructure-engineer?id=dpwr2ilkyr5kzriGalqWdr (Note: the id param is required or else you'll get a 404) From acowley at seas.upenn.edu Fri Jun 5 20:33:35 2015 From: acowley at seas.upenn.edu (Anthony Cowley) Date: Fri, 5 Jun 2015 16:33:35 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <512f7cd7-f6d5-47a2-b6c6-784bf1bfe2d0@me.com> Message-ID: <0FEDD72E-1D38-41A6-B367-E7405AF4CB5A@seas.upenn.edu> > On Jun 5, 2015, at 4:14 PM, Marcin Mrotek wrote: > > +1, though something alleviating the burden of importing the same module twice, like: > > import qualified Text as Text > import Text ( {- something -} ) > > would be even better. That is what this does. You will be able to write: import Text ( {- something -} ) as Text Anthony From marcin.jan.mrotek at gmail.com Fri Jun 5 20:46:46 2015 From: marcin.jan.mrotek at gmail.com (Marcin Mrotek) Date: Fri, 5 Jun 2015 22:46:46 +0200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <0FEDD72E-1D38-41A6-B367-E7405AF4CB5A@seas.upenn.edu> References: <512f7cd7-f6d5-47a2-b6c6-784bf1bfe2d0@me.com> <0FEDD72E-1D38-41A6-B367-E7405AF4CB5A@seas.upenn.edu> Message-ID: > That is what this does. You will be able to write: > > import Text ( {- something -} ) as Text Ah, sorry then, I didn't notice. Nevermind, full +1 from me then ;) Best regareds, Marcin Mrotek From svenpanne at gmail.com Fri Jun 5 21:55:08 2015 From: svenpanne at gmail.com (Sven Panne) Date: Fri, 5 Jun 2015 23:55:08 +0200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> Message-ID: 2015-06-05 7:52 GMT+02:00 Malcolm Wallace : > [...] I think there is a burden on the proposer to demonstrate a decent > power-to-weight ratio for the change, and saving a few characters at the > expense of introducing considerable confusion just does not seem right to > me. "The new syntax does not let us do anything we cannot do now." On the > other hand, I could imagine a different import system altogether being > attractive, perhaps a higher-order one like ML modules, although someone > would have to flesh out the details. > Just another +1 to everything Malcolm wrote: IMHO the proposal is just bikeshedding and doesn't really buy us much. Saving a few keystrokes is not a good argument when it comes to language design, see e.g. Perl or the latest additions to JavaScript. The current syntax might be a bit verbose, but it's easily comprehensible, and the proposal is a bit confusing. I would really welcome some more powerful module system, e.g. in the spirit of ML/OCaml, but not some ad hoc changes to the current one. Regarding the grep on Stackage: Here transitive dependencies should be taken into account, so I guess the overall breakage would be much, much higher. A per-module/package grep is basically meaningless. Finally: Enabling anything by default what might break something is a total no-go, *unless* everybody agrees that the current state of affairs is broken and the new state is much better. Both doesn't hold here. Enabling some things behind a flag/pragma is OK, time will then tell if the idea is good or not. Just my 2c, S. -------------- next part -------------- An HTML attachment was scrubbed... URL: From acowley at seas.upenn.edu Fri Jun 5 22:09:46 2015 From: acowley at seas.upenn.edu (Anthony Cowley) Date: Fri, 5 Jun 2015 18:09:46 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> Message-ID: On Fri, Jun 5, 2015 at 5:55 PM, Sven Panne wrote: > 2015-06-05 7:52 GMT+02:00 Malcolm Wallace : >> >> [...] I think there is a burden on the proposer to demonstrate a decent >> power-to-weight ratio for the change, and saving a few characters at the >> expense of introducing considerable confusion just does not seem right to >> me. "The new syntax does not let us do anything we cannot do now." On the >> other hand, I could imagine a different import system altogether being >> attractive, perhaps a higher-order one like ML modules, although someone >> would have to flesh out the details. > > > Just another +1 to everything Malcolm wrote: IMHO the proposal is just > bikeshedding and doesn't really buy us much. Saving a few keystrokes is not > a good argument when it comes to language design, see e.g. Perl or the > latest additions to JavaScript. The current syntax might be a bit verbose, > but it's easily comprehensible, and the proposal is a bit confusing. I would > really welcome some more powerful module system, e.g. in the spirit of > ML/OCaml, but not some ad hoc changes to the current one. > > Regarding the grep on Stackage: Here transitive dependencies should be taken > into account, so I guess the overall breakage would be much, much higher. A > per-module/package grep is basically meaningless. > > Finally: Enabling anything by default what might break something is a total > no-go, *unless* everybody agrees that the current state of affairs is broken > and the new state is much better. Both doesn't hold here. Enabling some > things behind a flag/pragma is OK, time will then tell if the idea is good > or not. > > Just my 2c, > S. This was stated unambiguously in the proposal and several times since then, but, just to clarify: *there is no possible breakage from this change*. In other words, the percentage of Haskell programs that will break will not be "much, much higher." It will be 0%. Again: nothing whatsoever *can* break. The proposed syntax is currently a parse error. Please let me know how the proposal or the thread is confusing on this issue so I can clarify it and prevent people from doom and gloom prognostications. Anthony P.S. Nothing will break. From amos.robinson at gmail.com Sat Jun 6 00:08:40 2015 From: amos.robinson at gmail.com (Amos Robinson) Date: Sat, 06 Jun 2015 00:08:40 +0000 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> Message-ID: I'm going to eat some humble pie and retract my earlier -1 for a +1. My original reasoning was that this looked particularly confusing and incoherent compared to the other import types we already have. I still think this is true, but given that the current import syntax can be cumbersome, I believe this makes sense as a first step towards nicer imports in the long term future. My mistake was seeing the short term negatives, but not seeing the long term positives. On Sat, 6 Jun 2015 at 08:10 Anthony Cowley wrote: > On Fri, Jun 5, 2015 at 5:55 PM, Sven Panne wrote: > > 2015-06-05 7:52 GMT+02:00 Malcolm Wallace : > >> > >> [...] I think there is a burden on the proposer to demonstrate a decent > >> power-to-weight ratio for the change, and saving a few characters at the > >> expense of introducing considerable confusion just does not seem right > to > >> me. "The new syntax does not let us do anything we cannot do now." On > the > >> other hand, I could imagine a different import system altogether being > >> attractive, perhaps a higher-order one like ML modules, although someone > >> would have to flesh out the details. > > > > > > Just another +1 to everything Malcolm wrote: IMHO the proposal is just > > bikeshedding and doesn't really buy us much. Saving a few keystrokes is > not > > a good argument when it comes to language design, see e.g. Perl or the > > latest additions to JavaScript. The current syntax might be a bit > verbose, > > but it's easily comprehensible, and the proposal is a bit confusing. I > would > > really welcome some more powerful module system, e.g. in the spirit of > > ML/OCaml, but not some ad hoc changes to the current one. > > > > Regarding the grep on Stackage: Here transitive dependencies should be > taken > > into account, so I guess the overall breakage would be much, much > higher. A > > per-module/package grep is basically meaningless. > > > > Finally: Enabling anything by default what might break something is a > total > > no-go, *unless* everybody agrees that the current state of affairs is > broken > > and the new state is much better. Both doesn't hold here. Enabling some > > things behind a flag/pragma is OK, time will then tell if the idea is > good > > or not. > > > > Just my 2c, > > S. > > > This was stated unambiguously in the proposal and several times since > then, but, just to clarify: *there is no possible breakage from this > change*. In other words, the percentage of Haskell programs that will > break will not be "much, much higher." It will be 0%. > > Again: nothing whatsoever *can* break. The proposed syntax is > currently a parse error. Please let me know how the proposal or the > thread is confusing on this issue so I can clarify it and prevent > people from doom and gloom prognostications. > > Anthony > > P.S. Nothing will break. > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elliot.cameron at covenanteyes.com Sat Jun 6 03:22:54 2015 From: elliot.cameron at covenanteyes.com (Elliot Cameron) Date: Sat, 6 Jun 2015 03:22:54 +0000 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> Message-ID: <7740c83f965e4c7493114626a00ec3dc@HQWS-EXMB-01.main.covenanteyes.com> Haskell already loses people for silly things like its lack of curly braces and semicolons (if only they knew the truth). And it wins people for marginally silly things like how many parentheses you typically see. So, while this change may be silly in many ways, programmers are a picky bunch and we cannot underestimate the implications of silly annoyances like needing two lines to import ?Text? and ?T.pack?. +1 from me. From: Haskell-Cafe [mailto:haskell-cafe-bounces at haskell.org] On Behalf Of Sven Panne Sent: Friday, June 5, 2015 5:55 PM To: haskell-cafe Subject: Re: [Haskell-cafe] Proposal: Shorter Import Syntax 2015-06-05 7:52 GMT+02:00 Malcolm Wallace >: [...] I think there is a burden on the proposer to demonstrate a decent power-to-weight ratio for the change, and saving a few characters at the expense of introducing considerable confusion just does not seem right to me. "The new syntax does not let us do anything we cannot do now." On the other hand, I could imagine a different import system altogether being attractive, perhaps a higher-order one like ML modules, although someone would have to flesh out the details. Just another +1 to everything Malcolm wrote: IMHO the proposal is just bikeshedding and doesn't really buy us much. Saving a few keystrokes is not a good argument when it comes to language design, see e.g. Perl or the latest additions to JavaScript. The current syntax might be a bit verbose, but it's easily comprehensible, and the proposal is a bit confusing. I would really welcome some more powerful module system, e.g. in the spirit of ML/OCaml, but not some ad hoc changes to the current one. Regarding the grep on Stackage: Here transitive dependencies should be taken into account, so I guess the overall breakage would be much, much higher. A per-module/package grep is basically meaningless. Finally: Enabling anything by default what might break something is a total no-go, *unless* everybody agrees that the current state of affairs is broken and the new state is much better. Both doesn't hold here. Enabling some things behind a flag/pragma is OK, time will then tell if the idea is good or not. Just my 2c, S. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vlatko.basic at gmail.com Sat Jun 6 08:26:25 2015 From: vlatko.basic at gmail.com (Vlatko Basic) Date: Sat, 06 Jun 2015 10:26:25 +0200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> Message-ID: <5572AEB1.9050002@gmail.com> Maybe a slightly changed syntax like this could be less confusing import Data.Map (Map) andAs M (...) or import Data.Map (Map) and as M (...) It is clear (IMHO) what is coming from where, and both lists are at the end of their part, so can be written nicely in several rows, if needed. import Data.Map (Map) andAs M (lengthy, list) Parser can also easily distinguish between the current and the new syntax so they can coexist, so no backward compatibility problem. br, vlatko -------- Original Message -------- Subject: Re: [Haskell-cafe] Proposal: Shorter Import Syntax From: Malcolm Wallace To: haskell-cafe Date: 05/06/15 07:52 > I agree with everything Richard says here. Not only is the proposed syntax bad, but I don't see any good motivation for the general idea of making minor tweaks to the imports section. I don't find it at all annoying to use a couple of lines to be completely explicit about which names are always qualified, which are optionally qualified, and the qualifier to use; and indeed I am a heavy user of the 'as' form, both with and without 'qualified'. > > I think there is a burden on the proposer to demonstrate a decent power-to-weight ratio for the change, and saving a few characters at the expense of introducing considerable confusion just does not seem right to me. "The new syntax does not let us do anything we cannot do now." On the other hand, I could imagine a different import system altogether being attractive, perhaps a higher-order one like ML modules, although someone would have to flesh out the details. > > Regards, > Malcolm > >> On 5 Jun 2015, at 05:23, "Richard A. O'Keefe" wrote: >> >> >>> On 4/06/2015, at 5:15 am, Anthony Cowley wrote: >>> The idea is that rather than writing, >>> >>> import Data.Map (Map) >>> import qualified Data.Map as M >>> >>> you could instead write, >>> >>> import Data.Map (Map) as M >> >> This puts the list (Map) in the wrong place. >> You know how in English, "heavy" parts of a sentence go at the end? >> The "heavy" part of an import declaration is the impspec. >> >>> The Map identifier would imported unqualified, while M would be >>> introduced as an alias for the qualified import of Data.Map. >> >> I find that confusing. I expected it to mean that >> only Data.Map.Map would be available and that it would >> have to be referred to as M.Map. The core problem is >> that this is a bit too close to English syntax, where >> the placement of "as M" after (Map) suggests that it >> refers to (Map), rather than to Data.Map. >> >> The new syntax does not let us do anything we cannot do now. >> >> It is also asking too much to ask people to distinguish >> between >> >> import Full as Local (thingy) -- current >> import Full (thingy) as Local -- proposed >> >> Whatever its faults, the current scheme at least makes >> it obvious that 'as Local' refers to 'Full', not '(thingy)'. >> >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > From andreas.abel at ifi.lmu.de Sat Jun 6 13:41:53 2015 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Sat, 06 Jun 2015 15:41:53 +0200 Subject: [Haskell-cafe] GHC.Generics: how to derive a Generic instance for an existential type? Message-ID: <5572F8A1.6060301@ifi.lmu.de> I wonder whether GHC.Generics supports existential types yet... {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE StandaloneDeriving #-} import GHC.Generics data U = forall a. (Generic a) => U a -- deriving (Generic) -- Can't make a derived instance of ?Generic U?: -- Constructor ?U? has existentials or constraints in its type -- Possible fix: use a standalone deriving declaration instead -- deriving instance Generic U -- Can't make a derived instance of ?Generic U?: -- U must be a vanilla data constructor -- In the stand-alone deriving instance for ?Generic U? data D1Ser data C1_0Ser instance Generic U where type Rep U = D D1Ser (C1 C1_0Ser (S1 NoSelector (Rep a))) -- Not in scope: type variable ?a? -- How to bring the existential type `a' into scope? -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www2.tcs.ifi.lmu.de/~abel/ From svenpanne at gmail.com Sat Jun 6 19:07:32 2015 From: svenpanne at gmail.com (Sven Panne) Date: Sat, 6 Jun 2015 21:07:32 +0200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> Message-ID: 2015-06-06 0:09 GMT+02:00 Anthony Cowley : > This was stated unambiguously [...] > Looking back through the thread, this might be a bit of an exaggeration... ;-) > in the proposal and several times since > then, but, just to clarify: *there is no possible breakage from this > change*. In other words, the percentage of Haskell programs that will > break will not be "much, much higher." It will be 0%. [...] > OK, but even if we reach consensus that the change is worthwhile (for me it's not), it's still extremely important to make this a language extension which must be explicitly declared. Otherwise there *will* be heavy breakage through transitive dependencies, cabal not being able to find an install plan, etc. As was already noted, not everybody is using the latest and greatest GHC (often for a good reason). So in a nutshell: -0.5 from me if it's a language extension, -1000 if it's on by default. -------------- next part -------------- An HTML attachment was scrubbed... URL: From acowley at seas.upenn.edu Sat Jun 6 19:56:42 2015 From: acowley at seas.upenn.edu (Anthony Cowley) Date: Sat, 6 Jun 2015 15:56:42 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> Message-ID: On Sat, Jun 6, 2015 at 3:07 PM, Sven Panne wrote: > 2015-06-06 0:09 GMT+02:00 Anthony Cowley : >> >> This was stated unambiguously [...] > > > Looking back through the thread, this might be a bit of an exaggeration... > ;-) > >> >> in the proposal and several times since >> then, but, just to clarify: *there is no possible breakage from this >> change*. In other words, the percentage of Haskell programs that will >> break will not be "much, much higher." It will be 0%. [...] > > > OK, but even if we reach consensus that the change is worthwhile (for me > it's not), it's still extremely important to make this a language extension > which must be explicitly declared. Otherwise there *will* be heavy breakage > through transitive dependencies, cabal not being able to find an install > plan, etc. As was already noted, not everybody is using the latest and > greatest GHC (often for a good reason). > > So in a nutshell: -0.5 from me if it's a language extension, -1000 if it's > on by default. Is there a reason you and others are singling out this extension for causing breakage? No language extension is taken into account by cabal unless you put a lower bound on base, which offends some people. If you use any extension, you are causing the exact breakage you are so concerned with! This is how cabal works and has worked: the use of a language extension does not solve this. So what are you basing all these confidently negative predictions on? If you don't like the syntax, vote -1 (current status is roughly 31-5), but don't invent technical-sounding objections. Anthony From allbery.b at gmail.com Sat Jun 6 20:02:53 2015 From: allbery.b at gmail.com (Brandon Allbery) Date: Sat, 6 Jun 2015 16:02:53 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> Message-ID: On Sat, Jun 6, 2015 at 3:56 PM, Anthony Cowley wrote: > This is how cabal works and has worked: the use of a language > extension does not solve this > Yes, blame cabal for something that you refuse to give it any clue about. That cabal cannot read your mind is a terrible bug! -- brandon s allbery kf8nh sine nomine associates allbery.b at gmail.com ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From acowley at seas.upenn.edu Sat Jun 6 20:09:45 2015 From: acowley at seas.upenn.edu (Anthony Cowley) Date: Sat, 6 Jun 2015 16:09:45 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> Message-ID: On Sat, Jun 6, 2015 at 4:02 PM, Brandon Allbery wrote: > On Sat, Jun 6, 2015 at 3:56 PM, Anthony Cowley > wrote: >> >> This is how cabal works and has worked: the use of a language >> extension does not solve this > > > Yes, blame cabal for something that you refuse to give it any clue about. > That cabal cannot read your mind is a terrible bug! > > -- > brandon s allbery kf8nh sine nomine associates > allbery.b at gmail.com ballbery at sinenomine.net > unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net I'll repeat myself: 1) The proposed extension will live behind a pragma 2) cabal does not take language extensions into account when computing a build plan The only way to give cabal a clue about a used extension is to put a lower bound on base, but you specifically rejected that as ridiculous. Anthony From svenpanne at gmail.com Sat Jun 6 22:21:31 2015 From: svenpanne at gmail.com (Sven Panne) Date: Sun, 7 Jun 2015 00:21:31 +0200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> Message-ID: 2015-06-06 22:09 GMT+02:00 Anthony Cowley : > I'll repeat myself: > ... and so do I: 1) The proposed extension will live behind a pragma > That's exactly what I'm asking for: A new {-# LANGUAGE FunkyImports #-} pragma (name to be decided ;-), which must be mentioned in a cabal file's "extension:" field ( https://www.haskell.org/cabal/users-guide/developing-packages.html#creating-a-package). Failing to mention a language extension is just as wrong as declaring wrong bounds. > 2) cabal does not take language extensions into account when computing > a build plan > If that's actually the case (can some Cabal devs clarify this?), than it's a Cabal bug, otherwise the "extension:" field would be meaningless and build plans would be fragile. Anyway, this has nothing to do per se with the proposal. > The only way to give cabal a clue about a used extension is to put a > lower bound on base, but you specifically rejected that as ridiculous. > That would in fact be ridiculous, just as saying "every release with a prime major version number implies the new language extension.". One could perfectly implement any base version without implementing the proposal. -------------- next part -------------- An HTML attachment was scrubbed... URL: From acowley at seas.upenn.edu Sat Jun 6 22:50:22 2015 From: acowley at seas.upenn.edu (Anthony Cowley) Date: Sat, 6 Jun 2015 18:50:22 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> Message-ID: On Sat, Jun 6, 2015 at 6:21 PM, Sven Panne wrote: > 2015-06-06 22:09 GMT+02:00 Anthony Cowley : >> >> I'll repeat myself: > > > ... and so do I: > >> 1) The proposed extension will live behind a pragma > > > That's exactly what I'm asking for: A new {-# LANGUAGE FunkyImports #-} > pragma (name to be decided ;-), which must be mentioned in a cabal file's > "extension:" field > (https://www.haskell.org/cabal/users-guide/developing-packages.html#creating-a-package). > Failing to mention a language extension is just as wrong as declaring wrong > bounds. This was clarified in several mails in the thread before yours starting with a response to Herbert. >> 2) cabal does not take language extensions into account when computing >> a build plan > > > If that's actually the case (can some Cabal devs clarify this?), than it's a > Cabal bug, otherwise the "extension:" field would be meaningless and build > plans would be fragile. Anyway, this has nothing to do per se with the > proposal. That is the state of affairs. After claiming in this thread that an extension is the only way to help cabal, Herbert himself went on github to open an issue requesting the feature . I'm not going to try to explain or justify his actions, but the point is that your predictions of how compatibility is sure to be broken have been based on not reading the proposal followed by a misunderstanding of how our tools have worked for years. Cabal should be improved, but if the dozens of extensions we've seen thus far haven't caused widespread havoc, then it seems unlikely that this one would. >> The only way to give cabal a clue about a used extension is to put a >> lower bound on base, but you specifically rejected that as ridiculous. > > > That would in fact be ridiculous, just as saying "every release with a prime > major version number implies the new language extension.". One could > perfectly implement any base version without implementing the proposal. And yet anybody who has seriously made an effort to preserve backwards compatibility has had to do this effectively forever. Again, I'm happy to mark you down as -1 on the proposal. Anthony From hvr at gnu.org Sat Jun 6 22:35:08 2015 From: hvr at gnu.org (Herbert Valerio Riedel) Date: Sun, 07 Jun 2015 00:35:08 +0200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: (Anthony Cowley's message of "Thu, 4 Jun 2015 17:36:01 -0400") References: <1433361209.18957.7.camel@gmail.com> <87wpzj5hi5.fsf@gnu.org> <87pp5b5ftu.fsf@gnu.org> Message-ID: <871thojwir.fsf@gnu.org> On 2015-06-04 at 23:36:01 +0200, Anthony Cowley wrote: >> On Jun 4, 2015, at 5:22 PM, Herbert Valerio Riedel wrote: >> >>> On 2015-06-04 at 23:05:42 +0200, Alexey Shmalko wrote: >>> If I understand correctly, the initial proposal was to enable the new >>> syntax by default and it mustn't break any code (full >>> backward-compatible). >> >> That would be a departure from how language extensions were handled in >> GHC in the past afaik, and if there's no language pragma to toggle this >> new syntax, Cabal has no way to know that a new language syntax is >> required and that thereby needs exclude (not implemented yet) the >> affected package versions from the install-plan configuration space. > I can't parse your last sentence. I'll rephrase: Extending the syntax GHC accepts beyond H2010 w/o a language flag (but if I understood you correctly, you stated that there's gonna be an associated language pragma) is not desirable, since you wouldn't be able communicate that requirement to Cabal via the other-extensions/default-extensions mechanism (albeit that information is currently not used early enough to affect the install-plan solver, see also [1]) While I'm mildly against having this new syntax enabled in GHC's default-mode (i.e. when neither -XHaskell2010 nor -XHaskell98 is set), I'm strongly against enabling it implicitly via -XHaskell2010, as when you request -XHaskell2010 you want GHC ideally to tell you when you're using syntax beyond H2010. One risk I see with enabling this new and yet unproven syntax extension by default right away is that it blocks the way for any alternative (or just conflicting) import-syntax feature we may come up with in the future, as we would have already locked on to this new syntax by making it available out of the box, thereby increasing the cost of disabling it again. Another issue I see is with editors, which benefit a lot from having syntax advertised via language pragmas, as that can be used to control syntax highlighting, but if the text editor doesn't know whether that new syntax is allowed or not because it's not signalled via a {-# LANGUAGE #-} pragma, the syntax highlighter can't do its job of pointing out invalid syntax reliably. Other tooling may benefit from such an explicit pragma too (c.f. haskell-src-exts). > The proposed syntax is currently a parse error, so a package that used > it could depend on a GHC new enough to support it (eg with a base > version constraint). No older packages would cause any errors > whatsoever. *Currently*, you can indirectly depend on a GHC version (and thus available language extensions) by constraining on its associated `base` version (/if/ you depend on `base` directly), but that's more of workaround for lacking better means (which are not out of reach, see [1]), since by depending on the `base` library for /language/ features you assume that GHC and `base` will always have this direct correlation, but that's not guaranteed to remain so (and it would certainly solve quite a few GHC upgrade pains, if we could have a newer GHC install an older base major version.... but that's another story). And actually, you can also depend directly on a GHC version by using a cabal conditional construct of the kind if impl(ghc < 7.10) build-depends: base<0 However, it's semantically cleaner (and easier than to remember which GHC version introduced a given syntax extension) to state the syntax requirements in terms of other-extensions/default-extensions lists, rather than requesting a specific compiler (version), even if GHC is supposedly the only one left standing... Cheers, hvr [1]: https://github.com/haskell/cabal/issues/2644 From ivan.miljenovic at gmail.com Sat Jun 6 23:20:37 2015 From: ivan.miljenovic at gmail.com (Ivan Lazar Miljenovic) Date: Sun, 7 Jun 2015 09:20:37 +1000 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> Message-ID: On 7 June 2015 at 08:21, Sven Panne wrote: > That's exactly what I'm asking for: A new {-# LANGUAGE FunkyImports #-} > pragma (name to be decided ;-), which must be mentioned in a cabal file's > "extension:" field > (https://www.haskell.org/cabal/users-guide/developing-packages.html#creating-a-package). > Failing to mention a language extension is just as wrong as declaring wrong > bounds. I was under the impression that the "extension:" fields were only used for extensions that were used by every module in the package. From that link: Extensions used only by one module may be specified by placing a LANGUAGE pragma in the source file affected, -- Ivan Lazar Miljenovic Ivan.Miljenovic at gmail.com http://IvanMiljenovic.wordpress.com From acowley at seas.upenn.edu Sun Jun 7 00:18:47 2015 From: acowley at seas.upenn.edu (Anthony Cowley) Date: Sat, 6 Jun 2015 20:18:47 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <871thojwir.fsf@gnu.org> References: <1433361209.18957.7.camel@gmail.com> <87wpzj5hi5.fsf@gnu.org> <87pp5b5ftu.fsf@gnu.org> <871thojwir.fsf@gnu.org> Message-ID: On Sat, Jun 6, 2015 at 6:35 PM, Herbert Valerio Riedel wrote: > On 2015-06-04 at 23:36:01 +0200, Anthony Cowley wrote: >>> On Jun 4, 2015, at 5:22 PM, Herbert Valerio Riedel wrote: >>> >>>> On 2015-06-04 at 23:05:42 +0200, Alexey Shmalko wrote: >>>> If I understand correctly, the initial proposal was to enable the new >>>> syntax by default and it mustn't break any code (full >>>> backward-compatible). >>> >>> That would be a departure from how language extensions were handled in >>> GHC in the past afaik, and if there's no language pragma to toggle this >>> new syntax, Cabal has no way to know that a new language syntax is >>> required and that thereby needs exclude (not implemented yet) the >>> affected package versions from the install-plan configuration space. > >> I can't parse your last sentence. > > I'll rephrase: Extending the syntax GHC accepts beyond H2010 w/o a > language flag (but if I understood you correctly, you stated that > there's gonna be an associated language pragma) is not desirable, since you > wouldn't be able communicate that requirement to Cabal via the > other-extensions/default-extensions mechanism (albeit that information > is currently not used early enough to affect the install-plan solver, > see also [1]) > > While I'm mildly against having this new syntax enabled in GHC's > default-mode (i.e. when neither -XHaskell2010 nor -XHaskell98 is set), > I'm strongly against enabling it implicitly via -XHaskell2010, as when > you request -XHaskell2010 you want GHC ideally to tell you when you're > using syntax beyond H2010. Just to be clear, that ideal is not reality, is it? I can pass ghc -XHaskell2010 and use syntactic extensions in my programs today (e.g. LambdaCase). I can additionally pass ghc -Wall and not hear about it. So I think what you're writing here is a proposal for a new GHC feature that restricts available syntactic extensions in the presence of a language standard flag? The interplay between things like Haskell2010 and other language extensions isn't great. It would be nice to have a better story, but I think that really is a separate issue wherein you want Haskell2010 to act like a meta-pragma to ensure that the file really is Haskell2010 compatible. I am not volunteering to make that happen :) Anthony From alexander.kjeldaas at gmail.com Sun Jun 7 00:25:48 2015 From: alexander.kjeldaas at gmail.com (Alexander Kjeldaas) Date: Sun, 7 Jun 2015 02:25:48 +0200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <5572AEB1.9050002@gmail.com> References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> <5572AEB1.9050002@gmail.com> Message-ID: On Sat, Jun 6, 2015 at 10:26 AM, Vlatko Basic wrote: > Maybe a slightly changed syntax like this could be less confusing > > > import Data.Map (Map) andAs M (...) > > or > > import Data.Map (Map) and as M (...) > > > It is clear (IMHO) what is coming from where, and both lists are at the > end of their part, so can be written nicely in several rows, if needed. > > > import Data.Map (Map) > andAs M (lengthy, > list) > > Parser can also easily distinguish between the current and the new syntax > so they can coexist, so no backward compatibility problem. > > I much prefer a syntax with a bit more words, like this one. The original proposal is simply impossible to understand without reading a manual. It has at least two equally valid interpretations. Adding one or two words like in this examples makes it possible, without reading a manual, to distinguish between possible interpretations. I think that must be a minimal requirement for such a syntax extension. Nobody needs to hire a language lawyer to understand a python import statement. That shouldn't be needed for Haskell either. Alexander -------------- next part -------------- An HTML attachment was scrubbed... URL: From _deepfire at feelingofgreen.ru Sun Jun 7 00:46:57 2015 From: _deepfire at feelingofgreen.ru (Kosyrev Serge) Date: Sun, 07 Jun 2015 03:46:57 +0300 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: (sfid-20150607_044128_416103_BE9950E3) (Alexander Kjeldaas's message of "Sun, 7 Jun 2015 02:25:48 +0200") References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> <5572AEB1.9050002@gmail.com> Message-ID: <87vbf02vlq.fsf@andromedae.feelingofgreen.ru> Alexander Kjeldaas writes: > On Sat, Jun 6, 2015 at 10:26 AM, Vlatko Basic wrote: > Maybe a slightly changed syntax like this could be less confusing > > import Data.Map (Map) andAs M (...) > > or > > import Data.Map (Map) and as M (...) > > > It is clear (IMHO) what is coming from where, and both lists are at the end of > their part, so can be written nicely in several rows, if needed. > > > import Data.Map (Map) > andAs M (lengthy, > list) > > I much prefer a syntax with a bit more words, like this one. The original proposal > is simply impossible to understand without reading a manual. It has at least two > equally valid interpretations. > > Adding one or two words like in this examples makes it possible, without reading a > manual, to distinguish between possible interpretations. I think that must be a > minimal requirement for such a syntax extension. Nobody needs to hire a language > lawyer to understand a python import statement. That shouldn't be needed for > Haskell either. In the seemingly prevalent spirit of vote-counting, an empathic +1. -- respectfully, ??????? ?????? From wren at community.haskell.org Sun Jun 7 00:49:35 2015 From: wren at community.haskell.org (wren romano) Date: Sat, 6 Jun 2015 20:49:35 -0400 Subject: [Haskell-cafe] ANN: bytestring-lexing 0.5.0 Message-ID: -------------------------------------------- -- bytestring-lexing 0.5.0 -------------------------------------------- The bytestring-lexing package offers extremely efficient bytestring parsers for some common lexemes: namely integral and fractional numbers. In addition, it provides efficient serializers for (some of) the formats it parses. As of version 0.3.0, bytestring-lexing offers the best-in-show parsers for integral values. (According to the Warp web server's benchmark of parsing the Content-Length field of HTTP headers.) And as of this version (0.5.0) it offers (to my knowledge) the best-in-show parser for fractional/floating numbers. -------------------------------------------- -- Changes since 0.4.3 (2013-03-21) -------------------------------------------- I've completely overhauled the parsers for fractional numbers. The old Data.ByteString.Lex.Double and Data.ByteString.Lex.Lazy.Double modules have been removed, as has their reliance on Alex as a build tool. I know some users were reluctant to use bytestring-lexing because of that dependency, and forked their own version of bytestring-lexing-0.3.0's integral parsers. This is no longer an issue, and those users are requested to switch over to using bytestring-lexing. The old modules are replaced by the new Data.ByteString.Lex.Fractional module. This module provides two variants of the primary parsers. The readDecimal and readExponential functions are very simple and should suffice for most users' needs. The readDecimalLimited and readExponentialLimited are variants which take an argument specifying the desired precision limit (in decimal digits). With care, the limited-precision parsers can perform far more efficiently than the unlimited-precision parsers. Performance aside, they can also be used to intentionally restrict the precision of your program's inputs. -------------------------------------------- -- Benchmarks -------------------------------------------- For the Criterion output of the benchmark discussed below, see . The main competitors we compare against are the previous version of bytestring-lexing (which already surpassed text and attoparsec/scientific) and bytestring-read which was the previous best-in-show. The unlimited-precision parsers provide 3.3x to 3.9x speedup over the readDouble function from bytestring-lexing-0.4.3.3, as well as being polymorphic over all Fractional values. For Float/Double: these functions have essentially the same performance as bytestring-read on reasonable inputs (1.07x to 0.89x), but for inputs which have far more precision than Float/Double can handle these functions are much slower than bytestring-read (0.30x 'speedup'). However, for Rational: these functions provide 1.26x to 1.96x speedup compared to bytestring-read. The limited-precision parsers do even better, but require some care to use properly. For types with infinite precision (e.g., Rational) we can pass in an 'infinite' limit by passing the length of the input string plus one. For Rational: doing so provides 1.5x speedup over the unlimited-precision parsers (and 1.9x to 3x speedup over bytestring-read), because we can avoid intermediate renormalizations. Whether other unlimited precision types would see the same benefit remains an open question. For types with inherently limited precision (e.g., Float/Double), we could either pass in an 'infinite' limit or we could pass in the actual inherent limit. For types with inherently limited precision, passing in an 'infinite' limit degrades performance compared to the unlimited-precision parsers (0.51x to 0.8x 'speedup'). Whereas, passing in the actual inherent limit gives 1.3x to 4.5x speedup over the unlimited-precision parsers. They also provide 1.2x to 1.4x speedup over bytestring-read; for a total of 5.1x to 14.4x speedup over bytestring-lexing-0.4.3.3! -------------------------------------------- -- Links -------------------------------------------- Homepage: http://code.haskell.org/~wren/ Hackage: http://hackage.haskell.org/package/bytestring-lexing Darcs: http://community.haskell.org/~wren/bytestring-lexing Haddock (Darcs version): http://community.haskell.org/~wren/bytestring-lexing/dist/doc/html/bytestring-lexing -- Live well, ~wren From ivan.miljenovic at gmail.com Sun Jun 7 01:03:43 2015 From: ivan.miljenovic at gmail.com (Ivan Lazar Miljenovic) Date: Sun, 7 Jun 2015 11:03:43 +1000 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> Message-ID: On 7 June 2015 at 09:20, Ivan Lazar Miljenovic wrote: > On 7 June 2015 at 08:21, Sven Panne wrote: >> That's exactly what I'm asking for: A new {-# LANGUAGE FunkyImports #-} >> pragma (name to be decided ;-), which must be mentioned in a cabal file's >> "extension:" field >> (https://www.haskell.org/cabal/users-guide/developing-packages.html#creating-a-package). >> Failing to mention a language extension is just as wrong as declaring wrong >> bounds. > > I was under the impression that the "extension:" fields were only used > for extensions that were used by every module in the package. From > that link: > > Extensions used only by one module may be specified by placing a > LANGUAGE pragma in the source file affected, Oh, and just to chime in on the voting, I'm -1 (I don't think the current syntax is ideal, but I'm not a fan of the proposal. Does this come under the power of 1 by Wadler's Law? ;-) -- Ivan Lazar Miljenovic Ivan.Miljenovic at gmail.com http://IvanMiljenovic.wordpress.com From acowley at seas.upenn.edu Sun Jun 7 01:29:56 2015 From: acowley at seas.upenn.edu (Anthony Cowley) Date: Sat, 6 Jun 2015 21:29:56 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> <5572AEB1.9050002@gmail.com> Message-ID: On Sat, Jun 6, 2015 at 8:25 PM, Alexander Kjeldaas wrote: > On Sat, Jun 6, 2015 at 10:26 AM, Vlatko Basic > wrote: >> >> Maybe a slightly changed syntax like this could be less confusing >> >> >> import Data.Map (Map) andAs M (...) >> >> or >> >> import Data.Map (Map) and as M (...) >> >> >> It is clear (IMHO) what is coming from where, and both lists are at the >> end of their part, so can be written nicely in several rows, if needed. >> >> >> import Data.Map (Map) >> andAs M (lengthy, >> list) >> >> Parser can also easily distinguish between the current and the new syntax >> so they can coexist, so no backward compatibility problem. >> > > > I much prefer a syntax with a bit more words, like this one. The original > proposal is simply impossible to understand without reading a manual. It > has at least two equally valid interpretations. > > Adding one or two words like in this examples makes it possible, without > reading a manual, to distinguish between possible interpretations. I think > that must be a minimal requirement for such a syntax extension. Nobody > needs to hire a language lawyer to understand a python import statement. > That shouldn't be needed for Haskell either. > > Alexander Thanks for the feedback, Vlatko, Alexander, and Kosyrev! I would like the syntax to avoid being overly hostile to newcomers, so some tweaks are certainly possible. So that I understand, you believe that a newcomer could read import Data.Map (Map) andAs M (lengthy) and infer which names are qualified and which aren't without consulting a manual, whereas without the "and" it would be "impossible to understand"? I confess I find that hard to believe, but I'll bear it in mind in case this option picks up wider support. There are already three of you on board, so it's off to a good start. Anthony From cma at bitemyapp.com Sun Jun 7 01:43:59 2015 From: cma at bitemyapp.com (Christopher Allen) Date: Sat, 6 Jun 2015 20:43:59 -0500 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> <5572AEB1.9050002@gmail.com> Message-ID: Why guess when we could test this? This is a bit of syntax and it has equivalents in other programming languages, so there's no reason in principle why we couldn't just make a multiple choice quiz. Have programmers that haven't ever used Haskell before declare what languages they know, take the quiz, then we see what does and doesn't confuse them. On Sat, Jun 6, 2015 at 8:29 PM, Anthony Cowley wrote: > On Sat, Jun 6, 2015 at 8:25 PM, Alexander Kjeldaas > wrote: > > On Sat, Jun 6, 2015 at 10:26 AM, Vlatko Basic > > wrote: > >> > >> Maybe a slightly changed syntax like this could be less confusing > >> > >> > >> import Data.Map (Map) andAs M (...) > >> > >> or > >> > >> import Data.Map (Map) and as M (...) > >> > >> > >> It is clear (IMHO) what is coming from where, and both lists are at the > >> end of their part, so can be written nicely in several rows, if needed. > >> > >> > >> import Data.Map (Map) > >> andAs M (lengthy, > >> list) > >> > >> Parser can also easily distinguish between the current and the new > syntax > >> so they can coexist, so no backward compatibility problem. > >> > > > > > > I much prefer a syntax with a bit more words, like this one. The > original > > proposal is simply impossible to understand without reading a manual. It > > has at least two equally valid interpretations. > > > > Adding one or two words like in this examples makes it possible, without > > reading a manual, to distinguish between possible interpretations. I > think > > that must be a minimal requirement for such a syntax extension. Nobody > > needs to hire a language lawyer to understand a python import statement. > > That shouldn't be needed for Haskell either. > > > > Alexander > > Thanks for the feedback, Vlatko, Alexander, and Kosyrev! I would like > the syntax to avoid being overly hostile to newcomers, so some tweaks > are certainly possible. > > So that I understand, you believe that a newcomer could read > > import Data.Map (Map) andAs M (lengthy) > > and infer which names are qualified and which aren't without > consulting a manual, whereas without the "and" it would be "impossible > to understand"? I confess I find that hard to believe, but I'll bear > it in mind in case this option picks up wider support. There are > already three of you on board, so it's off to a good start. > > Anthony > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -- Chris Allen Currently working on http://haskellbook.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From byron.hale at einfo.com Sun Jun 7 02:50:32 2015 From: byron.hale at einfo.com (Byron Hale) Date: Sat, 06 Jun 2015 19:50:32 -0700 Subject: [Haskell-cafe] Attacking Attachment "Cancelled Event" Bayhac 15 Message-ID: <5573B178.3050205@einfo.com> Bayhac 15 has not been cancelled. See http://bayhac.org/ @bayhac2015 Do NOT open the attachment to the cancelling email. It is likely a sophisticated attack. The listed "organizer" is not. We may, however, have modifications. For example, we are still seeking donors for food. We are still seeking speakers, maybe even some repeats of last year's speakers. You might just dust off last year's presentation, until we run out of room. Best Regards, Byron Hale byron.hale at einfo.com @Hale_ByronL From hvr at gnu.org Sun Jun 7 06:09:20 2015 From: hvr at gnu.org (Herbert Valerio Riedel) Date: Sun, 07 Jun 2015 08:09:20 +0200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: (Anthony Cowley's message of "Sat, 6 Jun 2015 20:18:47 -0400") References: <1433361209.18957.7.camel@gmail.com> <87wpzj5hi5.fsf@gnu.org> <87pp5b5ftu.fsf@gnu.org> <871thojwir.fsf@gnu.org> Message-ID: <873824hwxb.fsf@gnu.org> On 2015-06-07 at 02:18:47 +0200, Anthony Cowley wrote: > On Sat, Jun 6, 2015 at 6:35 PM, Herbert Valerio Riedel wrote: >> On 2015-06-04 at 23:36:01 +0200, Anthony Cowley wrote: >>>> On Jun 4, 2015, at 5:22 PM, Herbert Valerio Riedel wrote: >>>> >>>>> On 2015-06-04 at 23:05:42 +0200, Alexey Shmalko wrote: >>>>> If I understand correctly, the initial proposal was to enable the new >>>>> syntax by default and it mustn't break any code (full >>>>> backward-compatible). >>>> >>>> That would be a departure from how language extensions were handled in >>>> GHC in the past afaik, and if there's no language pragma to toggle this >>>> new syntax, Cabal has no way to know that a new language syntax is >>>> required and that thereby needs exclude (not implemented yet) the >>>> affected package versions from the install-plan configuration space. >> >>> I can't parse your last sentence. >> >> I'll rephrase: Extending the syntax GHC accepts beyond H2010 w/o a >> language flag (but if I understood you correctly, you stated that >> there's gonna be an associated language pragma) is not desirable, since you >> wouldn't be able communicate that requirement to Cabal via the >> other-extensions/default-extensions mechanism (albeit that information >> is currently not used early enough to affect the install-plan solver, >> see also [1]) >> >> While I'm mildly against having this new syntax enabled in GHC's >> default-mode (i.e. when neither -XHaskell2010 nor -XHaskell98 is set), >> I'm strongly against enabling it implicitly via -XHaskell2010, as when >> you request -XHaskell2010 you want GHC ideally to tell you when you're >> using syntax beyond H2010. > > Just to be clear, that ideal is not reality, is it? I can pass ghc > -XHaskell2010 and use syntactic extensions in my programs today (e.g. > LambdaCase). *Only* if you also explicitly enable them, e.g. if you have a module which only contains {-# LANGUAGE Haskell2010 #-} and let's assume for simplicity there are no additional -X* flags passed via the CLI to GHC, then you can't use syntactic extensions like LambdaCase; i.e. the following module {-# LANGUAGE Haskell2010 #-} module M1 where f :: () -> () f = \case () -> () when compiled with `ghc -Wall -c M1.hs` is rightfully rejected with: M1.hs:6:5: parse error: naked lambda expression '' However, if an additional `{-# LANGUAGE LambdaCase #-} is added, GHC compiles it w/o any complaint. > I can additionally pass ghc -Wall and not hear about it. > So I think what you're writing here is a proposal for a new GHC > feature that restricts available syntactic extensions in the presence > of a language standard flag? Maybe I was unclear, but I didn't mean that -XHaskell2010 should enable additional warnings for additionally *requested* language extensions. If I write {-# LANGUAGE Haskell2010 #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE RecordWildcards #-} into a module, I explicitly state that the code requires Haskell2010 syntax *with* additionally those 3 syntax extensions enabled (which btw are syntax extensions that afaik don't break any legal Haskell2010, and hence could be enabled by default -- but GHC doesn't enable them by default either!). There's obviously no point in warning if I really make use of those additional language extension, as that's what the pragma-mechanism is for in the first place. > The interplay between things like Haskell2010 and other language > extensions isn't great. It would be nice to have a better story, but I > think that really is a separate issue wherein you want Haskell2010 to > act like a meta-pragma to ensure that the file really is Haskell2010 > compatible. I am not volunteering to make that happen :) To be clear, I only meant to say that the presence of -XHaskell2010 (or equivalently, {-# LANGUAGE Haskell2010 #-}) *without* any additional -X flags or LANGUAGE-pragmas is supposed to enable only the minimum required syntax extensions to provide the Haskell2010 syntax, as any syntax beyond Haskell2010 ought to be provided via -X/LANGUAGE pragmas. See also https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/bugs-and-infelicities.html#vs-Haskell-defn which states that | By default, GHC mainly aims to behave (mostly) like a Haskell 2010 | compiler, although you can tell it to try to behave like a particular | version of the language with the -XHaskell98 and -XHaskell2010 flags. and fwiw GHC's default-mode is not the same as -XHaskell2010 From malcolm.wallace at me.com Sun Jun 7 07:32:29 2015 From: malcolm.wallace at me.com (Malcolm Wallace) Date: Sun, 07 Jun 2015 08:32:29 +0100 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <87vbf02vlq.fsf@andromedae.feelingofgreen.ru> References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> <5572AEB1.9050002@gmail.com> <87vbf02vlq.fsf@andromedae.feelingofgreen.ru> Message-ID: <40CEE336-CE50-4091-A5BB-CAA0A3C1EB6F@me.com> >> On Sat, Jun 6, 2015 at 10:26 AM, Vlatko Basic wrote: >> >> import Data.Map (Map) >> andAs M (lengthy, >> list) >> >> I much prefer a syntax with a bit more words, like this one. The original proposal >> is simply impossible to understand without reading a manual. It has at least two >> equally valid interpretations. Just to be even more explicit, at the cost of a tiny bit more syntax, how about the following proposal? import Data.Map (Map) import qualified Data.Map as M (lengthy,list) Regards, Malcolm From dreixel at gmail.com Sun Jun 7 07:34:31 2015 From: dreixel at gmail.com (=?UTF-8?Q?Jos=C3=A9_Pedro_Magalh=C3=A3es?=) Date: Sun, 7 Jun 2015 08:34:31 +0100 Subject: [Haskell-cafe] GHC.Generics: how to derive a Generic instance for an existential type? In-Reply-To: <5572F8A1.6060301@ifi.lmu.de> References: <5572F8A1.6060301@ifi.lmu.de> Message-ID: Hi Andreas, No, GHC.Generics doesn't support existentials. If your existentials are used as arguments to constructors (like in the example you've provided), the only approach I'm aware of that might help you is this: Alexey Rodriguez Yakushev and Johan Jeuring. Enumerating Well-Typed Terms Generically. In Proceedings workshop on Approaches and Applications of Inductive Programming 2009. (This reference seems to be missing its references. You could also look at Chapter 5 of Alexey's thesis .) If your existentials are used only as indices, then you could look at this: Jos? Pedro Magalh?es and Johan Jeuring. Generic Programming for Indexed Datatypes. In Proceedings of the 7th ACM SIGPLAN Workshop on Generic Programming (WGP'11), pp. 37?46, ACM, 2011. (Chapter 10 of my thesis has a more up-to-date version.) Cheers, Pedro On Sat, Jun 6, 2015 at 2:41 PM, Andreas Abel wrote: > I wonder whether GHC.Generics supports existential types yet... > > {-# LANGUAGE DeriveGeneric #-} > {-# LANGUAGE ExistentialQuantification #-} > {-# LANGUAGE StandaloneDeriving #-} > > import GHC.Generics > > data U = forall a. (Generic a) => U a > -- deriving (Generic) > -- Can't make a derived instance of ?Generic U?: > -- Constructor ?U? has existentials or constraints in its type > -- Possible fix: use a standalone deriving declaration instead > > -- deriving instance Generic U > -- Can't make a derived instance of ?Generic U?: > -- U must be a vanilla data constructor > -- In the stand-alone deriving instance for ?Generic U? > > data D1Ser > data C1_0Ser > > instance Generic U where > type Rep U = D D1Ser (C1 C1_0Ser (S1 NoSelector (Rep a))) > -- Not in scope: type variable ?a? > > -- How to bring the existential type `a' into scope? > > -- > Andreas Abel <>< Du bist der geliebte Mensch. > > Department of Computer Science and Engineering > Chalmers and Gothenburg University, Sweden > > andreas.abel at gu.se > http://www2.tcs.ifi.lmu.de/~abel/ > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From heraldhoi at gmail.com Sun Jun 7 08:26:45 2015 From: heraldhoi at gmail.com (Geraldus) Date: Sun, 07 Jun 2015 08:26:45 +0000 Subject: [Haskell-cafe] [Haskell] ANN: nonce package In-Reply-To: <20150523160211.GA10577@nibbler> References: <555FB66A.9000904@gmail.com> <20150523160211.GA10577@nibbler> Message-ID: Hi, Felipe! Thank you for sharing! The one question I have is there some good way to generate unique nonces? ??, 23 ??? 2015 ?. ? 22:01, Tobias Dammers : > Looks useful; feature request: something like > > nonce :: MonadIO => Int -> Generator > > (plus -url and -T flavors, obviously). I believe allowing the programmer > to balance security vs. usability demands would be a good thing overall > and worth a knob. > > -> m ByteString > On Fri, May 22, 2015 at 08:06:18PM -0300, Felipe Lessa wrote: > > (Please forgive me if you received multiple copies of this e-mail.) > > > > Hello, > > > > The nonce package [1] contains functions to easily generate > > cryptographic nonces for many situations. Some places where these > > generated nonces can be used include: > > > > - Password recovery e-mail tokens. > > > > - XSRF protection tokens. > > > > - Session IDs sent on cookies. > > > > - Initialization vectors. > > > > It uses an AES CPRNG periodically reseeded from /dev/urandom (or > > equivalent). It has no frills, no knobs, so it's hard to misuse. It's > > been available for an year but I just realized I've never properly > > announced it. > > > > Regrettably, I've seen many uses of the random package (System.Random) > > when generating nonces. It's a bad choice: it is not a > > cryptographically secure PRNG, contains low entropy (64-bit state), and > > its default usage is seeded predictably (using a constant seed). Please > > avoid using the random package for generating nonces at all costs. In > > its stead, use the nonce package or something similar. > > > > Cheers, > > > > [1] http://hackage.haskell.org/package/nonce > > > > -- > > Felipe. > > > > > > > _______________________________________________ > > Haskell mailing list > > Haskell at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell > > > -- > Tobias Dammers - tdammers at gmail.com > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vlatko.basic at gmail.com Sun Jun 7 09:09:08 2015 From: vlatko.basic at gmail.com (Vlatko Basic) Date: Sun, 07 Jun 2015 11:09:08 +0200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> <5572AEB1.9050002@gmail.com> Message-ID: <55740A34.7050105@gmail.com> -------- Original Message -------- Subject: Re: [Haskell-cafe] Proposal: Shorter Import Syntax From: Anthony Cowley To: haskell-cafe Date: 07/06/15 03:29 > On Sat, Jun 6, 2015 at 8:25 PM, Alexander Kjeldaas > wrote: >> On Sat, Jun 6, 2015 at 10:26 AM, Vlatko Basic >> wrote: >>> >>> Maybe a slightly changed syntax like this could be less confusing >>> >>> >>> import Data.Map (Map) andAs M (...) >>> >>> or >>> >>> import Data.Map (Map) and as M (...) >>> >>> >>> It is clear (IMHO) what is coming from where, and both lists are at the >>> end of their part, so can be written nicely in several rows, if needed. >>> >>> >>> import Data.Map (Map) >>> andAs M (lengthy, >>> list) >>> >>> Parser can also easily distinguish between the current and the new syntax >>> so they can coexist, so no backward compatibility problem. >>> >> >> >> I much prefer a syntax with a bit more words, like this one. The original >> proposal is simply impossible to understand without reading a manual. It >> has at least two equally valid interpretations. >> >> Adding one or two words like in this examples makes it possible, without >> reading a manual, to distinguish between possible interpretations. I think >> that must be a minimal requirement for such a syntax extension. Nobody >> needs to hire a language lawyer to understand a python import statement. >> That shouldn't be needed for Haskell either. >> >> Alexander > > Thanks for the feedback, Vlatko, Alexander, and Kosyrev! I would like > the syntax to avoid being overly hostile to newcomers, so some tweaks > are certainly possible. > > So that I understand, you believe that a newcomer could read > > import Data.Map (Map) andAs M (lengthy) > > and infer which names are qualified and which aren't without > consulting a manual, whereas without the "and" it would be "impossible > to understand"? I confess I find that hard to believe, but I'll bear > it in mind in case this option picks up wider support. There are > already three of you on board, so it's off to a good start. > > Anthony Well, when combining two sentences in natural language, you'd use a "comma" or the word "and" to distinguish between the two. Since we can't use comma here (can we?), the word "and" unambiguously shows that "as" does not relate to the previous "Data.Map (Map)", but is a beginning of the "new", qualified import. I think that is quite clear in this syntax. So to answer your question, I think yes, this would be clear to anyone, not only newcommers, that those are actually two combined imports, unqualified and qualified, without "consulting the manual". :-) Some other syntax/wording on the same track would be fine as well. br, vlatko From heraldhoi at gmail.com Sun Jun 7 09:44:02 2015 From: heraldhoi at gmail.com (Geraldus) Date: Sun, 07 Jun 2015 09:44:02 +0000 Subject: [Haskell-cafe] [Haskell] ANN: nonce package In-Reply-To: References: <555FB66A.9000904@gmail.com> <20150523160211.GA10577@nibbler> Message-ID: Also it is good to make a new generator in function which produces a nonce? E.g. generateNonce :: forall (m :: * -> *). (MonadIO m, Functor m) => m Text generateNonce = do g <- new nonce128urlT g ??, 7 ???? 2015 ?. ? 13:26, Geraldus : > Hi, Felipe! Thank you for sharing! > > The one question I have is there some good way to generate unique nonces? > > ??, 23 ??? 2015 ?. ? 22:01, Tobias Dammers : > >> Looks useful; feature request: something like >> >> nonce :: MonadIO => Int -> Generator >> >> (plus -url and -T flavors, obviously). I believe allowing the programmer >> to balance security vs. usability demands would be a good thing overall >> and worth a knob. >> >> -> m ByteString >> On Fri, May 22, 2015 at 08:06:18PM -0300, Felipe Lessa wrote: >> > (Please forgive me if you received multiple copies of this e-mail.) >> > >> > Hello, >> > >> > The nonce package [1] contains functions to easily generate >> > cryptographic nonces for many situations. Some places where these >> > generated nonces can be used include: >> > >> > - Password recovery e-mail tokens. >> > >> > - XSRF protection tokens. >> > >> > - Session IDs sent on cookies. >> > >> > - Initialization vectors. >> > >> > It uses an AES CPRNG periodically reseeded from /dev/urandom (or >> > equivalent). It has no frills, no knobs, so it's hard to misuse. It's >> > been available for an year but I just realized I've never properly >> > announced it. >> > >> > Regrettably, I've seen many uses of the random package (System.Random) >> > when generating nonces. It's a bad choice: it is not a >> > cryptographically secure PRNG, contains low entropy (64-bit state), and >> > its default usage is seeded predictably (using a constant seed). Please >> > avoid using the random package for generating nonces at all costs. In >> > its stead, use the nonce package or something similar. >> > >> > Cheers, >> > >> > [1] http://hackage.haskell.org/package/nonce >> > >> > -- >> > Felipe. >> > >> >> >> >> > _______________________________________________ >> > Haskell mailing list >> > Haskell at haskell.org >> > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell >> >> >> -- >> Tobias Dammers - tdammers at gmail.com >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alan.zimm at gmail.com Sun Jun 7 12:02:54 2015 From: alan.zimm at gmail.com (Alan & Kim Zimmerman) Date: Sun, 7 Jun 2015 14:02:54 +0200 Subject: [Haskell-cafe] Haskell Tooling Infrastructure Message-ID: Now that I am finally turning back to HaRe, the question of infrastructure again comes up. Basically I woudl like to focus in the tool itself, but it can only be useful if it can deal with real world environments. This means properly managing all the different project and compiler environments, and being integrated into IDEs. The current version uses ghc-mod for the lower level interface, and a simple command line interface for the IDE integration. But I have a definite sense that as a community every tool maker is solving the same problems over and over, from ghc-mod to ide-backend to ghci-ng, and onwards. To start a discussion around some kind of architeccture that tool writers can develop agains, ide's can integrat against and ghc/cabal can eventually internalise, I have put some basic points down at https://github.com/RefactoringTools/HaRe/wiki/Requirements-for-IDE-GHC-interfacing Regards Alan -------------- next part -------------- An HTML attachment was scrubbed... URL: From felipe.lessa at gmail.com Sun Jun 7 12:43:35 2015 From: felipe.lessa at gmail.com (Felipe Lessa) Date: Sun, 07 Jun 2015 09:43:35 -0300 Subject: [Haskell-cafe] [Haskell] ANN: nonce package In-Reply-To: References: <555FB66A.9000904@gmail.com> <20150523160211.GA10577@nibbler> Message-ID: <55743C77.1030105@gmail.com> On 07-06-2015 06:44, Geraldus wrote: > ??, 7 ???? 2015 ?. ? 13:26, Geraldus >: > > Hi, Felipe! Thank you for sharing! > > The one question I have is there some good way to generate unique > nonces? Nonces generated by the nonce package are always unique. If not, there's a huge bug, or your /dev/urandom is broken. > Also it is good to make a new generator in function which > produces a nonce? E.g. > > generateNonce :: forall (m :: * -> *). (MonadIO m, Functor m) => m Text > generateNonce = > do g <- new > nonce128urlT g You will not shoot yourself in the foot security-wise. You are not able to distinguish a sequence of nonces generated by replicateM n (new >>= nonce128urlT) vs new >>= replicateM n . nonce128urlT However, 'new' is a _very_ expensive function. Your generateNonce function will have abysmal performance (and so will the first example above). Please avoid creating many generators. Cheers, -- Felipe. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From rehno.lindeque at gmail.com Sun Jun 7 13:33:48 2015 From: rehno.lindeque at gmail.com (Rehno Lindeque) Date: Sun, 7 Jun 2015 06:33:48 -0700 (PDT) Subject: [Haskell-cafe] zipWith and divide In-Reply-To: <4ed22d29-5c8f-4101-af78-0387afb0c575@googlegroups.com> References: <4ed22d29-5c8f-4101-af78-0387afb0c575@googlegroups.com> Message-ID: <22a14a7f-b2e1-4c4d-b60f-1bdbae6a241a@googlegroups.com> Hi! > zipWith(\) z1 z2 ........ this fails but works when using * or + or - > ....... I also tried using div and `div` but they failed to. > The divide operator is slash (/) not backslash (\): > zipWith (/) [0.1, 0.2] [0.2, 0.4] [0.5,0.5] Also, div should work as long you're using a Integral type like Int (you may be using Float or Double): > zipWith div [1, 2] [2, 2] [0,1] Cheers -------------- next part -------------- An HTML attachment was scrubbed... URL: From _deepfire at feelingofgreen.ru Sun Jun 7 20:13:24 2015 From: _deepfire at feelingofgreen.ru (Kosyrev Serge) Date: Sun, 07 Jun 2015 23:13:24 +0300 Subject: [Haskell-cafe] Haskell Tooling Infrastructure In-Reply-To: (sfid-20150607_161839_213498_07788B56) (Alan & Kim Zimmerman's message of "Sun, 7 Jun 2015 14:02:54 +0200") References: Message-ID: <87mw0b2s63.fsf@andromedae.feelingofgreen.ru> "Alan & Kim Zimmerman" writes: > Now that I am finally turning back to HaRe, the question of infrastructure again > comes up. > > Basically I woudl like to focus in the tool itself, but it can only be useful if > it can deal with real world environments. > > This means properly managing all the different project and compiler environments, > and being integrated into IDEs. > > The current version uses ghc-mod for the lower level interface, and a simple > command line interface for the IDE integration. > > But I have a definite sense that as a community every tool maker is solving the > same problems over and over, from ghc-mod to ide-backend to ghci-ng, and onwards. Filed issues for the three projects: https://github.com/kazu-yamamoto/ghc-mod/issues/494 https://github.com/fpco/ide-backend/issues/287 https://github.com/chrisdone/ghci-ng/issues/20 -- respectfully, ??????? ?????? From briand at aracnet.com Sun Jun 7 23:04:37 2015 From: briand at aracnet.com (briand at aracnet.com) Date: Sun, 7 Jun 2015 16:04:37 -0700 Subject: [Haskell-cafe] parsec or attoparsec for 40-50MB text files ? Message-ID: <20150607160437.3e84f75c@cedar.deldotd.com> Hi, My file is pretty straightforward text file with a small amount of somewhat annoying state: comments* config line comments* data line* if there is no config line it's an error. the data lines can have a variable number of values and it matters how many values there are (hey- it's not my file format !). the data lines can also have a comment at the end. My initial thought was to go with parsec but the data files could be as large as 40-50MB and upon further reading it really seemed like attoparsec would be better. Error handling wouldn't be too sophisticated. if a data line has something other than 1 or more floating point values and the optional comment, failing out with "error line X" is fine. parse time is somewhat critical only because i'll have multiple files to parse, so while 5-10 seconds is ok for one file, i have to multiply that by 5-10. I've seen several comments talking about the fact that parsec can be slow, but so far unable to find anything the quantifies "slow". Any opinions on which would be better for my application (although i think i've just talked myself into using attoparsec) ? In particular- am i going to get at least reasonable "error on line X" error handling using attoparsec ? Thanks, Brian From lambda.fairy at gmail.com Mon Jun 8 00:23:19 2015 From: lambda.fairy at gmail.com (Chris Wong) Date: Mon, 8 Jun 2015 12:23:19 +1200 Subject: [Haskell-cafe] parsec or attoparsec for 40-50MB text files ? In-Reply-To: <20150607160437.3e84f75c@cedar.deldotd.com> References: <20150607160437.3e84f75c@cedar.deldotd.com> Message-ID: Hi Brian, Parsec and Attoparsec have very similar interfaces (afaik the only difference is that Attoparsec backtracks by default, so the "try" combinator is a no-op) so there's no harm in trying both. Alternatively: if the data format is simple enough, you can write the parser by hand. The Data.Text.Read module may help if you pursue this option. [1] Chris [1]: https://hackage.haskell.org/package/text-1.2.1.1/docs/Data-Text-Read.html On Mon, Jun 8, 2015 at 11:04 AM, wrote: > Hi, > > My file is pretty straightforward text file with a small amount of somewhat annoying state: > > comments* > config line > comments* > data line* > > if there is no config line it's an error. the data lines can have a variable number of values and it matters how many values there are (hey- it's not my file format !). the data lines can also have a comment at the end. > > My initial thought was to go with parsec but the data files could be as large as 40-50MB and upon further reading it really seemed like attoparsec would be better. Error handling wouldn't be too sophisticated. if a data line has something other than 1 or more floating point values and the optional comment, failing out with "error line X" is fine. > > parse time is somewhat critical only because i'll have multiple files to parse, so while 5-10 seconds is ok for one file, i have to multiply that by 5-10. > > I've seen several comments talking about the fact that parsec can be slow, but so far unable to find anything the quantifies "slow". > > Any opinions on which would be better for my application (although i think i've just talked myself into using attoparsec) ? > > In particular- am i going to get at least reasonable "error on line X" error handling using attoparsec ? > > > Thanks, > > Brian > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe -- https://lambda.xyz From dasuraga at gmail.com Mon Jun 8 01:36:51 2015 From: dasuraga at gmail.com (Raphael Gaschignard) Date: Mon, 08 Jun 2015 01:36:51 +0000 Subject: [Haskell-cafe] parsec or attoparsec for 40-50MB text files ? In-Reply-To: References: <20150607160437.3e84f75c@cedar.deldotd.com> Message-ID: offtopic, but since we are talking about Parsec/Attoparsec, is there a way to have try by default in Parsec as well? On Mon, Jun 8, 2015 at 9:23 AM Chris Wong wrote: > Hi Brian, > > Parsec and Attoparsec have very similar interfaces (afaik the only > difference is that Attoparsec backtracks by default, so the "try" > combinator is a no-op) so there's no harm in trying both. > > Alternatively: if the data format is simple enough, you can write the > parser by hand. The Data.Text.Read module may help if you pursue this > option. [1] > > Chris > > [1]: > https://hackage.haskell.org/package/text-1.2.1.1/docs/Data-Text-Read.html > > On Mon, Jun 8, 2015 at 11:04 AM, wrote: > > Hi, > > > > My file is pretty straightforward text file with a small amount of > somewhat annoying state: > > > > comments* > > config line > > comments* > > data line* > > > > if there is no config line it's an error. the data lines can have a > variable number of values and it matters how many values there are (hey- > it's not my file format !). the data lines can also have a comment at the > end. > > > > My initial thought was to go with parsec but the data files could be as > large as 40-50MB and upon further reading it really seemed like attoparsec > would be better. Error handling wouldn't be too sophisticated. if a data > line has something other than 1 or more floating point values and the > optional comment, failing out with "error line X" is fine. > > > > parse time is somewhat critical only because i'll have multiple files to > parse, so while 5-10 seconds is ok for one file, i have to multiply that by > 5-10. > > > > I've seen several comments talking about the fact that parsec can be > slow, but so far unable to find anything the quantifies "slow". > > > > Any opinions on which would be better for my application (although i > think i've just talked myself into using attoparsec) ? > > > > In particular- am i going to get at least reasonable "error on line X" > error handling using attoparsec ? > > > > > > Thanks, > > > > Brian > > > > > > _______________________________________________ > > Haskell-Cafe mailing list > > Haskell-Cafe at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > > > -- > https://lambda.xyz > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aditya.siram at gmail.com Mon Jun 8 03:23:21 2015 From: aditya.siram at gmail.com (aditya siram) Date: Sun, 7 Jun 2015 22:23:21 -0500 Subject: [Haskell-cafe] [Haddock] Alphabetize record accessors Message-ID: How would people feel about Haddock alphabetizing record accessors by default? For example: data T { b :: ..., c :: ... , a :: ... } displays as: data T { a :: ..., b :: ... , c :: ... } Seems as though projects that have large records like Cabal & Parsec would benefit from this. Thanks! -deech -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan.miljenovic at gmail.com Mon Jun 8 03:28:24 2015 From: ivan.miljenovic at gmail.com (Ivan Lazar Miljenovic) Date: Mon, 8 Jun 2015 13:28:24 +1000 Subject: [Haskell-cafe] [Haddock] Alphabetize record accessors In-Reply-To: References: Message-ID: On 8 June 2015 at 13:23, aditya siram wrote: > How would people feel about Haddock alphabetizing record accessors by > default? > > For example: > data T { b :: ..., c :: ... , a :: ... } > displays as: > data T { a :: ..., b :: ... , c :: ... } > > Seems as though projects that have large records like Cabal & Parsec would > benefit from this. In some (many?) cases, there is a logical ordering to the values. Considering my own code, the records in GraphvizParams here matches the ordering that they're used/found in the resultant Dot graph: http://hackage.haskell.org/package/graphviz-2999.17.0.2/docs/Data-GraphViz.html#t:GraphvizParams > > Thanks! > -deech > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -- Ivan Lazar Miljenovic Ivan.Miljenovic at gmail.com http://IvanMiljenovic.wordpress.com From sumit.sahrawat.apm13 at iitbhu.ac.in Mon Jun 8 03:33:13 2015 From: sumit.sahrawat.apm13 at iitbhu.ac.in (Sumit Sahrawat, Maths & Computing, IIT (BHU)) Date: Mon, 8 Jun 2015 09:03:13 +0530 Subject: [Haskell-cafe] [Haddock] Alphabetize record accessors In-Reply-To: References: Message-ID: I've seen many cases where a type is specified using a record, but it is not used for simple cases. For example, data X = X { a :: String, b :: String } let t = X "abc" "def" Thus the ordering of record elements is crucial and should match the one shown in the haddocks. It might be possible for haddock to have a button that sorts them, on demand. That'd be the best of both worlds. On 8 June 2015 at 08:58, Ivan Lazar Miljenovic wrote: > On 8 June 2015 at 13:23, aditya siram wrote: > > How would people feel about Haddock alphabetizing record accessors by > > default? > > > > For example: > > data T { b :: ..., c :: ... , a :: ... } > > displays as: > > data T { a :: ..., b :: ... , c :: ... } > > > > Seems as though projects that have large records like Cabal & Parsec > would > > benefit from this. > > In some (many?) cases, there is a logical ordering to the values. > Considering my own code, the records in GraphvizParams here matches > the ordering that they're used/found in the resultant Dot graph: > > http://hackage.haskell.org/package/graphviz-2999.17.0.2/docs/Data-GraphViz.html#t:GraphvizParams > > > > > Thanks! > > -deech > > > > _______________________________________________ > > Haskell-Cafe mailing list > > Haskell-Cafe at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > > > > > -- > Ivan Lazar Miljenovic > Ivan.Miljenovic at gmail.com > http://IvanMiljenovic.wordpress.com > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -- Regards Sumit Sahrawat -------------- next part -------------- An HTML attachment was scrubbed... URL: From allbery.b at gmail.com Mon Jun 8 03:36:11 2015 From: allbery.b at gmail.com (Brandon Allbery) Date: Sun, 7 Jun 2015 23:36:11 -0400 Subject: [Haskell-cafe] [Haddock] Alphabetize record accessors In-Reply-To: References: Message-ID: On Sun, Jun 7, 2015 at 11:23 PM, aditya siram wrote: > How would people feel about Haddock alphabetizing record accessors by > default? It occurs to me that the Haskell Report specifies that Read instances for record types accept the fields only in declaration order[1], and it might therefore be preferable to maintain that order in API documentation. [1] https://www.haskell.org/onlinereport/haskell2010/haskellch11.html#x18-18600011.4 see point 3 under "Derived instances of Read' -- brandon s allbery kf8nh sine nomine associates allbery.b at gmail.com ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From svenpanne at gmail.com Mon Jun 8 07:23:15 2015 From: svenpanne at gmail.com (Sven Panne) Date: Mon, 8 Jun 2015 09:23:15 +0200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <55740A34.7050105@gmail.com> References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> <5572AEB1.9050002@gmail.com> <55740A34.7050105@gmail.com> Message-ID: Can we please have a page on https://wiki.haskell.org/ describing the proposal (including its detailed semantics), the various counter-proposals (2? 3? I lost track to be honest), the various concerns/issues/..., pros/cons etc. ? Email threads are very bad for longer-running discussions, and even the trac ticket has already degenerated a bit into an email thread. I think by now it's very clear that more detailed discussion is needed, just counting some +1 and -1 doesn't lead us anywhere. (Language design by voting is often a terrible idea, BTW, this has been demonstrated by history many times...) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmacristovao at gmail.com Mon Jun 8 08:28:51 2015 From: jmacristovao at gmail.com (=?UTF-8?B?Sm/Do28gQ3Jpc3TDs3bDo28=?=) Date: Mon, 8 Jun 2015 09:28:51 +0100 Subject: [Haskell-cafe] parsec or attoparsec for 40-50MB text files ? In-Reply-To: References: <20150607160437.3e84f75c@cedar.deldotd.com> Message-ID: You may want to try: https://hackage.haskell.org/package/attoparsec-parsec Jo?o 2015-06-08 2:36 GMT+01:00 Raphael Gaschignard : > offtopic, but since we are talking about Parsec/Attoparsec, is there a way > to have try by default in Parsec as well? > > On Mon, Jun 8, 2015 at 9:23 AM Chris Wong wrote: > >> Hi Brian, >> >> Parsec and Attoparsec have very similar interfaces (afaik the only >> difference is that Attoparsec backtracks by default, so the "try" >> combinator is a no-op) so there's no harm in trying both. >> >> Alternatively: if the data format is simple enough, you can write the >> parser by hand. The Data.Text.Read module may help if you pursue this >> option. [1] >> >> Chris >> >> [1]: >> https://hackage.haskell.org/package/text-1.2.1.1/docs/Data-Text-Read.html >> >> On Mon, Jun 8, 2015 at 11:04 AM, wrote: >> > Hi, >> > >> > My file is pretty straightforward text file with a small amount of >> somewhat annoying state: >> > >> > comments* >> > config line >> > comments* >> > data line* >> > >> > if there is no config line it's an error. the data lines can have a >> variable number of values and it matters how many values there are (hey- >> it's not my file format !). the data lines can also have a comment at the >> end. >> > >> > My initial thought was to go with parsec but the data files could be as >> large as 40-50MB and upon further reading it really seemed like attoparsec >> would be better. Error handling wouldn't be too sophisticated. if a data >> line has something other than 1 or more floating point values and the >> optional comment, failing out with "error line X" is fine. >> > >> > parse time is somewhat critical only because i'll have multiple files >> to parse, so while 5-10 seconds is ok for one file, i have to multiply that >> by 5-10. >> > >> > I've seen several comments talking about the fact that parsec can be >> slow, but so far unable to find anything the quantifies "slow". >> > >> > Any opinions on which would be better for my application (although i >> think i've just talked myself into using attoparsec) ? >> > >> > In particular- am i going to get at least reasonable "error on line X" >> error handling using attoparsec ? >> > >> > >> > Thanks, >> > >> > Brian >> > >> > >> > _______________________________________________ >> > Haskell-Cafe mailing list >> > Haskell-Cafe at haskell.org >> > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> >> >> >> -- >> https://lambda.xyz >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben at smart-cactus.org Mon Jun 8 08:28:31 2015 From: ben at smart-cactus.org (Ben Gamari) Date: Mon, 08 Jun 2015 04:28:31 -0400 Subject: [Haskell-cafe] parsec or attoparsec for 40-50MB text files ? In-Reply-To: References: <20150607160437.3e84f75c@cedar.deldotd.com> Message-ID: <5575522F.9080903@smart-cactus.org> On 06/08/2015 04:28 AM, Jo?o Crist?v?o wrote: > You may want to try: > https://hackage.haskell.org/package/attoparsec-parsec > There is also Edward Kmett's `parsers` library [1], which supports `parsec`, `attoparsec`, as well as his own `trifecta` library behind the same interface. Cheers, - Ben [1] https://hackage.haskell.org/package/parsers From acowley at seas.upenn.edu Mon Jun 8 16:50:48 2015 From: acowley at seas.upenn.edu (Anthony Cowley) Date: Mon, 8 Jun 2015 12:50:48 -0400 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> <5572AEB1.9050002@gmail.com> <55740A34.7050105@gmail.com> Message-ID: On Mon, Jun 8, 2015 at 3:23 AM, Sven Panne wrote: > Can we please have a page on https://wiki.haskell.org/ describing the > proposal (including its detailed semantics), the various counter-proposals > (2? 3? I lost track to be honest), the various concerns/issues/..., > pros/cons etc. ? Email threads are very bad for longer-running discussions, > and even the trac ticket has already degenerated a bit into an email thread. > I think by now it's very clear that more detailed discussion is needed, just > counting some +1 and -1 doesn't lead us anywhere. (Language design by voting > is often a terrible idea, BTW, this has been demonstrated by history many > times...) The original email I sent was not a design by committee, but a PSA because when I started implementing this, I discovered that the parts of GHC dealing with imports are in rather poor shape. The work needed to shore that up touches half a dozen or so files, and I did not want to finish the work to have the patch languish. Enough popular support might have opened that door. The PSA was greeted by authors writing strongly worded rebuttals substantially longer than the four sentence proposal they obviously did not read. It received disdainful mockery based on a proprietary code base owned by a company which itself is in the process of adding new syntax that does not let us do anything we cannot do now. We were told about how cabal works as a prelude to a quiet feature request to actually make cabal work the way it was stated to work. I simply do not have the desire to navigate that kind of cognitive dissonance for a nights and weekends project, so I'm withdrawing the proposal. If someone else wishes to continue via Wiki or otherwise, that would be great. Anthony From briand at aracnet.com Tue Jun 9 03:22:23 2015 From: briand at aracnet.com (briand at aracnet.com) Date: Mon, 8 Jun 2015 20:22:23 -0700 Subject: [Haskell-cafe] parsec or attoparsec for 40-50MB text files ? In-Reply-To: <5575522F.9080903@smart-cactus.org> References: <20150607160437.3e84f75c@cedar.deldotd.com> <5575522F.9080903@smart-cactus.org> Message-ID: <20150608202223.0f67c2d4@cedar.deldotd.com> On Mon, 08 Jun 2015 04:28:31 -0400 Ben Gamari wrote: > On 06/08/2015 04:28 AM, Jo?o Crist?v?o wrote: > > You may want to try: > > https://hackage.haskell.org/package/attoparsec-parsec > > > There is also Edward Kmett's `parsers` library [1], which supports > `parsec`, `attoparsec`, as well as his own `trifecta` library behind the > same interface. > good grief, the problem with haskell parsers is that there are so many to choose from ! i'm going to start with attoparsec. one reason is that I really want to use the lazy interface just to see if i can and how it works. Also as Chris said, once i learn attoparsec I can learn the others, e.g. parsec, without too much trouble. error trapping is not too critical (although i am going to need a line number). the other slight complication is maintaining some sort of parse state- but i'll deal with that when i get to it which probably won't be for a while... Thanks very much for all the suggestions ! Brian From jeffbrown.the at gmail.com Tue Jun 9 08:45:36 2015 From: jeffbrown.the at gmail.com (Jeffrey Brown) Date: Tue, 9 Jun 2015 01:45:36 -0700 Subject: [Haskell-cafe] And, Or, Not, and [something atomic] data types: What am I doing? Message-ID: I am considering the problem of representing search results in a graph database. (Define such a database as a collection N of nodes and E of labeled edges, where a labeled edge consists of a triplet (l, n1, n2), where l is some kind of label and n1 and n2 are members of N.) I think a type something like the following would be useful: data Search = Fan { origin :: Node , label :: Label , members :: [Node] } | And Search Search | Or Search Search | Not Search In a Fan with origin o, members would be the set of Nodes p such that (label, o, p) is an edge. A Search is ultimately built out of Fans. I've seen this kind of thing before, and I believe it will lead me to some substantial problems that other people have already solved. What should I study? -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruben.astud at gmail.com Tue Jun 9 12:14:06 2015 From: ruben.astud at gmail.com (Ruben Astudillo) Date: Tue, 09 Jun 2015 09:14:06 -0300 Subject: [Haskell-cafe] Haskell users on Chile Message-ID: <5576D88E.7090203@gmail.com> Hi all I would like to see how many haskellers are living on Chile with hopes of forming a user group. If you are in here, you should reply this thread and see how many of us there are. You can also contact me to my mail. -- Ruben Astudillo. pgp: 0x3C332311 , usala en lo posible :-) Crear un haiku, en diecisiete silabas, es complica... From johannes.waldmann at htwk-leipzig.de Tue Jun 9 12:26:29 2015 From: johannes.waldmann at htwk-leipzig.de (Johannes Waldmann) Date: Tue, 9 Jun 2015 12:26:29 +0000 (UTC) Subject: [Haskell-cafe] [Haddock] Alphabetize record accessors References: Message-ID: > Read instances for record types accept the fields > only in declaration order[1], order is also important for semantics of deriving Ord, and for cost (or strictness) of deriving Eq. So, re-ordering would be confusing. - J.W. From ajnsit at gmail.com Tue Jun 9 12:46:30 2015 From: ajnsit at gmail.com (Anupam Jain) Date: Tue, 9 Jun 2015 18:16:30 +0530 Subject: [Haskell-cafe] Haskell users on Chile In-Reply-To: <5576D88E.7090203@gmail.com> References: <5576D88E.7090203@gmail.com> Message-ID: Great idea! Though not a native Chilean, I lived in Chile (Santiago) for the better part of a year in 2014-2015, where my favourite activity was infiltrating JS meetups and evangelizing Haskell :) It would be great to have a dedicated Haskell community there. -- Anupam On Tue, Jun 9, 2015 at 5:44 PM, Ruben Astudillo wrote: > Hi all > > I would like to see how many haskellers are living on Chile with hopes of > forming a user group. If you are in here, you should reply this thread and > see > how many of us there are. You can also contact me to my mail. > > -- > Ruben Astudillo. pgp: 0x3C332311 , usala en lo posible :-) > Crear un haiku, en diecisiete silabas, es complica... > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe From fuuzetsu at fuuzetsu.co.uk Tue Jun 9 14:05:21 2015 From: fuuzetsu at fuuzetsu.co.uk (Mateusz Kowalczyk) Date: Tue, 09 Jun 2015 15:05:21 +0100 Subject: [Haskell-cafe] [Haddock] Alphabetize record accessors In-Reply-To: References: Message-ID: <5576F2A1.7030107@fuuzetsu.co.uk> On 06/09/2015 01:26 PM, Johannes Waldmann wrote: >> Read instances for record types accept the fields >> only in declaration order[1], > > order is also important for semantics of deriving Ord, > and for cost (or strictness) of deriving Eq. > So, re-ordering would be confusing. > > - J.W. > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > I agree. ? Haddock maintainer -- Mateusz K. From fa-ml at ariis.it Tue Jun 9 17:36:07 2015 From: fa-ml at ariis.it (Francesco Ariis) Date: Tue, 9 Jun 2015 19:36:07 +0200 Subject: [Haskell-cafe] [ANN] Lentil - a frugal issue tracker Message-ID: <20150609173607.GA7767@casa.casa> lentil - a frugal issue tracker If you litter your code with TODOs and FIXMEs, lentil [1] can help you make sense of that big mess into something nice and readable like: src/Lentil/File.hs 49 does upMan work windows? [feature:intermediate] src/Lentil/Parse.hs 26 eliminate lookahead? refactor parsing? [lint] [refactor] 54 add test for rotoscope [test] It supports tags, filtering, exporting and much more. Check the user manual [2] for more information. [1] http://hackage.haskell.org/package/lentil [2] http://www.ariis.it/static/articles/lentil-manual/page.html From lemming at henning-thielemann.de Tue Jun 9 18:06:37 2015 From: lemming at henning-thielemann.de (Henning Thielemann) Date: Tue, 9 Jun 2015 20:06:37 +0200 (CEST) Subject: [Haskell-cafe] [Haskell] [ANN] Lentil - a frugal issue tracker In-Reply-To: <20150609173607.GA7767@casa.casa> References: <20150609173607.GA7767@casa.casa> Message-ID: On Tue, 9 Jun 2015, Francesco Ariis wrote: > lentil - a frugal issue tracker > > > If you litter your code with TODOs and FIXMEs, lentil [1] can help you > make sense of that big mess into something nice and readable like: I am looking for a distributed issue tracker and lentil seems to be that using an elegant approach. However, I guess that users without darcs experience cannot add or discuss issues, right? My idea so far was to use gitit/darcsit as an issue tracker where we could use the Wiki categories as tags and the directory structure for sorting with respect to open and closed tickets. From fa-ml at ariis.it Wed Jun 10 05:00:35 2015 From: fa-ml at ariis.it (Francesco Ariis) Date: Wed, 10 Jun 2015 07:00:35 +0200 Subject: [Haskell-cafe] [Haskell] [ANN] Lentil - a frugal issue tracker In-Reply-To: References: <20150609173607.GA7767@casa.casa> Message-ID: <20150610050035.GA2821@casa.casa> On Tue, Jun 09, 2015 at 08:06:37PM +0200, Henning Thielemann wrote: > I am looking for a distributed issue tracker and lentil seems to be that > using an elegant approach. However, I guess that users without darcs > experience cannot add or discuss issues, right? My idea so far was to use > gitit/darcsit as an issue tracker where we could use the Wiki categories as > tags and the directory structure for sorting with respect to open and closed > tickets. That's actually a good question, and one I had some thought floating in my head on, so I wrote a small column [1] to see how this could work (warning, written in a "release euphoria" state). Your proposed approach is very interesting and actually distributed (mine is decentralised, but probably contains some shared ideas): I would love to see it in action! [1] http://ariis.it/static/articles/decentralised-lentil/page.html From dons00 at gmail.com Wed Jun 10 08:52:48 2015 From: dons00 at gmail.com (Don Stewart) Date: Wed, 10 Jun 2015 08:52:48 +0000 Subject: [Haskell-cafe] Haskell developer role with Strats at Standard Chartered London Message-ID: Hi all, I'm hiring (another) Haskell dev to join our team in London. Details here: https://donsbot.wordpress.com/2015/06/10/haskell-dev-role-in-strats-at-standard-chartered-london/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From haskell at jschneider.net Wed Jun 10 14:00:21 2015 From: haskell at jschneider.net (Jon Schneider) Date: Wed, 10 Jun 2015 15:00:21 +0100 Subject: [Haskell-cafe] Lazy patterns Message-ID: <90c2122432df5a6c70c91ae802d70613.squirrel@mail.jschneider.net> Good day, I am trying to understand the lazy patterns as explained at https://www.haskell.org/tutorial/patterns.html If I type in the example without putting a ~ round the pattern sure enough I do not get an answer as the text says. What I completely fail to understand is why there is no CPU usage, increasing memory usage, stack overflow or other runtime error before I use ^C to stop it. What is going on under the hood ? Jon From wren at community.haskell.org Wed Jun 10 18:50:13 2015 From: wren at community.haskell.org (wren romano) Date: Wed, 10 Jun 2015 14:50:13 -0400 Subject: [Haskell-cafe] The evil GADTs extension in ghci 7.8.4 (maybe in other versions too?) In-Reply-To: <1433475711-sup-8101@sabre> References: <1433475098-sup-1820@sabre> <1433475711-sup-8101@sabre> Message-ID: On Thu, Jun 4, 2015 at 11:43 PM, Edward Z. Yang wrote: > GHC used to always generalize let-bindings, but our experience > with GADTs lead us to decide that let should not be generalized > with GADTs. So, it's not like we /wanted/ MonoLocalBinds, but > that having them makes the GADT machinery simpler. > > This blog post gives more details on the matter: > https://ghc.haskell.org/trac/ghc/blog/LetGeneralisationInGhc7 The fact that -XGADTs (in isolation) implies -XMonoLocalBinds isn't the problem. The problem is, the order in which language pragma are offered should not matter. Whether I say {-# LANGUAGE GADTs, NoMonoLocalBinds #-} or {-# LANGUAGE NoMonoLocalBinds, GADTs #-} shouldn't matter. Both should mean the same thing, regardless of how annoying it may be to work in that language. -- Live well, ~wren From roma at ro-che.info Wed Jun 10 19:11:02 2015 From: roma at ro-che.info (Roman Cheplyaka) Date: Wed, 10 Jun 2015 22:11:02 +0300 Subject: [Haskell-cafe] The evil GADTs extension in ghci 7.8.4 (maybe in other versions too?) In-Reply-To: References: <1433475098-sup-1820@sabre> <1433475711-sup-8101@sabre> Message-ID: <55788BC6.2080004@ro-che.info> On 10/06/15 21:50, wren romano wrote: > On Thu, Jun 4, 2015 at 11:43 PM, Edward Z. Yang wrote: >> GHC used to always generalize let-bindings, but our experience >> with GADTs lead us to decide that let should not be generalized >> with GADTs. So, it's not like we /wanted/ MonoLocalBinds, but >> that having them makes the GADT machinery simpler. >> >> This blog post gives more details on the matter: >> https://ghc.haskell.org/trac/ghc/blog/LetGeneralisationInGhc7 > > The fact that -XGADTs (in isolation) implies -XMonoLocalBinds isn't > the problem. The problem is, the order in which language pragma are > offered should not matter. Whether I say {-# LANGUAGE GADTs, > NoMonoLocalBinds #-} or {-# LANGUAGE NoMonoLocalBinds, GADTs #-} > shouldn't matter. Both should mean the same thing, regardless of how > annoying it may be to work in that language. The current behavior may be surprising if you are not aware of it, but it's the only sensible one. Otherwise, what should the meaning of {-# LANGUAGE MonoLocalBinds, NoMonoLocalBinds #-} be? Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From nbouscal at gmail.com Wed Jun 10 19:21:59 2015 From: nbouscal at gmail.com (Nathan Bouscal) Date: Wed, 10 Jun 2015 12:21:59 -0700 Subject: [Haskell-cafe] The evil GADTs extension in ghci 7.8.4 (maybe in other versions too?) In-Reply-To: <55788BC6.2080004@ro-che.info> References: <1433475098-sup-1820@sabre> <1433475711-sup-8101@sabre> <55788BC6.2080004@ro-che.info> Message-ID: On Wed, Jun 10, 2015 at 12:11 PM, Roman Cheplyaka wrote: > On 10/06/15 21:50, wren romano wrote: > > On Thu, Jun 4, 2015 at 11:43 PM, Edward Z. Yang wrote: > >> GHC used to always generalize let-bindings, but our experience > >> with GADTs lead us to decide that let should not be generalized > >> with GADTs. So, it's not like we /wanted/ MonoLocalBinds, but > >> that having them makes the GADT machinery simpler. > >> > >> This blog post gives more details on the matter: > >> https://ghc.haskell.org/trac/ghc/blog/LetGeneralisationInGhc7 > > > > The fact that -XGADTs (in isolation) implies -XMonoLocalBinds isn't > > the problem. The problem is, the order in which language pragma are > > offered should not matter. Whether I say {-# LANGUAGE GADTs, > > NoMonoLocalBinds #-} or {-# LANGUAGE NoMonoLocalBinds, GADTs #-} > > shouldn't matter. Both should mean the same thing, regardless of how > > annoying it may be to work in that language. > > The current behavior may be surprising if you are not aware of it, but > it's the only sensible one. Otherwise, what should the meaning of > > {-# LANGUAGE MonoLocalBinds, NoMonoLocalBinds #-} > > be? > > Roman > > Arguably it should be a compiler warning. -Nathan > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From roma at ro-che.info Wed Jun 10 19:47:19 2015 From: roma at ro-che.info (Roman Cheplyaka) Date: Wed, 10 Jun 2015 22:47:19 +0300 Subject: [Haskell-cafe] The evil GADTs extension in ghci 7.8.4 (maybe in other versions too?) In-Reply-To: References: <1433475098-sup-1820@sabre> <1433475711-sup-8101@sabre> <55788BC6.2080004@ro-che.info> Message-ID: <55789447.9000900@ro-che.info> On 10/06/15 22:21, Nathan Bouscal wrote: > On Wed, Jun 10, 2015 at 12:11 PM, Roman Cheplyaka > wrote: > > On 10/06/15 21:50, wren romano wrote: > > On Thu, Jun 4, 2015 at 11:43 PM, Edward Z. Yang > wrote: > >> GHC used to always generalize let-bindings, but our experience > >> with GADTs lead us to decide that let should not be generalized > >> with GADTs. So, it's not like we /wanted/ MonoLocalBinds, but > >> that having them makes the GADT machinery simpler. > >> > >> This blog post gives more details on the matter: > >> https://ghc.haskell.org/trac/ghc/blog/LetGeneralisationInGhc7 > > > > The fact that -XGADTs (in isolation) implies -XMonoLocalBinds isn't > > the problem. The problem is, the order in which language pragma are > > offered should not matter. Whether I say {-# LANGUAGE GADTs, > > NoMonoLocalBinds #-} or {-# LANGUAGE NoMonoLocalBinds, GADTs #-} > > shouldn't matter. Both should mean the same thing, regardless of how > > annoying it may be to work in that language. > > The current behavior may be surprising if you are not aware of it, but > it's the only sensible one. Otherwise, what should the meaning of > > {-# LANGUAGE MonoLocalBinds, NoMonoLocalBinds #-} > > be? > > Roman > > > Arguably it should be a compiler warning. You could have enabled one of them project-wise and the other one for a sepcific module. Being able to override extensions is useful. Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From madhadron at gmail.com Wed Jun 10 21:24:28 2015 From: madhadron at gmail.com (Fred Ross) Date: Wed, 10 Jun 2015 14:24:28 -0700 Subject: [Haskell-cafe] Thank you to new maintainers Message-ID: <83D266E8-A2E7-47F2-B56D-D614B2E7F6E8@gmail.com> The libraries I used maintain have all be handed off. Thank you to: Adam Bergmark for taking over hscamwire. Lana Black for taking over hdaemonize. Jose Calderon for taking over serial. And goodbye for now to this wonderful community. Maybe I'll be back in a few years. Unless I become a field ecologist or a florist or something. Fred Ross http://madhadron.com From vogt.adam at gmail.com Wed Jun 10 22:47:51 2015 From: vogt.adam at gmail.com (adam vogt) Date: Wed, 10 Jun 2015 18:47:51 -0400 Subject: [Haskell-cafe] The evil GADTs extension in ghci 7.8.4 (maybe in other versions too?) In-Reply-To: <55789447.9000900@ro-che.info> References: <1433475098-sup-1820@sabre> <1433475711-sup-8101@sabre> <55788BC6.2080004@ro-che.info> <55789447.9000900@ro-che.info> Message-ID: On Jun 10, 2015 3:47 PM, "Roman Cheplyaka" wrote: > > On 10/06/15 22:21, Nathan Bouscal wrote: > > On Wed, Jun 10, 2015 at 12:11 PM, Roman Cheplyaka > > wrote: > > > > On 10/06/15 21:50, wren romano wrote: > > > On Thu, Jun 4, 2015 at 11:43 PM, Edward Z. Yang > wrote: > > >> GHC used to always generalize let-bindings, but our experience > > >> with GADTs lead us to decide that let should not be generalized > > >> with GADTs. So, it's not like we /wanted/ MonoLocalBinds, but > > >> that having them makes the GADT machinery simpler. > > >> > > >> This blog post gives more details on the matter: > > >> https://ghc.haskell.org/trac/ghc/blog/LetGeneralisationInGhc7 > > > > > > The fact that -XGADTs (in isolation) implies -XMonoLocalBinds isn't > > > the problem. The problem is, the order in which language pragma are > > > offered should not matter. Whether I say {-# LANGUAGE GADTs, > > > NoMonoLocalBinds #-} or {-# LANGUAGE NoMonoLocalBinds, GADTs #-} > > > shouldn't matter. Both should mean the same thing, regardless of how > > > annoying it may be to work in that language. > > > > The current behavior may be surprising if you are not aware of it, but > > it's the only sensible one. Otherwise, what should the meaning of > > > > {-# LANGUAGE MonoLocalBinds, NoMonoLocalBinds #-} > > > > be? > > > > Roman > > > > > > Arguably it should be a compiler warning. > > You could have enabled one of them project-wise and the other one for a > sepcific module. Being able to override extensions is useful. It looks like https://ghc.haskell.org/trac/ghc/ticket/3085 would cover this situation -------------- next part -------------- An HTML attachment was scrubbed... URL: From ok at cs.otago.ac.nz Wed Jun 10 23:47:21 2015 From: ok at cs.otago.ac.nz (Richard A. O'Keefe) Date: Thu, 11 Jun 2015 11:47:21 +1200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: <5572AEB1.9050002@gmail.com> References: <842896AC-AD33-4F88-9947-AD97FD0616B1@cs.otago.ac.nz> <5D1C2201-6872-4F33-8A75-EC8D2F508BFA@me.com> <5572AEB1.9050002@gmail.com> Message-ID: On 6/06/2015, at 8:26 pm, Vlatko Basic wrote: > Maybe a slightly changed syntax like this could be less confusing > > > import Data.Map (Map) andAs M (...) > > or > > import Data.Map (Map) and as M (...) This starts to be interesting. From winterkoninkje at gmail.com Thu Jun 11 02:05:32 2015 From: winterkoninkje at gmail.com (wren romano) Date: Wed, 10 Jun 2015 22:05:32 -0400 Subject: [Haskell-cafe] The evil GADTs extension in ghci 7.8.4 (maybe in other versions too?) In-Reply-To: References: <1433475098-sup-1820@sabre> <1433475711-sup-8101@sabre> <55788BC6.2080004@ro-che.info> Message-ID: On Wed, Jun 10, 2015 at 3:21 PM, Nathan Bouscal wrote: >> The current behavior may be surprising if you are not aware of it, but >> it's the only sensible one. Otherwise, what should the meaning of >> >> {-# LANGUAGE MonoLocalBinds, NoMonoLocalBinds #-} >> >> be? > > Arguably it should be a compiler warning. +1. I'd say, when a set of flags are mutually incompatible (e.g., {Foo, NoFoo}) then that should be a warning/error. Whereas with GADTs, we *recommend* (and by default assume) MonoLocalBinds, but GADTs are not *incompatible* with NoMonoLocalBinds. We already support defeasible recommendations (in practice, if not intentionally); why not remove the counterintuitive corner cases they create in the current implementation? As for the complaint about project-wide vs file-specific language extensions: yes, it can be helpful to have overriding behavior; but having that behavior at the commandline or within a single file is counterintuitive at best. What I think would make more sense is a set-valued variant of the Last monad where each local collection of constraints (the collection given on the commandline, the collection given in the cabal file, the collection given in the Haskell file itself, etc) must be internally consistent, generating an error/warning if it is not. And then we simply have the more fine-grained constraint sets override the coarser-grained constraint sets. (The only conceptual infelicity I can see to that approach is when we enable certain flags because of other ones, like LiberalEverything whenever we have FunDeps. In principle, if a constraint set further down the line says NoFunDeps, then this should also disable the LiberalEverything that depended on FunDeps ?or at least, someone may desire that behavior. Resolving this would require a rather sophisticated model of intent behind enabling various language extensions. A model I do not propose developing at present. However, since we currently lack such facilities, we would lose nothing by not having them in the simple approach proposed above.) -- Live well, ~wren From carter.schonwald at gmail.com Thu Jun 11 02:49:51 2015 From: carter.schonwald at gmail.com (Carter Schonwald) Date: Wed, 10 Jun 2015 22:49:51 -0400 Subject: [Haskell-cafe] haskell team at megacorp is hiring! Message-ID: Dear Haskell Colleagues, my team at megacorp, one of the largest for profit organizations on the planet, is looking to grow! about the haskell team: currently 3 engineers, though a 4th on the way already, in the past 6 months alone we've deployed customer facing APIs into production (no small feat in megacorp), built self serve generative sampling based data anonymization tools that promise to transform how megacorp customer data gets shared within and without. And thats just to start! We've repeatedly demonstrated that our use of haskell helps us develop and evolve great software for the business. the haskell team is part of a larger "new product / R&D" group whose mission is to build new tools, products and services to help pull megacorp kicking and screaming into the 2010's in terms of technology and services. The new product group is broadly seeking competent thoughtful technologists across a range of skill sets -- frontend, python, java, and haskell -- to join the engineering team. (so even if you're not the perfect fit for the team, we may know great folks we can point you to) *The Perks* *? *our management fully supports upstreaming bugfixes and improvements to the open source tools that we use ? amazing view out of our Brooklyn and/or NYC offices (you will need to be in NYC to work with us, though I believe we can help with relocation) ? by dint of the sheer scale of megacorp, every successful project will have pretty huge impact ? because we're awesome, we will make sure you get your own mac along with the standard megacorp workstation. ? picking a new project to work on every 3-6 months is the norm, owing to our role as a sort of prototyping / R&D group. *The Caveats* ? it is megacorp, its a huge organization, and while the new product group is shielded from a lot of that, it can still be overwhelming ? you will have to live somewhere within commuting distance of Brooklyn New York. ? you have to deal with me and a few other interesting colleagues on a daily basis. *Should you apply?* ? we welcome candidates of all experience levels, junior or senior. ? we'd love it if you have some portfolio work/open source/work experience that demonstrates your ability to tackle engineering projects headon or master some nontrivial technical problem domain. ? colleagues who take teaching/learning new things seriously ? you'd enjoy working out of Brooklyn NYC. ? you enjoy programming / software engineering and try to do it well. *how to apply* ?*email me with the subject "functional megacorp job"*, attaching your resume/cv and if you want, a teeny cover letter that articulates your unique strengths and interests as a professional software engineer. ?I can tell you more about the company and team via email. I or another member of the engineering team will be screening resumes first before kicking off any interview processes, so there will not be any HR limbo going on. Every email will get a reply. (NB: actual org name is easy to figure out with some googling, but for various reasons cannot be used publicly by its employees without an authorization process that befits a megacorp) also megacorp is is an equal opportunity and affirmative action employer -------------- next part -------------- An HTML attachment was scrubbed... URL: From corentin.dupont at gmail.com Thu Jun 11 09:12:28 2015 From: corentin.dupont at gmail.com (Corentin Dupont) Date: Thu, 11 Jun 2015 11:12:28 +0200 Subject: [Haskell-cafe] TH to generate imports? Message-ID: Hi guys, I wanted to know if it's possible to use TH on an "import" statement. What I want to do is to generate the names of the packages I need to import. For example: import $(genImport "MyPackage") genImport :: String -> Q TH.Exp genImport s = ... Is that possible? Thanks! Corentin -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at bergmark.nl Thu Jun 11 09:45:07 2015 From: adam at bergmark.nl (Adam Bergmark) Date: Thu, 11 Jun 2015 11:45:07 +0200 Subject: [Haskell-cafe] TH to generate imports? In-Reply-To: References: Message-ID: https://ghc.haskell.org/trac/ghc/ticket/1475 On Thu, Jun 11, 2015 at 11:12 AM, Corentin Dupont wrote: > Hi guys, > I wanted to know if it's possible to use TH on an "import" statement. > What I want to do is to generate the names of the packages I need to > import. > For example: > > import $(genImport "MyPackage") > > genImport :: String -> Q TH.Exp > genImport s = ... > > > Is that possible? > Thanks! > Corentin > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From corentin.dupont at gmail.com Thu Jun 11 10:08:55 2015 From: corentin.dupont at gmail.com (Corentin Dupont) Date: Thu, 11 Jun 2015 12:08:55 +0200 Subject: [Haskell-cafe] TH to generate imports? In-Reply-To: References: Message-ID: Thanks! So, at the moment it's not possible? So is it possible instead to do: $(genPackage "MyPackage") import MyPackage The template Haskell expression would just create the Haskell package in a corresponding file, so we can import it. Nothing would be spliced in. On Thu, Jun 11, 2015 at 11:45 AM, Adam Bergmark wrote: > https://ghc.haskell.org/trac/ghc/ticket/1475 > > > On Thu, Jun 11, 2015 at 11:12 AM, Corentin Dupont < > corentin.dupont at gmail.com> wrote: > >> Hi guys, >> I wanted to know if it's possible to use TH on an "import" statement. >> What I want to do is to generate the names of the packages I need to >> import. >> For example: >> >> import $(genImport "MyPackage") >> >> genImport :: String -> Q TH.Exp >> genImport s = ... >> >> >> Is that possible? >> Thanks! >> Corentin >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From argantonio at gmail.com Thu Jun 11 11:35:38 2015 From: argantonio at gmail.com (Tony Garcia) Date: Thu, 11 Jun 2015 11:35:38 +0000 Subject: [Haskell-cafe] Questions about concurrency and laziness Message-ID: Hi, First of all, apologies if this is not the right place to ask this question. I'm reading the book "Parallel and concurrent programming in Haskell" and I'm having some issues reasoning about the impact of laziness. Looking at the first example in chapter 8 [1] main = do m1 <- newEmptyMVar m2 <- newEmptyMVar forkIO $ do r <- getURL "http://www.wikipedia.org/wiki/Shovel" putMVar m1 r forkIO $ do r <- getURL "http://www.wikipedia.org/wiki/Spade" putMVar m2 r r1 <- takeMVar m1 r2 <- takeMVar m2 print (B.length r1, B.length r2) I don't understand why this function is not just putting an unevaluated thunk in the MVar. Well, I assume that getURL is an eager function, but looking at its code [2] or at the documentation of Network.Browser [3] I don't see why... Am I looking at this wrong? Is there any rule of thumb to be used in these cases? I have the impression that it's really easy to end up creating thunks in parallel threads and evaluating them in the main one... Thanks, Jose. [1] http://chimera.labs.oreilly.com/books/1230000000929/ch08.html [2] https://github.com/simonmar/parconc-examples/blob/master/GetURL.hs [3] http://hackage.haskell.org/package/HTTP-4000.0.8/docs/Network-Browser.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From alpmestan at gmail.com Thu Jun 11 11:41:24 2015 From: alpmestan at gmail.com (Alp Mestanogullari) Date: Thu, 11 Jun 2015 13:41:24 +0200 Subject: [Haskell-cafe] Benchmarking two versions of the same package? Message-ID: Hi -cafe, While we can easily benchmark different functions or libraries easily with criterion, I can't think of a reasonably easy (and accurate!) way of benchmarking two versions of the same package. And not necessarily version as in cabal version -- one of the use cases I have in mind would be running a benchmark suite whenever a PR gets merged to the main branch of a library, so the benchmark would need to compare the performance of the library's-code-before-merging and after. This definitely can't be accomplished with something like criterion because we can't have two different instances of a package in scope for a module, even with -XPackageImports. If we separately build the same program against two instances of the same library and run the benchmarks separately, this might happen far apart enough that the machine running this might be under a different load. This does however seem to be the only actual solution? Run separately at two different commits, diff the numbers, report. I have felt the need for a solution to this for quite some time, but have never needed it bad enough that it became a priority. Thinking about it again today, I thought I should drop an email to the list and see if fellow haskellers have an easy-to-use solution for this? I may very well be overlooking something. -- Alp Mestanogullari -------------- next part -------------- An HTML attachment was scrubbed... URL: From roma at ro-che.info Thu Jun 11 11:44:08 2015 From: roma at ro-che.info (Roman Cheplyaka) Date: Thu, 11 Jun 2015 14:44:08 +0300 Subject: [Haskell-cafe] Questions about concurrency and laziness In-Reply-To: References: Message-ID: <55797488.4050008@ro-che.info> You may be confusing execution of IO actions with evaluation. Looking at the source of getURL, its result probably *will* be a thunk: one that computes "rspBody rsp" when evaluated. But why would that bother you? The IO effects of getURL, though, are a completely different beast. Unless you practice some dirty magic or use lazy IO, sequenced IO actions are executed in order. So, by the time execution reaches putMVar, the effects of getURL (ie, downloading) will have finished. On 11/06/15 14:35, Tony Garcia wrote: > Hi, > > First of all, apologies if this is not the right place to ask this question. > > I'm reading the book "Parallel and concurrent programming in Haskell" > and I'm having some issues reasoning about the impact of laziness. > > Looking at the first example in chapter 8 [1] > > main = do > m1 <- newEmptyMVar > m2 <- newEmptyMVar > > forkIO $ do > r <- getURL "http://www.wikipedia.org/wiki/Shovel" > putMVar m1 r > > forkIO $ do > r <- getURL "http://www.wikipedia.org/wiki/Spade" > putMVar m2 r > > r1 <- takeMVar m1 > r2 <- takeMVar m2 > print (B.length r1, B.length r2) > > I don't understand why this function is not just putting an unevaluated > thunk in the MVar. Well, I assume that getURL is an eager function, but > looking at its code [2] or at the documentation of Network.Browser [3] I > don't see why... > > Am I looking at this wrong? Is there any rule of thumb to be used in > these cases? I have the impression that it's really easy to end up > creating thunks in parallel threads and evaluating them in the main one... > > Thanks, > Jose. > > [1] http://chimera.labs.oreilly.com/books/1230000000929/ch08.html > [2] https://github.com/simonmar/parconc-examples/blob/master/GetURL.hs > [3] > http://hackage.haskell.org/package/HTTP-4000.0.8/docs/Network-Browser.html > > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From alpmestan at gmail.com Thu Jun 11 11:45:16 2015 From: alpmestan at gmail.com (Alp Mestanogullari) Date: Thu, 11 Jun 2015 13:45:16 +0200 Subject: [Haskell-cafe] Benchmarking two versions of the same package? In-Reply-To: References: Message-ID: Oh, Julian Arni just reminded me of Joachim Breitner's Gipeda: https://github.com/nomeata/gipeda This might do the trick, but any suggestion is still welcome! On Thu, Jun 11, 2015 at 1:41 PM, Alp Mestanogullari wrote: > Hi -cafe, > > While we can easily benchmark different functions or libraries easily with > criterion, I can't think of a reasonably easy (and accurate!) way of > benchmarking two versions of the same package. And not necessarily version > as in cabal version -- one of the use cases I have in mind would be running > a benchmark suite whenever a PR gets merged to the main branch of a > library, so the benchmark would need to compare > the performance of the library's-code-before-merging and after. > > This definitely can't be accomplished with something like criterion > because we can't have two different instances of a package in scope for a > module, even with -XPackageImports. > > If we separately build the same program against two instances of the same > library and run the benchmarks separately, this might happen far apart > enough that the machine running this might be under a different load. This > does however seem to be the only actual solution? Run separately at two > different commits, diff the numbers, report. > > I have felt the need for a solution to this for quite some time, but have > never needed it bad enough that it became a priority. Thinking about it > again today, I thought I should drop an email to the list and see if fellow > haskellers have an easy-to-use solution for this? I may very well be > overlooking something. > > -- > Alp Mestanogullari > -- Alp Mestanogullari -------------- next part -------------- An HTML attachment was scrubbed... URL: From roma at ro-che.info Thu Jun 11 11:48:39 2015 From: roma at ro-che.info (Roman Cheplyaka) Date: Thu, 11 Jun 2015 14:48:39 +0300 Subject: [Haskell-cafe] Benchmarking two versions of the same package? In-Reply-To: References: Message-ID: <55797597.10203@ro-che.info> In your CI script, you can rename one of your versions (say, mypkg to mypkg-new) and then use -XPackageImports. On 11/06/15 14:41, Alp Mestanogullari wrote: > Hi -cafe, > > While we can easily benchmark different functions or libraries easily > with criterion, I can't think of a reasonably easy (and accurate!) way > of benchmarking two versions of the same package. And not necessarily > version as in cabal version -- one of the use cases I have in mind would > be running a benchmark suite whenever a PR gets merged to the main > branch of a library, so the benchmark would need to compare > the performance of the library's-code-before-merging and after. > > This definitely can't be accomplished with something like criterion > because we can't have two different instances of a package in scope for > a module, even with -XPackageImports. > > If we separately build the same program against two instances of the > same library and run the benchmarks separately, this might happen far > apart enough that the machine running this might be under a different > load. This does however seem to be the only actual solution? Run > separately at two different commits, diff the numbers, report. > > I have felt the need for a solution to this for quite some time, but > have never needed it bad enough that it became a priority. Thinking > about it again today, I thought I should drop an email to the list and > see if fellow haskellers have an easy-to-use solution for this? I may > very well be overlooking something. > > -- > Alp Mestanogullari > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From lucas.dicioccio at gmail.com Thu Jun 11 11:52:01 2015 From: lucas.dicioccio at gmail.com (lucas di cioccio) Date: Thu, 11 Jun 2015 12:52:01 +0100 Subject: [Haskell-cafe] Benchmarking two versions of the same package? In-Reply-To: References: Message-ID: You should be able to use Laborantin to organize this kind of experiments. You'll have to write some boilerplate on how to "build" each package set. https://hackage.haskell.org/package/laborantin-hs --Lucas 2015-06-11 12:45 GMT+01:00 Alp Mestanogullari : > Oh, Julian Arni just reminded me of Joachim Breitner's Gipeda: > https://github.com/nomeata/gipeda > > This might do the trick, but any suggestion is still welcome! > > On Thu, Jun 11, 2015 at 1:41 PM, Alp Mestanogullari > wrote: > >> Hi -cafe, >> >> While we can easily benchmark different functions or libraries easily >> with criterion, I can't think of a reasonably easy (and accurate!) way of >> benchmarking two versions of the same package. And not necessarily version >> as in cabal version -- one of the use cases I have in mind would be running >> a benchmark suite whenever a PR gets merged to the main branch of a >> library, so the benchmark would need to compare >> the performance of the library's-code-before-merging and after. >> >> This definitely can't be accomplished with something like criterion >> because we can't have two different instances of a package in scope for a >> module, even with -XPackageImports. >> >> If we separately build the same program against two instances of the same >> library and run the benchmarks separately, this might happen far apart >> enough that the machine running this might be under a different load. This >> does however seem to be the only actual solution? Run separately at two >> different commits, diff the numbers, report. >> >> I have felt the need for a solution to this for quite some time, but have >> never needed it bad enough that it became a priority. Thinking about it >> again today, I thought I should drop an email to the list and see if fellow >> haskellers have an easy-to-use solution for this? I may very well be >> overlooking something. >> >> -- >> Alp Mestanogullari >> > > > > -- > Alp Mestanogullari > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alpmestan at gmail.com Thu Jun 11 12:22:20 2015 From: alpmestan at gmail.com (Alp Mestanogullari) Date: Thu, 11 Jun 2015 14:22:20 +0200 Subject: [Haskell-cafe] Benchmarking two versions of the same package? In-Reply-To: <55797597.10203@ro-che.info> References: <55797597.10203@ro-che.info> Message-ID: I thought about this but discarded it quite early on for the hacky nature. But that definitely looks like my best shot, the more I think about it. Thanks. On Thu, Jun 11, 2015 at 1:48 PM, Roman Cheplyaka wrote: > In your CI script, you can rename one of your versions (say, mypkg to > mypkg-new) and then use -XPackageImports. > > On 11/06/15 14:41, Alp Mestanogullari wrote: > > Hi -cafe, > > > > While we can easily benchmark different functions or libraries easily > > with criterion, I can't think of a reasonably easy (and accurate!) way > > of benchmarking two versions of the same package. And not necessarily > > version as in cabal version -- one of the use cases I have in mind would > > be running a benchmark suite whenever a PR gets merged to the main > > branch of a library, so the benchmark would need to compare > > the performance of the library's-code-before-merging and after. > > > > This definitely can't be accomplished with something like criterion > > because we can't have two different instances of a package in scope for > > a module, even with -XPackageImports. > > > > If we separately build the same program against two instances of the > > same library and run the benchmarks separately, this might happen far > > apart enough that the machine running this might be under a different > > load. This does however seem to be the only actual solution? Run > > separately at two different commits, diff the numbers, report. > > > > I have felt the need for a solution to this for quite some time, but > > have never needed it bad enough that it became a priority. Thinking > > about it again today, I thought I should drop an email to the list and > > see if fellow haskellers have an easy-to-use solution for this? I may > > very well be overlooking something. > > > > -- > > Alp Mestanogullari > > > > > > _______________________________________________ > > Haskell-Cafe mailing list > > Haskell-Cafe at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > > > > -- Alp Mestanogullari -------------- next part -------------- An HTML attachment was scrubbed... URL: From alpmestan at gmail.com Thu Jun 11 12:24:51 2015 From: alpmestan at gmail.com (Alp Mestanogullari) Date: Thu, 11 Jun 2015 14:24:51 +0200 Subject: [Haskell-cafe] Benchmarking two versions of the same package? In-Reply-To: References: Message-ID: Yeah, although I think this doesn't really solve the issue of using two versions of the same package. On Thu, Jun 11, 2015 at 1:52 PM, lucas di cioccio wrote: > You should be able to use Laborantin to organize this kind of experiments. > You'll have to write some boilerplate on how to "build" each package set. > https://hackage.haskell.org/package/laborantin-hs > > --Lucas > > 2015-06-11 12:45 GMT+01:00 Alp Mestanogullari : > >> Oh, Julian Arni just reminded me of Joachim Breitner's Gipeda: >> https://github.com/nomeata/gipeda >> >> This might do the trick, but any suggestion is still welcome! >> >> On Thu, Jun 11, 2015 at 1:41 PM, Alp Mestanogullari >> wrote: >> >>> Hi -cafe, >>> >>> While we can easily benchmark different functions or libraries easily >>> with criterion, I can't think of a reasonably easy (and accurate!) way of >>> benchmarking two versions of the same package. And not necessarily version >>> as in cabal version -- one of the use cases I have in mind would be running >>> a benchmark suite whenever a PR gets merged to the main branch of a >>> library, so the benchmark would need to compare >>> the performance of the library's-code-before-merging and after. >>> >>> This definitely can't be accomplished with something like criterion >>> because we can't have two different instances of a package in scope for a >>> module, even with -XPackageImports. >>> >>> If we separately build the same program against two instances of the >>> same library and run the benchmarks separately, this might happen far apart >>> enough that the machine running this might be under a different load. This >>> does however seem to be the only actual solution? Run separately at two >>> different commits, diff the numbers, report. >>> >>> I have felt the need for a solution to this for quite some time, but >>> have never needed it bad enough that it became a priority. Thinking about >>> it again today, I thought I should drop an email to the list and see if >>> fellow haskellers have an easy-to-use solution for this? I may very well be >>> overlooking something. >>> >>> -- >>> Alp Mestanogullari >>> >> >> >> >> -- >> Alp Mestanogullari >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> >> > -- Alp Mestanogullari -------------- next part -------------- An HTML attachment was scrubbed... URL: From argantonio at gmail.com Thu Jun 11 13:22:35 2015 From: argantonio at gmail.com (Tony Garcia) Date: Thu, 11 Jun 2015 13:22:35 +0000 Subject: [Haskell-cafe] Questions about concurrency and laziness In-Reply-To: <55797488.4050008@ro-che.info> References: <55797488.4050008@ro-che.info> Message-ID: I see, so I might put a thunk in the MVar but the IO action that I wanted to do in parallel would be executed when I get to the putMVar anyway. OK, thank you! Jose. On Thu, 11 Jun 2015 at 12:44 Roman Cheplyaka wrote: > You may be confusing execution of IO actions with evaluation. > > Looking at the source of getURL, its result probably *will* be a thunk: > one that computes "rspBody rsp" when evaluated. > > But why would that bother you? > > The IO effects of getURL, though, are a completely different beast. > Unless you practice some dirty magic or use lazy IO, sequenced IO > actions are executed in order. So, by the time execution reaches > putMVar, the effects of getURL (ie, downloading) will have finished. > > > On 11/06/15 14:35, Tony Garcia wrote: > > Hi, > > > > First of all, apologies if this is not the right place to ask this > question. > > > > I'm reading the book "Parallel and concurrent programming in Haskell" > > and I'm having some issues reasoning about the impact of laziness. > > > > Looking at the first example in chapter 8 [1] > > > > main = do > > m1 <- newEmptyMVar > > m2 <- newEmptyMVar > > > > forkIO $ do > > r <- getURL "http://www.wikipedia.org/wiki/Shovel" > > putMVar m1 r > > > > forkIO $ do > > r <- getURL "http://www.wikipedia.org/wiki/Spade" > > putMVar m2 r > > > > r1 <- takeMVar m1 > > r2 <- takeMVar m2 > > print (B.length r1, B.length r2) > > > > I don't understand why this function is not just putting an unevaluated > > thunk in the MVar. Well, I assume that getURL is an eager function, but > > looking at its code [2] or at the documentation of Network.Browser [3] I > > don't see why... > > > > Am I looking at this wrong? Is there any rule of thumb to be used in > > these cases? I have the impression that it's really easy to end up > > creating thunks in parallel threads and evaluating them in the main > one... > > > > Thanks, > > Jose. > > > > [1] http://chimera.labs.oreilly.com/books/1230000000929/ch08.html > > [2] https://github.com/simonmar/parconc-examples/blob/master/GetURL.hs > > [3] > > > http://hackage.haskell.org/package/HTTP-4000.0.8/docs/Network-Browser.html > > > > > > > > _______________________________________________ > > Haskell-Cafe mailing list > > Haskell-Cafe at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From c at functionx.org Thu Jun 11 15:26:32 2015 From: c at functionx.org (Christopher Lewis) Date: Thu, 11 Jun 2015 15:26:32 +0000 Subject: [Haskell-cafe] US Haskell Developer Position Message-ID: Karamaan Group, a principal investment firm based in Manhattan, is looking for an outstanding software developer to develop tools for financial analysis and knowledge management. We are a growth oriented firm that values people who take a craftsman's pride in their work. Our ideal candidate is an experienced software developer with strong analytical, organizational, and communication skills. A candidate who demonstrates an intense focus on quality, but has the ability to recognize and make the tradeoffs that are a necessary part of day-to-day software development. Candidates should have at least a degree in a quantitative field and a keen interest in building robust and elegant computer programs. This is a high-impact, high-visibility position where successful candidates will be entrusted with a lot of responsibility for products that have a direct effect on the P&L of the firm and influences our workflow. The ideal candidate will have experience with Haskell, relational database technologies, and Java. All new development is performed in Haskell, but our legacy Java code base occasionally requires maintenance. Unlike most finance companies, our atmosphere is informal and intellectual. We don't require previous experience in finance or business, but knowledge in those areas is a plus. Karamaan Group is situated in Manhattan, we are an investment adviser to hedge funds and family offices. We value innovative thinking, encourage an entrepreneurial atmosphere, and enjoy spirited conversations. We also offer lunch, and every once in a while we go bowling. Telecommuting is an option, but you must be located in the Continental United States and authorized to work in the United States. Please send your CV and cover letter to recruitment at karamaan dot com. Please do not reply to the original poster. -------------- next part -------------- An HTML attachment was scrubbed... URL: From notdan at covariant.me Thu Jun 11 15:55:45 2015 From: notdan at covariant.me (Dan Frumin) Date: Thu, 11 Jun 2015 11:55:45 -0400 Subject: [Haskell-cafe] Questions about concurrency and laziness In-Reply-To: References: <55797488.4050008@ro-che.info> Message-ID: <20150611155544.GA28510@bog.hcoop.net> On 06/11, Tony Garcia wrote: > I see, so I might put a thunk in the MVar but the IO action that I wanted > to do in parallel would be executed when I get to the putMVar anyway. > Exactly. That's the whole trick with the monads. You can't execute IO code just by reducing/evaluating the expression. > OK, thank you! > Jose. > > On Thu, 11 Jun 2015 at 12:44 Roman Cheplyaka wrote: > > > You may be confusing execution of IO actions with evaluation. > > > > Looking at the source of getURL, its result probably *will* be a thunk: > > one that computes "rspBody rsp" when evaluated. > > > > But why would that bother you? > > > > The IO effects of getURL, though, are a completely different beast. > > Unless you practice some dirty magic or use lazy IO, sequenced IO > > actions are executed in order. So, by the time execution reaches > > putMVar, the effects of getURL (ie, downloading) will have finished. > > > > > > On 11/06/15 14:35, Tony Garcia wrote: > > > Hi, > > > > > > First of all, apologies if this is not the right place to ask this > > question. > > > > > > I'm reading the book "Parallel and concurrent programming in Haskell" > > > and I'm having some issues reasoning about the impact of laziness. > > > > > > Looking at the first example in chapter 8 [1] > > > > > > main = do > > > m1 <- newEmptyMVar > > > m2 <- newEmptyMVar > > > > > > forkIO $ do > > > r <- getURL "http://www.wikipedia.org/wiki/Shovel" > > > putMVar m1 r > > > > > > forkIO $ do > > > r <- getURL "http://www.wikipedia.org/wiki/Spade" > > > putMVar m2 r > > > > > > r1 <- takeMVar m1 > > > r2 <- takeMVar m2 > > > print (B.length r1, B.length r2) > > > > > > I don't understand why this function is not just putting an unevaluated > > > thunk in the MVar. Well, I assume that getURL is an eager function, but > > > looking at its code [2] or at the documentation of Network.Browser [3] I > > > don't see why... > > > > > > Am I looking at this wrong? Is there any rule of thumb to be used in > > > these cases? I have the impression that it's really easy to end up > > > creating thunks in parallel threads and evaluating them in the main > > one... > > > > > > Thanks, > > > Jose. > > > > > > [1] http://chimera.labs.oreilly.com/books/1230000000929/ch08.html > > > [2] https://github.com/simonmar/parconc-examples/blob/master/GetURL.hs > > > [3] > > > > > http://hackage.haskell.org/package/HTTP-4000.0.8/docs/Network-Browser.html > > > > > > > > > > > > _______________________________________________ > > > Haskell-Cafe mailing list > > > Haskell-Cafe at haskell.org > > > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > > > > > > > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe From creichert07 at gmail.com Thu Jun 11 16:31:43 2015 From: creichert07 at gmail.com (Christopher Reichert) Date: Thu, 11 Jun 2015 11:31:43 -0500 Subject: [Haskell-cafe] TH to generate imports? In-Reply-To: (Adam Bergmark's message of "Thu, 11 Jun 2015 11:45:07 +0200") References: Message-ID: <5579b7f3.cd47ca0a.2fc4.2624@mx.google.com> On Thu, Jun 11 2015, Adam Bergmark wrote: > https://ghc.haskell.org/trac/ghc/ticket/1475 > HSpec uses the ghc -F -pgmF flags to run a custom pre-processor which generates imports before a testing. e.g. '{-# OPTIONS_GHC -F -pgmF hspec-discover #-}'. You might also find some inspiration in the 'imports' library on Hackage: http://hackage.haskell.org/package/imports-0.1.2.1. -Christopher > > On Thu, Jun 11, 2015 at 11:12 AM, Corentin Dupont > wrote: > >> Hi guys, >> I wanted to know if it's possible to use TH on an "import" statement. >> What I want to do is to generate the names of the packages I need to >> import. >> For example: >> >> import $(genImport "MyPackage") >> >> genImport :: String -> Q TH.Exp >> genImport s = ... >> >> >> Is that possible? >> Thanks! >> Corentin >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> >> > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe -- Christopher Reichert irc: creichert gpg: C81D 18C8 862A 3618 1376 FFA5 6BFC A992 9955 929B -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 818 bytes Desc: not available URL: From romanandreg at gmail.com Thu Jun 11 16:54:54 2015 From: romanandreg at gmail.com (=?UTF-8?B?Um9tw6FuIEdvbnrDoWxleg==?=) Date: Thu, 11 Jun 2015 09:54:54 -0700 Subject: [Haskell-cafe] Question about constraining functions to particular ADT constructors Message-ID: Hello there, I've been thinking on different approaches to constraint particular functions to a particular constructor of an ADT in order to reduce representation of invalid states. Say for example I've this types: data Address = Address { ... } newtype Email = Email String data Package = Package { ... } data EmailMsg = EmailMsg { ... } data User = RealUser Address | VirtualUser Email And I would like to implement two functions: deliverPackage :: User -> Package -> IO Bool sendEmail :: User -> EmailMsg -> IO () I would like to constraint both deliverPackage and sendEmail to receive only the semantically correct constructor of User. I know of an approach I could use, that is wrapping each constructor in it's own newtype, and create some smart constructor that way, that approach works, but I find it rather verbose. Is there any other well known approach to deal with this scenarios? -------------- next part -------------- An HTML attachment was scrubbed... URL: From aovieth at gmail.com Thu Jun 11 17:14:08 2015 From: aovieth at gmail.com (Alexander Vieth) Date: Thu, 11 Jun 2015 13:14:08 -0400 Subject: [Haskell-cafe] Question about constraining functions to particular ADT constructors In-Reply-To: References: Message-ID: <1755746.oIXOlgQpeM@atop> You could use DataKinds with GADTs like so {-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE GADTs #-} data UserType = RealUser | VirtualUser data User (userType :: UserType) where MkRealUser :: Address -> User RealUser MkVirtualUser :: Email -> User VirtualUser deliverPackage :: User RealUser -> Package -> IO Bool deliverPackage user = case user of -- This is the only valid pattern, since MkVritualUser would imply -- the type User VirtualUser. MkRealUser address -> ... sendEmail :: User VirtualUser -> EmailMsg -> IO () sendEmail user = case user of MkVritualUser email -> ... Alex Hello there, I've been thinking on different approaches to constraint particular functions to a particular constructor of an ADT in order to reduce representation of invalid states. Say for example I've this types: data Address = Address { ... } newtype Email = Email String data Package = Package { ... } data EmailMsg = EmailMsg { ... } data User = RealUser Address | VirtualUser Email And I would like to implement two functions: deliverPackage :: User -> Package -> IO Bool sendEmail :: User -> EmailMsg -> IO () I would like to constraint both deliverPackage and sendEmail to receive only the semantically correct constructor of User. I know of an approach I could use, that is wrapping each constructor in it's own newtype, and create some smart constructor that way, that approach works, but I find it rather verbose. Is there any other well known approach to deal with this scenarios? -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.j.thompson at kent.ac.uk Thu Jun 11 20:26:22 2015 From: s.j.thompson at kent.ac.uk (Simon Thompson) Date: Thu, 11 Jun 2015 22:26:22 +0200 Subject: [Haskell-cafe] Lecturer position in Programming Languages / Security at Kent Message-ID: <3526EEC6-3ECA-4CF7-A281-0907BEC5466D@kent.ac.uk> We?re looking for excellent PL/security people to recruit as faculty to join us in the School of Computing at Kent. Do apply if you?re interested, or mail me if you want to find out more. Simon Simon Thompson | Professor of Logic and Computation School of Computing | University of Kent | Canterbury, CT2 7NF, UK s.j.thompson at kent.ac.uk | M +44 7986 085754 | W www.cs.kent.ac.uk/~sjt From mwm at mired.org Fri Jun 12 03:39:25 2015 From: mwm at mired.org (Mike Meyer) Date: Thu, 11 Jun 2015 22:39:25 -0500 Subject: [Haskell-cafe] Replacing cpp? Message-ID: I know the subject of cpp not working well with Haskell comes up every so often, usually with the conclusion that we need a preprocessor that understands Haskell code. If someone is working on that, this should probably be ignored. Maybe gpp could be used instead of having to write one from scratch? it allows you to define the syntax it uses for macros - both user and "meta". Possibly it's flexible enough to do what's needed? -------------- next part -------------- An HTML attachment was scrubbed... URL: From rf at rufflewind.com Fri Jun 12 03:44:56 2015 From: rf at rufflewind.com (Phil Ruffwind) Date: Thu, 11 Jun 2015 23:44:56 -0400 Subject: [Haskell-cafe] Replacing cpp? In-Reply-To: References: Message-ID: See: https://mail.haskell.org/pipermail/haskell-cafe/2015-May/119528.html From s.j.thompson at kent.ac.uk Fri Jun 12 04:44:07 2015 From: s.j.thompson at kent.ac.uk (Simon Thompson) Date: Fri, 12 Jun 2015 06:44:07 +0200 Subject: [Haskell-cafe] [erlang-questions] Lecturer position in Programming Languages / Security at Kent In-Reply-To: <3526EEC6-3ECA-4CF7-A281-0907BEC5466D@kent.ac.uk> References: <3526EEC6-3ECA-4CF7-A281-0907BEC5466D@kent.ac.uk> Message-ID: And here?s the link for more info :-) https://jobs.kent.ac.uk/fe/tpl_kent01.asp?s=4A515F4E5A565B1A&jobid=39293,3436347277&key=44012873&c=493414763421&pagestamp=sesdyyyrqxijqwrrmd S. > On 11 Jun 2015, at 22:26, Simon Thompson wrote: > > > We?re looking for excellent PL/security people to recruit as faculty to join us in the School of Computing at Kent. Do apply if you?re interested, or mail me if you want to find out more. > > Simon > > Simon Thompson | Professor of Logic and Computation School of Computing | University of Kent | Canterbury, CT2 7NF, UK s.j.thompson at kent.ac.uk | M +44 7986 085754 | W www.cs.kent.ac.uk/~sjt From abela at chalmers.se Fri Jun 12 08:25:43 2015 From: abela at chalmers.se (Andreas Abel) Date: Fri, 12 Jun 2015 10:25:43 +0200 Subject: [Haskell-cafe] GHC.Generics: how to derive a Generic instance for an existential type? In-Reply-To: References: <5572F8A1.6060301@ifi.lmu.de> Message-ID: <557A9787.9090604@chalmers.se> Dear Pedro, thanks for the answer and your pointers to the literature. As usual, people want things to work *now*, and I am no exception. ;-) It seems like generics are broken in ghc 7.6.3 which we support for Agda, so I have to give up on generics for next years (until we drop support for ghc < 7.8). https://code.google.com/p/agda/issues/detail?id=1558 Cheers, Andreas On 07.06.2015 09:34, Jos? Pedro Magalh?es wrote: > Hi Andreas, > > No, GHC.Generics doesn't support existentials. > > If your existentials are used as arguments to constructors (like in the > example you've provided), the only approach I'm aware of that might help > you is this: > > Alexey Rodriguez Yakushev and Johan Jeuring. > Enumerating Well-Typed Terms Generically. > > In Proceedings workshop on Approaches and Applications of Inductive > Programming 2009. > (This reference seems to be missing its references. You could also > look at Chapter 5 of Alexey's thesis > .) > > > If your existentials are used only as indices, then you could look at this: > > Jos? Pedro Magalh?es and Johan Jeuring. > Generic Programming for Indexed Datatypes. > > In Proceedings of the 7th ACM SIGPLAN Workshop on Generic > Programming (WGP'11), pp. 37?46, ACM, 2011. > (Chapter 10 of my thesis > has a more up-to-date > version.) > > > > Cheers, > Pedro > > On Sat, Jun 6, 2015 at 2:41 PM, Andreas Abel > wrote: > > I wonder whether GHC.Generics supports existential types yet... > > {-# LANGUAGE DeriveGeneric #-} > {-# LANGUAGE ExistentialQuantification #-} > {-# LANGUAGE StandaloneDeriving #-} > > import GHC.Generics > > data U = forall a. (Generic a) => U a > -- deriving (Generic) > -- Can't make a derived instance of ?Generic U?: > -- Constructor ?U? has existentials or constraints in its type > -- Possible fix: use a standalone deriving declaration instead > > -- deriving instance Generic U > -- Can't make a derived instance of ?Generic U?: > -- U must be a vanilla data constructor > -- In the stand-alone deriving instance for ?Generic U? > > data D1Ser > data C1_0Ser > > instance Generic U where > type Rep U = D D1Ser (C1 C1_0Ser (S1 NoSelector (Rep a))) > -- Not in scope: type variable ?a? > > -- How to bring the existential type `a' into scope? > > -- > Andreas Abel <>< Du bist der geliebte Mensch. > > Department of Computer Science and Engineering > Chalmers and Gothenburg University, Sweden > > andreas.abel at gu.se > http://www2.tcs.ifi.lmu.de/~abel/ > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www2.tcs.ifi.lmu.de/~abel/ From alexander at plaimi.net Fri Jun 12 08:55:50 2015 From: alexander at plaimi.net (Alexander Berntsen) Date: Fri, 12 Jun 2015 10:55:50 +0200 Subject: [Haskell-cafe] Proposal: Shorter Import Syntax In-Reply-To: References: Message-ID: <557A9E96.9030207@plaimi.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 - -1. For the reasons Richard A. O'Keefe discussed. - -- Alexander alexander at plaimi.net https://secure.plaimi.net/~alexander -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJVep6VAAoJENQqWdRUGk8BTEIP/3VbMxSTZyrfb1aDAaOFn0A5 xMvDSvbeV2a3Uf7ciPEjSOiH/BOKrz/UsJhm8Tdiye+owQZYVXtu15cst6oT4Q+0 HtYGxbZeqrWrWCpJHkXwFhNxHCRVAo4Du0MEm6/vYOK1CUAzK7ouFI6V0TR0xOuB UtxXHHxFd3vpZiJLcR+yOOqX1TlLsTvP7J3UBMgTuJ7rYSVXEtnaPVdRQ8x+mzWx e1fxZYzJ6qpm37QXoO4sfWawe3qXU7KVlK6zAjCIkJFm4q5Px0KO72uMeZn7obaf IohVMlgHbFaZGyYgtOzUMVaCOCzSE3L1HUM68F0wmJG0pSRiomMAQo8S52pTScZZ XnACO6RilKBiXKswg9ZM4AtIpGBSihmdhW9Tp3+dPGFeTnZd0yJBSGkRsI9YZzAR GrhuQQLK58+elzFEVJnLcOZVRdIFaK5rK/3u4uSuARQdsPE43HkIA1gkXckEuhbf pJoKyzWkTIhCBiaFBOJZkhaiPZH/ws0t7lUKVmEyIJzEXvH06izivtp9rkKB1GZa 0EmIQcJfPaI3e2BlUwpFM4yGaAJI88wugn+VdHtqai0QYVspXgm5+KFlgx3Vi54N qBWTZxg1B5zjSm2Cgw399HVCaoEiFtKKx8XeEOCdtGvyIKjc7e+CytR4EIBSLwD1 s2+pcJcM6OnoRTR2wNRT =DBCV -----END PGP SIGNATURE----- From _deepfire at feelingofgreen.ru Fri Jun 12 11:26:58 2015 From: _deepfire at feelingofgreen.ru (Kosyrev Serge) Date: Fri, 12 Jun 2015 14:26:58 +0300 Subject: [Haskell-cafe] Replacing cpp? In-Reply-To: (sfid-20150612_080056_114453_278539F7) (Phil Ruffwind's message of "Thu, 11 Jun 2015 23:44:56 -0400") References: Message-ID: <87zj45upz1.fsf@andromedae.feelingofgreen.ru> Phil Ruffwind writes: > See: https://mail.haskell.org/pipermail/haskell-cafe/2015-May/119528.html Aren't the proposals discussed in that thread focused on deciding on a /kind/ of CPP to use, and the millions of issues related? I could be wrong, but I've got a distinct impression that Mike wanted something beyond CPP.. -- respectfully, ??????? ?????? From 2haskell at pkturner.org Sat Jun 13 11:49:10 2015 From: 2haskell at pkturner.org (Scott Turner) Date: Sat, 13 Jun 2015 07:49:10 -0400 Subject: [Haskell-cafe] Lazy patterns In-Reply-To: <90c2122432df5a6c70c91ae802d70613.squirrel@mail.jschneider.net> References: <90c2122432df5a6c70c91ae802d70613.squirrel@mail.jschneider.net> Message-ID: <557C18B6.9090706@pkturner.org> On 2015-06-10 10:00, Jon Schneider wrote: > I am trying to understand the lazy patterns as explained at > > https://www.haskell.org/tutorial/patterns.html > > If I type in the example without putting a ~ round the pattern sure enough > I do not get an answer as the text says. What I completely fail to > understand is why there is no CPU usage, increasing memory usage, stack > overflow or other runtime error before I use ^C to stop it. What is going > on under the hood ? If you compile the program to binary before executing, the output is progname: <> See http://stackoverflow.com/questions/21505192/haskell-program-outputs-loop for an explanation of what the ghc runtime has detected. In your case you're using ghci or runhaskell, which has "optimized" the CPU usage rather than raise an exception. From lists0 at freea2a.de Sat Jun 13 23:46:39 2015 From: lists0 at freea2a.de (Hans-Juergen Guth) Date: Sun, 14 Jun 2015 01:46:39 +0200 Subject: [Haskell-cafe] ANN: TestExplode 0.1.0.0: testscript generator for all target languages Message-ID: <20150614014639.3530eb82@noordzee> My new Haskell program/library is released! What it does: ------------- Instead of writing one test-script after another, you define the structure of test-sets. Advantages: ----------- More test-scripts with less code, better overview, easier review of the testcases, easier change and addition of testcases. Details: -------- TestExplode generates testcases out of program snippets. The snippets are treated as text, with variables, that are subsituted (thanks the package perl6-interpolated-strings). The text-snippets are annotated and can form a directed acyclic graph. Each path and each variable substitution is a testcase. Subgraphs can be defined and used in many testcases. The graph can be printed with graphviz. The expected results of the testcase can partially defined by changing the state of the testcase by each testsnippet. So you can define a state-machine in haskell and the annotations to the text-snippets give the input to the state-machine, dependant of the test-input and which path through the graph is chosen. The program/library is designed with users in mind, who have little or no knowledge of haskell at the beginning. It's my first bigger haskell program, so it is probably relativ simple haskell code in the library and in the user interface. Examples can be found in the documentation. Further info: ------------- A "Getting Started": https://hackage.haskell.org/package/TestExplode-0.1.0.0/readme The Library which generates the testcases https://hackage.haskell.org/package/TestExplode-0.1.0.0/docs/TestExplode-TestExplode.html The Library which makes FGL-Graphs for the module grahpviz out of my own definition of directed acyclic graphs https://hackage.haskell.org/package/TestExplode-0.1.0.0/docs/TestExplode-DirGraphCombine.html I would be happy about comments! From ben.franksen at online.de Sun Jun 14 22:23:44 2015 From: ben.franksen at online.de (Ben Franksen) Date: Mon, 15 Jun 2015 00:23:44 +0200 Subject: [Haskell-cafe] Recognizing projects schemes References: <55308310.8020408@gmail.com> Message-ID: Ruben Astudillo wrote: > I recently came across the following blog-post: > > http://blog.cleancoder.com/uncle-bob/2015/04/15/DoesOrganizationMatter.html > > It speaks a bit of simplicity, efficiency and stuff that isn't > important. What is important at least to me was the concept of > project scheme, summarized on the following phrase: > > ``And so this gets to the crux of the question that you were really > asking. You were asking whether the time required to learn the > organization scheme of the system is worth the bother. Learning > that organization scheme is hard. Becoming proficient at reading > and changing the code within that scheme take time, effort, and > practice. And that can feel like a waste when you compare it to > how simple life was when you only had 100 lines of code.'' > > And that is something I totally struggle at approaching new > projects. The only reason I could understand XMonad for example is > because they gave a general overview (thanks) of it on the > Developing module. > > I feel I got a problem of methodology. What approaches are you > guys using to understanding new projects schemes on a efficient > manner? How long it usually takes you?. Any advices? Thanks in > advance. I find it very difficult to understand large projects and I very well know the feeling of being overwhelmed with masses of detail. One way that often worked for me is to just start hacking. Find something that bothers you, a lacking feature, or some badly written piece of code you think should be re- factored, anything that gets you motivated. Start with a small change somewhere, then see what breaks. This lets you explore at least the parts that are somehow related to the change. It helps if there is a comprehensive test suite. After a while, when you feel more confident, change something deep at the bottom, preferably so that it requires tedious work in many dependent modules to make the whole thing compile again. This gets you in contact with large parts of the system and has always been a great help to understand the whole because now and then you do have to think about what you do (not everything will always work if it compiles and in Haskell even getting things to compile can be a challenge). Cheers Ben -- "Make it so they have to reboot after every typo." ? Scott Adams From tom.schrijvers at cs.kuleuven.be Fri Jun 12 08:25:49 2015 From: tom.schrijvers at cs.kuleuven.be (Tom Schrijvers) Date: Fri, 12 Jun 2015 10:25:49 +0200 Subject: [Haskell-cafe] Haskell in Vietnam? Message-ID: Dear all, I would like to get in touch with people learning, teaching or using Haskell in Vietnam. Can anyone on this list help me? Thanks, Tom -- prof. dr. ir. Tom Schrijvers Research Professor KU Leuven Department of Computer Science Celestijnenlaan 200A 3001 Leuven Belgium Phone: +32 16 327 830 http://people.cs.kuleuven.be/~tom.schrijvers/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mwotton at gmail.com Mon Jun 15 01:54:51 2015 From: mwotton at gmail.com (Mark Wotton) Date: Mon, 15 Jun 2015 01:54:51 +0000 Subject: [Haskell-cafe] Haskell in Vietnam? In-Reply-To: References: Message-ID: I _was_ using Haskell in Vietnam for the past year, but I'm scheduled to move countries in a few days, so I'm probably not useful to you :) cheers mark On Mon, Jun 15, 2015 at 8:38 AM Tom Schrijvers < tom.schrijvers at cs.kuleuven.be> wrote: > Dear all, > > I would like to get in touch with people learning, teaching or using > Haskell in Vietnam. > Can anyone on this list help me? > > Thanks, > > Tom > > -- > prof. dr. ir. Tom Schrijvers > > Research Professor > KU Leuven > Department of Computer Science > > Celestijnenlaan 200A > 3001 Leuven > Belgium > Phone: +32 16 327 830 > http://people.cs.kuleuven.be/~tom.schrijvers/ > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeffbrown.the at gmail.com Sat Jun 13 18:42:02 2015 From: jeffbrown.the at gmail.com (Jeffrey Brown) Date: Sat, 13 Jun 2015 11:42:02 -0700 Subject: [Haskell-cafe] To "instance C D", GHCI responds that C "is applied to too many type arguments". In-Reply-To: References: Message-ID: Solved it. The problem was that in the class declaration I should include a type variable. jeff at jeffLenovUbu:~/work/computer/dwt/haskell$ ghci -XNullaryTypeClasses GHCi, version 7.8.4: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude> data D = DConstructor Prelude> class C a -- earlier I omitted the a; that seems to have been the problem Prelude> instance C D Prelude> On Sat, Jun 13, 2015 at 12:03 AM, Jeffrey Brown wrote: > jeff at jeffLenovUbu:~$ ghci -XNullaryTypeClasses > GHCi, version 7.8.4: http://www.haskell.org/ghc/ :? for help > Loading package ghc-prim ... linking ... done. > Loading package integer-gmp ... linking ... done. > Loading package base ... linking ... done. > Prelude> class C > Prelude> data D = DConstructor > Prelude> instance C D > > :4:10: > ?C? is applied to too many type arguments > In the instance declaration for ?C D? > Prelude> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From manpacket at gmail.com Fri Jun 12 07:04:52 2015 From: manpacket at gmail.com (Michael Baikov) Date: Fri, 12 Jun 2015 15:04:52 +0800 Subject: [Haskell-cafe] Add IsNumeric (similar to IsString and IsList) Message-ID: Hi Cafe! Now that we have OverloadedList and OverloadedStrings extensions it might make sense to add something similar for numerals - right now if you want to be able to specify some items as numbers you have to implement Num instance, unfortunately not everything that can be represented as number can have sensible operations required by Num: negation makes no sense for set of natural numbers for example, multiplication for some applications of currency values which results in Num instance full of (*) = error "No multipication for Foos", (+) = error "No addition for Foos". I don't have any statistics from hackage or github, but in codebase I'm working with there are 3 such instances. Proposal: add OverloadedNumerals language pragma, IsNumeric typeclass and some methods to make that class useful with behavior similar to Lists and Strings. From jeffbrown.the at gmail.com Sat Jun 13 07:03:09 2015 From: jeffbrown.the at gmail.com (Jeffrey Brown) Date: Sat, 13 Jun 2015 00:03:09 -0700 Subject: [Haskell-cafe] To "instance C D", GHCI responds that C "is applied to too many type arguments". Message-ID: jeff at jeffLenovUbu:~$ ghci -XNullaryTypeClasses GHCi, version 7.8.4: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude> class C Prelude> data D = DConstructor Prelude> instance C D :4:10: ?C? is applied to too many type arguments In the instance declaration for ?C D? Prelude> -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan.miljenovic at gmail.com Mon Jun 15 04:41:41 2015 From: ivan.miljenovic at gmail.com (Ivan Lazar Miljenovic) Date: Mon, 15 Jun 2015 14:41:41 +1000 Subject: [Haskell-cafe] Add IsNumeric (similar to IsString and IsList) In-Reply-To: References: Message-ID: On 12 June 2015 at 17:04, Michael Baikov wrote: > Hi Cafe! > > Now that we have OverloadedList and OverloadedStrings extensions it > might make sense to add something similar for numerals - right now if > you want to be able to specify some items as numbers > you have to implement Num instance, unfortunately not everything that > can be represented as number can have sensible operations required by > Num: negation makes no sense for set of natural numbers for example, > multiplication for some applications of currency values which results > in Num instance full of (*) = error "No multipication for Foos", (+) = > error "No addition for Foos". > > I don't have any statistics from hackage or github, but in codebase > I'm working with there are 3 such instances. > > Proposal: add OverloadedNumerals language pragma, IsNumeric typeclass > and some methods to make that class useful with behavior similar to > Lists and Strings. Is this strictly to replace/augment fromInteger or are you proposing one for fromRational as well? -- Ivan Lazar Miljenovic Ivan.Miljenovic at gmail.com http://IvanMiljenovic.wordpress.com From manpacket at gmail.com Mon Jun 15 04:56:38 2015 From: manpacket at gmail.com (Michael Baikov) Date: Mon, 15 Jun 2015 12:56:38 +0800 Subject: [Haskell-cafe] Add IsNumeric (similar to IsString and IsList) In-Reply-To: References: Message-ID: I guess we can have something similar for rationals as well, I haven't considered those. On Mon, Jun 15, 2015 at 12:41 PM, Ivan Lazar Miljenovic wrote: > On 12 June 2015 at 17:04, Michael Baikov wrote: >> Hi Cafe! >> >> Now that we have OverloadedList and OverloadedStrings extensions it >> might make sense to add something similar for numerals - right now if >> you want to be able to specify some items as numbers >> you have to implement Num instance, unfortunately not everything that >> can be represented as number can have sensible operations required by >> Num: negation makes no sense for set of natural numbers for example, >> multiplication for some applications of currency values which results >> in Num instance full of (*) = error "No multipication for Foos", (+) = >> error "No addition for Foos". >> >> I don't have any statistics from hackage or github, but in codebase >> I'm working with there are 3 such instances. >> >> Proposal: add OverloadedNumerals language pragma, IsNumeric typeclass >> and some methods to make that class useful with behavior similar to >> Lists and Strings. > > Is this strictly to replace/augment fromInteger or are you proposing > one for fromRational as well? > > -- > Ivan Lazar Miljenovic > Ivan.Miljenovic at gmail.com > http://IvanMiljenovic.wordpress.com From ivan.miljenovic at gmail.com Mon Jun 15 05:01:25 2015 From: ivan.miljenovic at gmail.com (Ivan Lazar Miljenovic) Date: Mon, 15 Jun 2015 15:01:25 +1000 Subject: [Haskell-cafe] Add IsNumeric (similar to IsString and IsList) In-Reply-To: References: Message-ID: On 15 June 2015 at 14:56, Michael Baikov wrote: > I guess we can have something similar for rationals as well, I haven't > considered those. I wouldn't call it IsNumeric then, as to me it implies it could be *any* number. IsIntegral maybe though. But I too would like something like this, whatever the name. > > On Mon, Jun 15, 2015 at 12:41 PM, Ivan Lazar Miljenovic > wrote: >> On 12 June 2015 at 17:04, Michael Baikov wrote: >>> Hi Cafe! >>> >>> Now that we have OverloadedList and OverloadedStrings extensions it >>> might make sense to add something similar for numerals - right now if >>> you want to be able to specify some items as numbers >>> you have to implement Num instance, unfortunately not everything that >>> can be represented as number can have sensible operations required by >>> Num: negation makes no sense for set of natural numbers for example, >>> multiplication for some applications of currency values which results >>> in Num instance full of (*) = error "No multipication for Foos", (+) = >>> error "No addition for Foos". >>> >>> I don't have any statistics from hackage or github, but in codebase >>> I'm working with there are 3 such instances. >>> >>> Proposal: add OverloadedNumerals language pragma, IsNumeric typeclass >>> and some methods to make that class useful with behavior similar to >>> Lists and Strings. >> >> Is this strictly to replace/augment fromInteger or are you proposing >> one for fromRational as well? >> >> -- >> Ivan Lazar Miljenovic >> Ivan.Miljenovic at gmail.com >> http://IvanMiljenovic.wordpress.com -- Ivan Lazar Miljenovic Ivan.Miljenovic at gmail.com http://IvanMiljenovic.wordpress.com From carter.schonwald at gmail.com Mon Jun 15 05:04:59 2015 From: carter.schonwald at gmail.com (Carter Schonwald) Date: Mon, 15 Jun 2015 01:04:59 -0400 Subject: [Haskell-cafe] Add IsNumeric (similar to IsString and IsList) In-Reply-To: References: Message-ID: have you tried using rebindable syntax + noImplicitPrelude? That *should* allow you to model this by just having a distinguished fromInteger function in scope during desugaring/type checking. At the very least, its worth experimenting with. On Mon, Jun 15, 2015 at 12:56 AM, Michael Baikov wrote: > I guess we can have something similar for rationals as well, I haven't > considered those. > > On Mon, Jun 15, 2015 at 12:41 PM, Ivan Lazar Miljenovic > wrote: > > On 12 June 2015 at 17:04, Michael Baikov wrote: > >> Hi Cafe! > >> > >> Now that we have OverloadedList and OverloadedStrings extensions it > >> might make sense to add something similar for numerals - right now if > >> you want to be able to specify some items as numbers > >> you have to implement Num instance, unfortunately not everything that > >> can be represented as number can have sensible operations required by > >> Num: negation makes no sense for set of natural numbers for example, > >> multiplication for some applications of currency values which results > >> in Num instance full of (*) = error "No multipication for Foos", (+) = > >> error "No addition for Foos". > >> > >> I don't have any statistics from hackage or github, but in codebase > >> I'm working with there are 3 such instances. > >> > >> Proposal: add OverloadedNumerals language pragma, IsNumeric typeclass > >> and some methods to make that class useful with behavior similar to > >> Lists and Strings. > > > > Is this strictly to replace/augment fromInteger or are you proposing > > one for fromRational as well? > > > > -- > > Ivan Lazar Miljenovic > > Ivan.Miljenovic at gmail.com > > http://IvanMiljenovic.wordpress.com > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcin.jan.mrotek at gmail.com Mon Jun 15 05:21:10 2015 From: marcin.jan.mrotek at gmail.com (Marcin Mrotek) Date: Mon, 15 Jun 2015 07:21:10 +0200 Subject: [Haskell-cafe] Add IsNumeric (similar to IsString and IsList) In-Reply-To: References: Message-ID: +1. Moving cruft out of Num seems like a noble goal to me. Best regards, Marcin Mrotek From matti.nykanen at uef.fi Mon Jun 15 08:05:21 2015 From: matti.nykanen at uef.fi (=?iso-8859-1?Q?Matti_Nyk=E4nen?=) Date: Mon, 15 Jun 2015 08:05:21 +0000 Subject: [Haskell-cafe] Data.Hashable instance generation? Message-ID: Hello, A practical question about getting hashing to work. Having used Data.Map before, I wanted to try Data.HashMap.Lazy instead: ---- {-# LANGUAGE DeriveGeneric #-} import Data.HashMap.Lazy as HM import GHC.Generics (Generic) import Data.Hashable data Colour = Red | Green | Blue deriving Generic instance Hashable Colour foo = HM.insert Red ---- The data and its instance definition are directly from the web page . However, I det the following error: ---- GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. [1 of 1] Compiling Main ( htest.hs, interpreted ) htest.hs:13:8: No instance for (hashable-1.1.2.5:Data.Hashable.Hashable Colour) arising from a use of `insert' Possible fix: add an instance declaration for (hashable-1.1.2.5:Data.Hashable.Hashable Colour) In the expression: insert Red In an equation for `foo': foo = insert Red Failed, modules loaded: none. ---- I do not know what is wrong or how I could fix it. Note that my Haskell had originally the older hashable-1.0.0 package, but I cabal-installed this hashable-1.1.2.5 because surfing the net suggested that it would be much better. Could it be the case that the instance goes somehow in the wrong class? -- Matti Nyk?nen From lambda.fairy at gmail.com Mon Jun 15 08:05:59 2015 From: lambda.fairy at gmail.com (Chris Wong) Date: Mon, 15 Jun 2015 20:05:59 +1200 Subject: [Haskell-cafe] Add IsNumeric (similar to IsString and IsList) In-Reply-To: References: Message-ID: On Fri, Jun 12, 2015 at 7:04 PM, Michael Baikov wrote: > Hi Cafe! > > Now that we have OverloadedList and OverloadedStrings extensions it > might make sense to add something similar for numerals - right now if > you want to be able to specify some items as numbers > you have to implement Num instance, unfortunately not everything that > can be represented as number can have sensible operations required by > Num: negation makes no sense for set of natural numbers for example, > multiplication for some applications of currency values which results > in Num instance full of (*) = error "No multipication for Foos", (+) = > error "No addition for Foos". > > I don't have any statistics from hackage or github, but in codebase > I'm working with there are 3 such instances. > > Proposal: add OverloadedNumerals language pragma, IsNumeric typeclass > and some methods to make that class useful with behavior similar to > Lists and Strings. As for naming: it should be named IsInteger/fromInteger by analogy with IsString/fromString and IsList/fromList. I don't otherwise have an opinion. -- https://lambda.xyz From ivan.miljenovic at gmail.com Mon Jun 15 08:22:04 2015 From: ivan.miljenovic at gmail.com (Ivan Lazar Miljenovic) Date: Mon, 15 Jun 2015 18:22:04 +1000 Subject: [Haskell-cafe] Add IsNumeric (similar to IsString and IsList) In-Reply-To: References: Message-ID: On 15 June 2015 at 18:05, Chris Wong wrote: > On Fri, Jun 12, 2015 at 7:04 PM, Michael Baikov wrote: >> Hi Cafe! >> >> Now that we have OverloadedList and OverloadedStrings extensions it >> might make sense to add something similar for numerals - right now if >> you want to be able to specify some items as numbers >> you have to implement Num instance, unfortunately not everything that >> can be represented as number can have sensible operations required by >> Num: negation makes no sense for set of natural numbers for example, >> multiplication for some applications of currency values which results >> in Num instance full of (*) = error "No multipication for Foos", (+) = >> error "No addition for Foos". >> >> I don't have any statistics from hackage or github, but in codebase >> I'm working with there are 3 such instances. >> >> Proposal: add OverloadedNumerals language pragma, IsNumeric typeclass >> and some methods to make that class useful with behavior similar to >> Lists and Strings. > > As for naming: it should be named IsInteger/fromInteger by analogy > with IsString/fromString and IsList/fromList. The problem with calling it "fromInteger" is that it would clobber the existing fromInteger method in the Num class (thus hiding tricks/qualification would be needed when defining/using instances) unless it is split out of Num, but that will probably be more of an uphill battle. > > I don't otherwise have an opinion. > > -- > https://lambda.xyz > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe -- Ivan Lazar Miljenovic Ivan.Miljenovic at gmail.com http://IvanMiljenovic.wordpress.com From hesselink at gmail.com Mon Jun 15 08:36:19 2015 From: hesselink at gmail.com (Erik Hesselink) Date: Mon, 15 Jun 2015 10:36:19 +0200 Subject: [Haskell-cafe] Data.Hashable instance generation? In-Reply-To: References: Message-ID: Hi Matti, This example relies on generic instance deriving, which was only added in hashable 1.2.0.0, so you need that version or later. For older versions, you'll have to write your own Hashable instance implementation. Regards, Erik On Mon, Jun 15, 2015 at 10:05 AM, Matti Nyk?nen wrote: > Hello, > > A practical question about getting hashing to work. > > Having used Data.Map before, I wanted to try Data.HashMap.Lazy instead: > ---- > {-# LANGUAGE DeriveGeneric #-} > > import Data.HashMap.Lazy as HM > > import GHC.Generics (Generic) > import Data.Hashable > > data Colour = Red | Green | Blue > deriving Generic > > instance Hashable Colour > > foo = HM.insert Red > ---- > The data and its instance definition are directly from the web page . > > However, I det the following error: > ---- > GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help > Loading package ghc-prim ... linking ... done. > Loading package integer-gmp ... linking ... done. > Loading package base ... linking ... done. > [1 of 1] Compiling Main ( htest.hs, interpreted ) > > htest.hs:13:8: > No instance for (hashable-1.1.2.5:Data.Hashable.Hashable Colour) > arising from a use of `insert' > Possible fix: > add an instance declaration for > (hashable-1.1.2.5:Data.Hashable.Hashable Colour) > In the expression: insert Red > In an equation for `foo': foo = insert Red > Failed, modules loaded: none. > ---- > I do not know what is wrong or how I could fix it. > > Note that my Haskell had originally the older hashable-1.0.0 package, but I cabal-installed this hashable-1.1.2.5 because surfing the net suggested that it would be much better. Could it be the case that the instance goes somehow in the wrong class? > -- > Matti Nyk?nen > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe From dons00 at gmail.com Mon Jun 15 09:21:04 2015 From: dons00 at gmail.com (Don Stewart) Date: Mon, 15 Jun 2015 09:21:04 +0000 Subject: [Haskell-cafe] Haskell dev role in Strats at Standard Chartered London Message-ID: I'm hiring another Haskell dev to join the Strats team in London. Details here: https://donsbot.wordpress.com/2015/06/15/haskell-dev-role-in-strats-at-standard-chartered-london-2/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From matti.nykanen at uef.fi Mon Jun 15 09:45:05 2015 From: matti.nykanen at uef.fi (=?iso-8859-1?Q?Matti_Nyk=E4nen?=) Date: Mon, 15 Jun 2015 09:45:05 +0000 Subject: [Haskell-cafe] Fw: Data.Hashable instance generation? In-Reply-To: References: , Message-ID: <1434361507585.77516@uef.fi> Hello again, Thanks to Eric, I changed my problem from generic instance deriving to explicit instance writing. Now I could evoke a more specific - and alarming! - error message: ---- import Data.HashMap.Lazy as HM import Data.Hashable data Colour = Red | Green | Blue deriving Enum instance Hashable Colour where hashWithSalt = hashUsing fromEnum ---- GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude> :l htest [1 of 1] Compiling Main ( htest.hs, interpreted ) Ok, modules loaded: Main. *Main> hash Red Loading package array-0.4.0.1 ... linking ... done. Loading package deepseq-1.3.0.1 ... linking ... done. Loading package bytestring-0.10.0.2 ... linking ... done. Loading package text-0.11.3.1 ... linking ... done. Loading package hashable-1.1.2.5 ... linking ... done. Loading package hashable-1.2.3.2 ... GHCi runtime linker: fatal error: I found a duplicate definition for symbol hashable_fnv_hash_offset whilst processing object file /home/mnykanen/.cabal/lib/hashable-1.2.3.2/ghc-7.6.3/HShashable-1.2.3.2.o This could be caused by: * Loading two different object files which export the same symbol * Specifying the same object file twice on the GHCi command line * An incorrect `package.conf' entry, causing some object to be loaded twice. GHCi cannot safely continue in this situation. Exiting now. Sorry. ---- So my ghci *is* indeed loading two versions of the hashtable package. How do I solve this problem? Please note that I am a newbie regarding Cabal and GHC internals. -- Matti Nyk?nen ________________________________________ From: Erik Hesselink Sent: Monday, June 15, 2015 11:36 AM To: Matti Nyk?nen Cc: haskell-cafe (haskell-cafe at haskell.org) Subject: Re: [Haskell-cafe] Data.Hashable instance generation? Hi Matti, This example relies on generic instance deriving, which was only added in hashable 1.2.0.0, so you need that version or later. For older versions, you'll have to write your own Hashable instance implementation. Regards, Erik On Mon, Jun 15, 2015 at 10:05 AM, Matti Nyk?nen wrote: > Hello, > > A practical question about getting hashing to work. > > Having used Data.Map before, I wanted to try Data.HashMap.Lazy instead: > ---- > {-# LANGUAGE DeriveGeneric #-} > > import Data.HashMap.Lazy as HM > > import GHC.Generics (Generic) > import Data.Hashable > > data Colour = Red | Green | Blue > deriving Generic > > instance Hashable Colour > > foo = HM.insert Red > ---- > The data and its instance definition are directly from the web page . > > However, I det the following error: > ---- > GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help > Loading package ghc-prim ... linking ... done. > Loading package integer-gmp ... linking ... done. > Loading package base ... linking ... done. > [1 of 1] Compiling Main ( htest.hs, interpreted ) > > htest.hs:13:8: > No instance for (hashable-1.1.2.5:Data.Hashable.Hashable Colour) > arising from a use of `insert' > Possible fix: > add an instance declaration for > (hashable-1.1.2.5:Data.Hashable.Hashable Colour) > In the expression: insert Red > In an equation for `foo': foo = insert Red > Failed, modules loaded: none. > ---- > I do not know what is wrong or how I could fix it. > > Note that my Haskell had originally the older hashable-1.0.0 package, but I cabal-installed this hashable-1.1.2.5 because surfing the net suggested that it would be much better. Could it be the case that the instance goes somehow in the wrong class? > -- > Matti Nyk?nen > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe From Rene.Thiemann at uibk.ac.at Mon Jun 15 12:45:17 2015 From: Rene.Thiemann at uibk.ac.at (Thiemann, Rene) Date: Mon, 15 Jun 2015 12:45:17 +0000 Subject: [Haskell-cafe] PhD student or postdoc position announcement Message-ID: 2-year postdoc or 3-year PhD-student position at the University of Innsbruck ============================================================================ The Computational Logic research group at the University of Innsbruck has one open position funded by the FWF (Austrian science fund) via the START project ?Certifying Termination and Complexity Proofs of Programs?. The project aims at increasing the reliability in current complexity and termination provers by independently checking the generated proofs. To this end, several analysis techniques will be formalized in the theorem prover Isabelle/HOL, with a focus on term rewriting and Haskell. For this project, we are looking for an enthusiastic young researcher with a background in computational logic. Knowledge of automated termination analysis, complexity analysis, or theorem proving would be an asset. Candidates with a strong theoretical background in related areas are also encouraged to apply. The PhD-student candidate must have a Master's or equivalent degree. Knowledge of German is not essential. The salary is determined by the FWF-funding scheme (3.546,00 EUR monthly gross salary for postdocs, and 2.024,90 EUR for PhD-students, cf. http://www.fwf.ac.at/en/research-funding/personnel-costs/) Applications (including a CV, a publication list (only for postdocs), and a letter of recommendation) may be emailed to the project leader Ren? Thiemann (rene.thiemann at uibk.ac.at) no later than July 6, 2015. We plan to make decisions on these position until July 10. The preferred starting date is summer or autumn 2015. Informal inquiries are also welcome via email. The city of Innsbruck is superbly located in the beautiful surroundings of the Tyrolean Alps. The combination of the Alpine environment and urban life in this historic town provides a high quality of living. Further information is available from the following links: START Project: http://cl-informatik.uibk.ac.at/research/projects/certifying-termination-and-complexity-proofs-of-pr/ Institute of Computer Science: http://informatik.uibk.ac.at/ University of Innsbruck: http://www.uibk.ac.at/ City of Innsbruck: http://www.innsbruck.at/ From paolo.veronelli at gmail.com Mon Jun 15 14:11:40 2015 From: paolo.veronelli at gmail.com (Paolino) Date: Mon, 15 Jun 2015 16:11:40 +0200 Subject: [Haskell-cafe] returning a polymorphic function Message-ID: Hello list, I'm trying to accomplish something along this line {-# LANGUAGE ScopedTypeVariables #-} f :: IO (a -> a) f = return id main = do (g :: a -> a) <- f print $ g 1 print $ g "ciao" Is it possible or I have to call f more than once to get different g's Thanks paolino -------------- next part -------------- An HTML attachment was scrubbed... URL: From chpatrick at gmail.com Mon Jun 15 14:18:22 2015 From: chpatrick at gmail.com (Patrick Chilton) Date: Mon, 15 Jun 2015 15:18:22 +0100 Subject: [Haskell-cafe] returning a polymorphic function In-Reply-To: References: Message-ID: Yes, but you have to wrap it up: {-# LANGUAGE RankNTypes #-} -- obviously not to useful for this example :) newtype Id = Id (forall a. a -> a) f :: IO Id f = return (Id id) main = do Id g <- f print $ g 1 print $ g "ciao" Can I ask what you're trying to do with this? Patrick On Mon, Jun 15, 2015 at 3:11 PM, Paolino wrote: > Hello list, I'm trying to accomplish something along this line > > {-# LANGUAGE ScopedTypeVariables #-} > > f :: IO (a -> a) > f = return id > > main = do > (g :: a -> a) <- f > print $ g 1 > print $ g "ciao" > > > > Is it possible or I have to call f more than once to get different g's > > > Thanks > > paolino > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andres at well-typed.com Mon Jun 15 14:20:07 2015 From: andres at well-typed.com (=?UTF-8?Q?Andres_L=C3=B6h?=) Date: Mon, 15 Jun 2015 16:20:07 +0200 Subject: [Haskell-cafe] returning a polymorphic function In-Reply-To: References: Message-ID: Hi. The most robust way to achieve this is to define > {-# LANGUAGE RankNTypes #-} > > newtype PolyId = PolyId (forall a. a -> a) > > f :: IO PolyId > f = return (PolyId id) > > main = do > PolyId g <- f > print $ g 1 > print $ g "ciao" You can also do this more directly using ImpredicativeTypes, but that language extension is quite fragile and not really supported. Cheers, Andres -- Andres L?h, Haskell Consultant Well-Typed LLP, http://www.well-typed.com From paolo.veronelli at gmail.com Mon Jun 15 14:26:14 2015 From: paolo.veronelli at gmail.com (Paolino) Date: Mon, 15 Jun 2015 16:26:14 +0200 Subject: [Haskell-cafe] returning a polymorphic function In-Reply-To: References: Message-ID: Thanks, I'd never have guessed. I have a GADT Get a where I define a protocol to query a database where 'a' is the return type a. Then prepare :: IO (Get a -> ErrorAndWriterMonad a) is opening the database and return the query function. I suspect I have to insert the constraint in the wrapper to let transform 'a' to JSON or String, which I don't like. I'll have to dig it. Regards paolino 2015-06-15 16:18 GMT+02:00 Patrick Chilton : > Yes, but you have to wrap it up: > > {-# LANGUAGE RankNTypes #-} > > -- obviously not to useful for this example :) > newtype Id = Id (forall a. a -> a) > > f :: IO Id > f = return (Id id) > > main = do > Id g <- f > print $ g 1 > print $ g "ciao" > > Can I ask what you're trying to do with this? > > Patrick > > On Mon, Jun 15, 2015 at 3:11 PM, Paolino > wrote: > >> Hello list, I'm trying to accomplish something along this line >> >> {-# LANGUAGE ScopedTypeVariables #-} >> >> f :: IO (a -> a) >> f = return id >> >> main = do >> (g :: a -> a) <- f >> print $ g 1 >> print $ g "ciao" >> >> >> >> Is it possible or I have to call f more than once to get different g's >> >> >> Thanks >> >> paolino >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paolo.veronelli at gmail.com Mon Jun 15 15:57:48 2015 From: paolo.veronelli at gmail.com (Paolino) Date: Mon, 15 Jun 2015 17:57:48 +0200 Subject: [Haskell-cafe] returning a polymorphic function In-Reply-To: References: Message-ID: It worked without adding JSON constraint in the newtype. I can do whatever I want with 'a'. A simplified example where the database module is not polluted with future use of the query results. http://lpaste.net/134541#a134548 I tried refactoring common code ...... not easy Thanks again paolino 2015-06-15 16:26 GMT+02:00 Paolino : > Thanks, I'd never have guessed. > I have a GADT Get a where I define a protocol to query a database where > 'a' is the return type a. > Then prepare :: IO (Get a -> ErrorAndWriterMonad a) is opening the > database and return the query function. > I suspect I have to insert the constraint in the wrapper to let transform > 'a' to JSON or String, which I don't like. I'll have to dig it. > > Regards > > paolino > > > 2015-06-15 16:18 GMT+02:00 Patrick Chilton : > >> Yes, but you have to wrap it up: >> >> {-# LANGUAGE RankNTypes #-} >> >> -- obviously not to useful for this example :) >> newtype Id = Id (forall a. a -> a) >> >> f :: IO Id >> f = return (Id id) >> >> main = do >> Id g <- f >> print $ g 1 >> print $ g "ciao" >> >> Can I ask what you're trying to do with this? >> >> Patrick >> >> On Mon, Jun 15, 2015 at 3:11 PM, Paolino >> wrote: >> >>> Hello list, I'm trying to accomplish something along this line >>> >>> {-# LANGUAGE ScopedTypeVariables #-} >>> >>> f :: IO (a -> a) >>> f = return id >>> >>> main = do >>> (g :: a -> a) <- f >>> print $ g 1 >>> print $ g "ciao" >>> >>> >>> >>> Is it possible or I have to call f more than once to get different g's >>> >>> >>> Thanks >>> >>> paolino >>> >>> _______________________________________________ >>> Haskell-Cafe mailing list >>> Haskell-Cafe at haskell.org >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chpatrick at gmail.com Mon Jun 15 16:42:04 2015 From: chpatrick at gmail.com (Patrick Chilton) Date: Mon, 15 Jun 2015 17:42:04 +0100 Subject: [Haskell-cafe] returning a polymorphic function In-Reply-To: References: Message-ID: I've done something similar recently for an emulator I'm writing. It essentially turns GHCI into a debugger for free: newtype Run = Run (forall a. Emu a -> IO a) start :: FilePath -> IO Run breakpoint :: Word16 -> Emu () readMem :: Word16 -> Emu Word8 step :: Emu () Run emu <- start "foo.rom" emu $ breakpoint 0x4567 emu $ readMem 0xdead emu step etc On Mon, Jun 15, 2015 at 4:57 PM, Paolino wrote: > It worked without adding JSON constraint in the newtype. > I can do whatever I want with 'a'. > > A simplified example where the database module is not polluted with future > use of the query results. > > http://lpaste.net/134541#a134548 > > I tried refactoring common code ...... not easy > > Thanks again > > paolino > > 2015-06-15 16:26 GMT+02:00 Paolino : > >> Thanks, I'd never have guessed. >> I have a GADT Get a where I define a protocol to query a database where >> 'a' is the return type a. >> Then prepare :: IO (Get a -> ErrorAndWriterMonad a) is opening the >> database and return the query function. >> I suspect I have to insert the constraint in the wrapper to let transform >> 'a' to JSON or String, which I don't like. I'll have to dig it. >> >> Regards >> >> paolino >> >> >> 2015-06-15 16:18 GMT+02:00 Patrick Chilton : >> >>> Yes, but you have to wrap it up: >>> >>> {-# LANGUAGE RankNTypes #-} >>> >>> -- obviously not to useful for this example :) >>> newtype Id = Id (forall a. a -> a) >>> >>> f :: IO Id >>> f = return (Id id) >>> >>> main = do >>> Id g <- f >>> print $ g 1 >>> print $ g "ciao" >>> >>> Can I ask what you're trying to do with this? >>> >>> Patrick >>> >>> On Mon, Jun 15, 2015 at 3:11 PM, Paolino >>> wrote: >>> >>>> Hello list, I'm trying to accomplish something along this line >>>> >>>> {-# LANGUAGE ScopedTypeVariables #-} >>>> >>>> f :: IO (a -> a) >>>> f = return id >>>> >>>> main = do >>>> (g :: a -> a) <- f >>>> print $ g 1 >>>> print $ g "ciao" >>>> >>>> >>>> >>>> Is it possible or I have to call f more than once to get different g's >>>> >>>> >>>> Thanks >>>> >>>> paolino >>>> >>>> _______________________________________________ >>>> Haskell-Cafe mailing list >>>> Haskell-Cafe at haskell.org >>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.gunton at gmail.com Mon Jun 15 22:38:00 2015 From: ben.gunton at gmail.com (Ben Gunton) Date: Mon, 15 Jun 2015 16:38:00 -0600 Subject: [Haskell-cafe] Type constraint with RankNTypes gradually slows down function? Message-ID: When I write a function with the type constraint "embedded" in the function's type declaration, instead of at the beginning, the function takes longer each time it is run. The simplest example I could write is this: http://lpaste.net/134563. "run1" is near instantaneous the first time, but gets marginally slower after each iteration... after thousands of iterations it takes about a millisecond to run (and keeps getting worse). "run2" is always near instantaneous. What is happening in "run1" that makes it slow down? PS: The example is fairly contrived, I know "run1"'s type declaration wouldn't be used in practice. Thanks for any guidance! {-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleContexts #-} module Main where import Control.Monad.State.Strict import qualified Data.Time.Clock as Clock import Control.Exception run1 :: (Int -> (Num Int => State Int Bool)) -> Int -> IO () run1 f state = do t1 <- Clock.getCurrentTime evaluate $ runState (f 1) state t2 <- Clock.getCurrentTime print $ Clock.diffUTCTime t2 t1 run1 f state run2 :: Num s => (Int -> State s Bool) -> s -> IO () run2 f state = do t1 <- Clock.getCurrentTime evaluate $ runState (f 1) state t2 <- Clock.getCurrentTime print $ Clock.diffUTCTime t2 t1 run2 f state main :: IO () main = run1 (const $ return False) 1 --main = run2 (const $ return False) 1 -------------- next part -------------- An HTML attachment was scrubbed... URL: From allbery.b at gmail.com Mon Jun 15 22:42:03 2015 From: allbery.b at gmail.com (Brandon Allbery) Date: Mon, 15 Jun 2015 18:42:03 -0400 Subject: [Haskell-cafe] Type constraint with RankNTypes gradually slows down function? In-Reply-To: References: Message-ID: On Mon, Jun 15, 2015 at 6:38 PM, Ben Gunton wrote: > When I write a function with the type constraint "embedded" in the > function's type declaration, instead of at the beginning, the function > takes longer each time it is run. The simplest example I could write is > this: http://lpaste.net/134563 > > . "run1" is near instantaneous the first time, but gets marginally slower > after each iteration... after thousands of iterations it takes about a > millisecond to run (and keeps getting worse). "run2" is always near > instantaneous. What is happening in "run1" that makes it slow down? > Something about having to make a typeclass dictionary for each iteration? -- brandon s allbery kf8nh sine nomine associates allbery.b at gmail.com ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From gershomb at gmail.com Tue Jun 16 02:54:24 2015 From: gershomb at gmail.com (Gershom B) Date: Mon, 15 Jun 2015 22:54:24 -0400 Subject: [Haskell-cafe] References on haskellwiki In-Reply-To: <20150311162110.GA44822@alex.alexdebian> References: <20150311162110.GA44822@alex.alexdebian> Message-ID: Just added this extension. Let me know if it works. ?Gershom On March 11, 2015 at 12:21:24 PM, Alexis Praga (alexispraga at mailoo.org) wrote: > Hi, > > I've begun to do some formatting on old Monad Readers editions on > Haskell Wiki. Unfortunately, there is no support for proper references > support. > > Can the admin add the "Cite" extension ? It would help a lot. > > Thanks > > -- > Alexis Praga, PhD Student (CERFACS) > GPG key : AD4A AF6D BB5C 042F 9422 1223 06E1 C1BF E287 65D0 > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > From capn.freako at gmail.com Tue Jun 16 04:27:47 2015 From: capn.freako at gmail.com (David Banas) Date: Mon, 15 Jun 2015 21:27:47 -0700 Subject: [Haskell-cafe] Link to BayHac presentation and code files. Message-ID: <90B55221-28E7-46EC-81DA-380156AB24B4@gmail.com> Hi all, Great to have seen you all again at BayHac! I couldn?t find any reference to a central repository for presentation/code upload. So, here?s my stuff (?Cracking the Vigenere Cipher in Haskell?): https://github.com/capn-freako/BayHac_2015 Many thanks to Graham Hutton for permission to post his code, along with my own. Cheers, -db -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 1594 bytes Desc: not available URL: From ken.takusagawa.2 at gmail.com Tue Jun 16 07:37:58 2015 From: ken.takusagawa.2 at gmail.com (Ken Takusagawa II) Date: Tue, 16 Jun 2015 03:37:58 -0400 Subject: [Haskell-cafe] Space leak with replicateM Message-ID: In the following program, the function "test1" results in huge memory usage, but substituting "test2", which does essentially the same thing, does not. GHC 7.10.1, AMD64. Is there a different implementation of replicateM that avoids the space leak? module Main where { import Control.Monad; numbers :: [Int]; numbers=[1..200]; -- has a space leak test1 :: [[Int]]; test1 = replicateM 4 numbers; -- no space leak test2 :: [[Int]]; test2 = do { x1 <- numbers; x2 <- numbers; x3 <- numbers; x4 <- numbers; return [x1,x2,x3,x4]; }; main :: IO(); main = print $ length $ test1; } Thanks, --ken -------------- next part -------------- An HTML attachment was scrubbed... URL: From hesselink at gmail.com Tue Jun 16 08:58:56 2015 From: hesselink at gmail.com (Erik Hesselink) Date: Tue, 16 Jun 2015 10:58:56 +0200 Subject: [Haskell-cafe] Question about constraining functions to particular ADT constructors In-Reply-To: References: Message-ID: Hi Rom?n, Why not just pass Address to deliverPackage and Email to sendEmail, instead of passing a user? That way each function gets exactly the information it needs, and there's no need to muck with GADTs and DataKinds. Erik On Thu, Jun 11, 2015 at 6:54 PM, Rom?n Gonz?lez wrote: > Hello there, > > I've been thinking on different approaches to constraint particular > functions to a particular constructor of an ADT in order to reduce > representation of invalid states. Say for example I've this types: > > data Address = Address { ... } > newtype Email = Email String > data Package = Package { ... } > data EmailMsg = EmailMsg { ... } > > data User > = RealUser Address > | VirtualUser Email > > And I would like to implement two functions: > > deliverPackage :: User -> Package -> IO Bool > sendEmail :: User -> EmailMsg -> IO () > > I would like to constraint both deliverPackage and sendEmail to receive only > the semantically correct constructor of User. > > I know of an approach I could use, that is wrapping each constructor in it's > own newtype, and create some smart constructor that way, that approach > works, but I find it rather verbose. > > Is there any other well known approach to deal with this scenarios? > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > From mail at joachim-breitner.de Tue Jun 16 09:09:58 2015 From: mail at joachim-breitner.de (Joachim Breitner) Date: Tue, 16 Jun 2015 11:09:58 +0200 Subject: [Haskell-cafe] Space leak with replicateM In-Reply-To: References: Message-ID: <1434445798.1307.18.camel@joachim-breitner.de> Hi, Am Dienstag, den 16.06.2015, 03:37 -0400 schrieb Ken Takusagawa II: > In the following program, the function "test1" results in huge memory > usage, but substituting "test2", which does essentially the same > thing, does not. GHC 7.10.1, AMD64. Is there a different > implementation of replicateM that avoids the space leak? > > module Main where { > import Control.Monad; > > numbers :: [Int]; > numbers=[1..200]; > > -- has a space leak > test1 :: [[Int]]; > test1 = replicateM 4 numbers; > > -- no space leak > test2 :: [[Int]]; > test2 = do { > x1 <- numbers; > x2 <- numbers; > x3 <- numbers; > x4 <- numbers; > return [x1,x2,x3,x4]; > }; > > main :: IO(); > main = print $ length $ test1; > > } > Could be the state hack causing `numbers` to inline, see http://stackoverflow.com/questions/29404065/why-does-this-haskell-code-run-slower-with-o/30603291#30603291 and https://ghc.haskell.org/trac/ghc/ticket/9349 Greetings, Joachim -- Joachim ?nomeata? Breitner mail at joachim-breitner.de ? http://www.joachim-breitner.de/ Jabber: nomeata at joachim-breitner.de ? GPG-Key: 0xF0FBF51F Debian Developer: nomeata at debian.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: This is a digitally signed message part URL: From aeyerstaylor11 at gmail.com Tue Jun 16 12:34:22 2015 From: aeyerstaylor11 at gmail.com (Alexander Eyers-Taylor) Date: Tue, 16 Jun 2015 13:34:22 +0100 Subject: [Haskell-cafe] Space leak with replicateM In-Reply-To: <1434445798.1307.18.camel@joachim-breitner.de> References: <1434445798.1307.18.camel@joachim-breitner.de> Message-ID: <558017CE.3010405@gmail.com> Hello Looking at the generated core numbers is shared in both cases. This is very small list and hence shouldn't create the memory problems. The problem comes from floating out. The test1 expands to roughly the following (in imperative pseudo code) sequence [nums,nums,nums,nums]= xs := sequence [nums,n] for (a in nums) for (rest in xs) yield (a:rest) while test2 expands becomes for (a in nums) for (b in nums) for (c in nums) for (d in nums) yield [a,b,c,d] In the first case xs is shared between all elements in nums. If we write out explicit definitions of replicateM specialised to lists we see replicateM' 0 xs = return [] replicateM' n xs = do a <- xs b <- replicateM' (n-1) xs return (a:b) which is optimised to be replicateM' 0 xs = return [] replicateM' n xs = let recCase = replicateM' (n-1) xs in do a <- xs b <- recCase return (a:b) wheras we can write replicateM'' 0 xs = return [] replicateM'' n xs = do b <- replicateM' (n-1) xs a <- xs return (b ++ [a]) The second version has no space leak. However when n is large it is inefficient due to ++ but this can probably be avoided. The reason why this causes a space leak is due to ghc floating the recursive case out of the lambda which is then shared between the iterations. This avoid some computation but then causes a space leak. test2 itself optimises really well and causes fusion resulting in the tight structure Alex On 16/06/15 10:09, Joachim Breitner wrote: > Hi, > > Am Dienstag, den 16.06.2015, 03:37 -0400 schrieb Ken Takusagawa II: >> In the following program, the function "test1" results in huge memory >> usage, but substituting "test2", which does essentially the same >> thing, does not. GHC 7.10.1, AMD64. Is there a different >> implementation of replicateM that avoids the space leak? >> >> module Main where { >> import Control.Monad; >> >> numbers :: [Int]; >> numbers=[1..200]; >> >> -- has a space leak >> test1 :: [[Int]]; >> test1 = replicateM 4 numbers; >> >> -- no space leak >> test2 :: [[Int]]; >> test2 = do { >> x1 <- numbers; >> x2 <- numbers; >> x3 <- numbers; >> x4 <- numbers; >> return [x1,x2,x3,x4]; >> }; >> >> main :: IO(); >> main = print $ length $ test1; >> >> } >> > Could be the state hack causing `numbers` to inline, see > http://stackoverflow.com/questions/29404065/why-does-this-haskell-code-run-slower-with-o/30603291#30603291 > and > https://ghc.haskell.org/trac/ghc/ticket/9349 > > Greetings, > Joachim > > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe From aeyerstaylor11 at gmail.com Tue Jun 16 14:00:07 2015 From: aeyerstaylor11 at gmail.com (Alexander Eyers-Taylor) Date: Tue, 16 Jun 2015 15:00:07 +0100 Subject: [Haskell-cafe] Type constraint with RankNTypes gradually slows down function? In-Reply-To: References: Message-ID: <55802BE7.3040508@gmail.com> Hello I have no idea why this happens but GHC eta expands before passing it to the recursive case. i.e. run1 f state de-sugars to run1 (\a dictNum -> f a dictNum) state So it allocates a new closure each time. The time increases as each time f is called we must descend through the stack of closure. As to why this happens I have no idea but as it is there after de-sugaring I presume it has something to so with passing dictionaries. Alex On 15/06/15 23:38, Ben Gunton wrote: > When I write a function with the type constraint "embedded" in the > function's type declaration, instead of at the beginning, the function > takes longer each time it is run. The simplest example I could write > is this: http://lpaste.net/134563. "run1" is near instantaneous the > first time, but gets marginally slower after each iteration... after > thousands of iterations it takes about a millisecond to run (and keeps > getting worse). "run2" is always near instantaneous. What is happening > in "run1" that makes it slow down? > > PS: The example is fairly contrived, I know "run1"'s type declaration > wouldn't be used in practice. > > Thanks for any guidance! > > {-# LANGUAGE RankNTypes #-} > {-# LANGUAGE FlexibleContexts #-} > > module Main where > > import Control.Monad.State.Strict > import qualified Data.Time.Clock as Clock > import Control.Exception > > run1 :: (Int -> (Num Int => State Int Bool)) -> Int -> IO () > run1 f state = do > t1 <- Clock.getCurrentTime > evaluate $ runState (f 1) state > t2 <- Clock.getCurrentTime > print $ Clock.diffUTCTime t2 t1 > run1 f state > > run2 :: Num s => (Int -> State s Bool) -> s -> IO () > run2 f state = do > t1 <- Clock.getCurrentTime > evaluate $ runState (f 1) state > t2 <- Clock.getCurrentTime > print $ Clock.diffUTCTime t2 t1 > run2 f state > > main :: IO () > main = run1 (const $ return False) 1 > --main = run2 (const $ return False) 1 > > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe -------------- next part -------------- An HTML attachment was scrubbed... URL: From joehillen at gmail.com Tue Jun 16 16:53:33 2015 From: joehillen at gmail.com (Joe Hillenbrand) Date: Tue, 16 Jun 2015 09:53:33 -0700 Subject: [Haskell-cafe] [Hiring] Infrastructure Engineer @ Elastic (makers of Elasticsearch) Location: Anywhere In-Reply-To: References: Message-ID: The link has changed https://www.elastic.co/about/careers/engineering/infrastructure-engineer/dpwr2ilkyr5kzriGalqWdr On Fri, Jun 5, 2015 at 11:25 AM, Joe Hillenbrand wrote: > Although not strictly a Haskell developer position. Haskel > experience/interest is a huge plus. > > https://www.elastic.co/about/careers/engineering/infrastructure-engineer?id=dpwr2ilkyr5kzriGalqWdr > > (Note: the id param is required or else you'll get a 404) From laygr at outlook.com Wed Jun 17 01:49:35 2015 From: laygr at outlook.com (Jesus Gonzalez) Date: Tue, 16 Jun 2015 20:49:35 -0500 Subject: [Haskell-cafe] About my commitment to my passions, Haskell and the world Message-ID: Hi everybody, I have a very important announcement. I?ve decided to dedicate the next big part of my life to improve the world through Haskell. And you can help! (I?m not asking for money?) I plan to go to live at a ?poor? village where my grandparents live. Poor because it is very hard to get a higher education. My grandfather founded some time ago some schools nearby the village, but if people wanted to have a bright future, they had to leave the village. My father moved to the nearest capital city. The story repeated. My father and my mother (together with other people) founded a school at the city where I was born. I left this city to get an even higher education at one of the best universities of my continent. At college, I got the opportunity to study a year as an exchange student at one of the best CS universities in the world. Knowing that probably I would never be able to study at such a good university again, I took the hardest subjects I could. The first semester, I took 2 undergrad courses an 2 grad courses (Program Transformations, Software Design, etc?) This first semester was hard, but at the end I got ok grades, so I thought that maybe I could give a little bit more. For the next semester, I tried to encode the knowledge I acquired as clearly as I could. Very quickly, I got more interested in how to model this knowledge more than the knowledge itself. When I failed with Java, I turned to Haskell and so it begun. I did enjoy my time also. I got to see the inauguration of the Gates Computer Science Building, I found the time to play the piano and learned how to drive the bike without hands very well. When I returned, my parents kindly forced me to finish colleague. When I graduated, I got a scholarship for grad school (that I took, but I left 3 months later) and a job making iOS and Android apps. I couldn?t use Haskell but I did work some months with F#. Now that I?ve seen the world, the good, the bad and the ugly things, Now that I?ve tasted the impoverishing money and repented, Now I?m ready, I flipped the arrows. The hardest thing so far has been to finish my NDA? I?m still on it? It looks like the story will repeat once more. I want to retreat my self and found a next generation school where my grandparents live. I believe that we need to create high performant Haskellers and that we owe to teach children as young and fast as they can happily take it. I would appreciate encouragement, tutorials for all ages and levels of math encoded in Haskell, advice, anything good. I?m already burning bridges! I?ll keep reporting. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sumit.sahrawat.apm13 at iitbhu.ac.in Wed Jun 17 09:12:20 2015 From: sumit.sahrawat.apm13 at iitbhu.ac.in (Sumit Sahrawat, Maths & Computing, IIT (BHU)) Date: Wed, 17 Jun 2015 14:42:20 +0530 Subject: [Haskell-cafe] About my commitment to my passions, Haskell and the world In-Reply-To: References: Message-ID: A tutorial about haskell tutorials: https://github.com/bitemyapp/learnhaskell On 17 June 2015 at 07:19, Jesus Gonzalez wrote: > Hi everybody, I have a very important announcement. > > I?ve decided to dedicate the next big part of my life to improve the world > through Haskell. And you can help! (I?m not asking for money?) > > I plan to go to live at a ?poor? village where my grandparents live. > Poor because it is very hard to get a higher education. > My grandfather founded some time ago some schools nearby the village, but > if people wanted to have a bright future, they had to leave the village. My > father moved to the nearest capital city. > > The story repeated. My father and my mother (together with other people) > founded a school at the city where I was born. I left this city to get an > even higher education at one of the best universities of my continent. > > At college, I got the opportunity to study a year as an exchange student > at one of the best CS universities in the world. > Knowing that probably I would never be able to study at such a good > university again, I took the hardest subjects I could. The first semester, > I took 2 undergrad courses an 2 grad courses (Program Transformations, > Software Design, etc?) This first semester was hard, but at the end I got > ok grades, so I thought that maybe I could give a little bit more. For the > next semester, I tried to encode the knowledge I acquired as clearly as I > could. Very quickly, I got more interested in how to model this knowledge > more than the knowledge itself. When I failed with Java, I turned to > Haskell and so it begun. > > I did enjoy my time also. I got to see the inauguration of the Gates > Computer Science Building, I found the time to play the piano and learned > how to drive the bike without hands very well. > > When I returned, my parents kindly forced me to finish colleague. When I > graduated, I got a scholarship for grad school (that I took, but I left 3 > months later) and a job making iOS and Android apps. I couldn?t use Haskell > but I did work some months with F#. > > Now that I?ve seen the world, the good, the bad and the ugly things, > Now that I?ve tasted the impoverishing money and repented, > Now I?m ready, I flipped the arrows. > > The hardest thing so far has been to finish my NDA? I?m still on it? > > It looks like the story will repeat once more. I want to retreat my self > and found a next generation school where my grandparents live. I believe > that we need to create high performant Haskellers and that we owe to teach > children as young and fast as they can happily take it. > > *I would appreciate encouragement, tutorials for all ages and levels of > math encoded in Haskell, advice, anything good.* > > I?m already burning bridges! > I?ll keep reporting. > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -- Regards Sumit Sahrawat -------------- next part -------------- An HTML attachment was scrubbed... URL: From hjgtuyl at chello.nl Wed Jun 17 09:38:59 2015 From: hjgtuyl at chello.nl (Henk-Jan van Tuyl) Date: Wed, 17 Jun 2015 11:38:59 +0200 Subject: [Haskell-cafe] About my commitment to my passions, Haskell and the world In-Reply-To: References: Message-ID: On Wed, 17 Jun 2015 03:49:35 +0200, Jesus Gonzalez wrote: > Hi everybody, I have a very important announcement. > > I?ve decided to dedicate the next big part of my life to improve the > world through Haskell. And you can help! (I?m not asking for money?) : > I would appreciate encouragement, tutorials for all ages and levels of > math encoded in Haskell, advice, anything good. : You surely are ambitious; I wish you success. There are many online resources, like tutorials[0], books[1] and at least one MOOC[2]. While I think that tutorials are not suitable for formal education, they might be of some inspiration to someone creating a course. An interesting web page about teaching materials is "The problem of learning functional programming"[3] Regards, Henk-Jan van Tuyl [0] https://wiki.haskell.org/Tutorials [1] https://wiki.haskell.org/Books [2] https://www.edx.org/course/introduction-functional-programming-delftx-fp101x [3] http://bitemyapp.com/posts/2014-12-31-functional-education.html -- Folding at 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 -- From alexander at plaimi.net Wed Jun 17 09:41:46 2015 From: alexander at plaimi.net (Alexander Berntsen) Date: Wed, 17 Jun 2015 11:41:46 +0200 Subject: [Haskell-cafe] About my commitment to my passions, Haskell and the world In-Reply-To: References: Message-ID: <558140DA.6000602@plaimi.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 17/06/15 03:49, Jesus Gonzalez wrote: > I would appreciate encouragement, tutorials for all ages and > levels of math encoded in Haskell, advice, anything good. I don't have much to offer at the moment, but I'd like to say that what you're trying to do is awesome, and that I wish you the best. I hope you will keep us up to date on this list. A blog would be nice. - -- Alexander alexander at plaimi.net https://secure.plaimi.net/~alexander -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJVgUDaAAoJENQqWdRUGk8BxiAP/RLUqVGK4lbO8UwmO/E/Q3DU PsSY5c7SY3Ylc356wpGxXwkSkBB48vPTwaYOJRzTO6IJuzCqnjU/hAvnB5CfEMEe CkY2eqvMNknoQIL7PLPFGUzAvw/PnlBrD3HqX9FfHGBAOXtdTtuAtnrQbGrBH5+L eGcn1x4cSrKDbhQPtY7NWRhPK54CQP08qwxqe/OyfLC+aDPNO6HKb3jjU2cHd08k gKEyiOi/Djqb28XjoLwabyQFc0hlZg9qTGprtkUrvuQMaZzqOeY1WjfB8/w/j6jW uwfksbpvewu8GlXygqHRoldUqCgG3KAfiV+XU3Eij/mxpCcQrsI6fs2Akz4eyFEI VI6vVAoYtTSVMEnueb2H4n9ALStEUJ7GwpyEqXX1yeCK4GYkUB6a23CCCKEiiaCf tNCg92ydm8B9LVYY98VbUOhwbOwYJqsynobiGrYfzCx3RgRVIsoWiA1wABXmMhZr nCQ6XPuLRu9ZhVzQaNsWrWDxaHM7BOsv+JETVhO0lIYqAw3orOmS4msch80x/Slw qeWY/042KgOvXed5pvTRdBAJq3cyA9M8Rn8xgtNGAe47H+3bCPMNAUXiZPn8jJra 9PXjFLoatAFb75aXZMi+S02INu2HqgqPaOTli13hl+MqlpD3huFDGIb4bgPjEwLs Z7LcCyp76RmcEDjvkVgt =y1z4 -----END PGP SIGNATURE----- From mail at nh2.me Wed Jun 17 15:37:55 2015 From: mail at nh2.me (=?UTF-8?B?TmlrbGFzIEhhbWLDvGNoZW4=?=) Date: Wed, 17 Jun 2015 17:37:55 +0200 Subject: [Haskell-cafe] More instances for Identity? Message-ID: <55819453.4040507@nh2.me> Hi, I just noticed that Data.Functor.Identity [1] lacks many useful instances like Eq, Ord, Show ... etc. Is there a reason for this? Otherwise, shouldn't we make a proposal for it? In my opinion, if the seven-tuple has an instance, then Identity deserves it as well. Niklas [1]: https://downloads.haskell.org/~ghc/7.8.3/docs/html/libraries/transformers-0.3.0.0/Data-Functor-Identity.html From mail at nh2.me Wed Jun 17 15:43:44 2015 From: mail at nh2.me (=?windows-1252?Q?Niklas_Hamb=FCchen?=) Date: Wed, 17 Jun 2015 17:43:44 +0200 Subject: [Haskell-cafe] More instances for Identity? In-Reply-To: <55819453.4040507@nh2.me> References: <55819453.4040507@nh2.me> Message-ID: <558195B0.7020306@nh2.me> Clearly I'm behind the times, as just brought to my attention by Michael Snoyman, this is already done in `base` of GHC 7.10: http://downloads.haskell.org/~ghc/7.10.1/docs/html/libraries/base/Data-Functor-Identity.html Cheers! On 17/06/15 17:37, Niklas Hamb?chen wrote: > Hi, > > I just noticed that Data.Functor.Identity [1] lacks many useful > instances like Eq, Ord, Show ... etc. > > Is there a reason for this? > > Otherwise, shouldn't we make a proposal for it? > > In my opinion, if the seven-tuple has an instance, then Identity > deserves it as well. > > Niklas > > > [1]: > https://downloads.haskell.org/~ghc/7.8.3/docs/html/libraries/transformers-0.3.0.0/Data-Functor-Identity.html > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > From ky3 at atamo.com Thu Jun 18 01:04:01 2015 From: ky3 at atamo.com (Kim-Ee Yeoh) Date: Thu, 18 Jun 2015 08:04:01 +0700 Subject: [Haskell-cafe] Haskell Weekly News Message-ID: *Top Picks:* - Andrew Gibiansky announces the Mathematica-inspired REPL 2.0 IHaskell as a web-app you can play with right now . Bouquets include: "This is an awesome step up from the tryhaskell window." Also, "I love IHaskell. I've already started preferring it to ghci since it's so much easier to use." More /r/haskell love here . - Mihai Maruseac and Alejandro Serrano Mena publish the 28th Haskell Communities and Activities Report . Top comment on HN : "Haskell is backed by a truly amazing community. Haskell will continue to inspire people to build better, safer software. I hope that the values of tolerance, respect and benevolence that most of the Haskell community is supporting will also contribute to make tech a more friendly and equal place for everyone." - Bicycling in circles just to find parking in Utrecht? Bas van Dijk launches a city-wide monitoring system that guides you to a space that's free, dry, and safe . Written in Haskell 'natch, even the front-end leverages GHCJS. Devops'ed in NixOS. He tips off his fellow redditors about using blaze-react to wrap Facebook's React library. HN-worthy . - Announcing on haskell-cafe and /r/haskell , Sean Seefried open sources a Docker script that instantly gets you a Haskell build environment for Android game development . No more fiddling with cross-compiles. He even gives you an open source game all mobile-ready. Thanks, Sean! - Vincent Hanquez releases cryptonite , a single package that consolidates 10-20 other crypto packages. Why? Because maintaining multiple packages is a pain involving fiddling with dependency version bounds and changelog/cabal/version metadata. Benefit for the user? Easier discovery of crypto widgets now that they are all in one haddock, as opposed to hidden in a package whose name eludes you. Kibbitz on /r/haskell . - Joe Nelson discovered Haskell two years ago and calls it "moon language." Now he works full-time at Wagon, an all-Haskell start-up offering "a modern data collaboration tool." He's proud of his team that "excels at debugging gnarly issues, including a memory leak caused by a useful yet tricky language feature called lazy evaluation." But what's the buzz that HN and /r/haskell latch on? Answer: The pros and cons of effectful point-free refactoring. - Fredrik Olsen migrates from Ruby on Rails (RoR) to Haskell at fintech start-up Bdellium. Unlike RoR where he "always had a much harder time" with an existing codebase, he testifies that "Haskell let me quickly browse the code, read the types and almost instantly understand the structure and layout of the program." Hiring for RoR nets him "a few hundred applications" where only "10?20% I?d say are people that I?d actually be interested in hiring." Hiring for Haskell gets "50 responses to the Reddit post, all of them were people that I could have hired. Many of the applicants were even grossly over-qualified and were willing to take the job just because it would let them work in Haskell." Ben Ford of Fynder.io corroborates Fredrik in the top comment on /r/haskell . Phil Wadler reblogs the story and zooms in on how Fredrik gained 3.7x parallelism from 4 cores by merely tweaking a single line of code. Control.Parallel.Strategies ftw! - Arnaud Bailly shares on HN that he had "no issue finding talent" for Haskell jobs in Singapore. "150 qualified applicants (i.e. passed the test, which was to design an inventory management system in Haskell) for ~10 positions, all foreign; the majority came from the US, Germany and Scandinavia." - If type errors can be deferred, why not also "name not found"? Tom Ellis asks . He thinks it would make Haskell "gentler for newcomers." For veterans: even more stub-driven-dev opportunities. Coincidentally, Dan Burton spitballed the same on /r/haskell . This idea has a history stretching back at least 3 years: see trac ticket #5910 . - David Luposchainsky proposes to move the fail method out of the Monad type class . With the deeply thought out blueprint he provides, /r/haskell reports that the community's already working on it. Discussion on libraries list . - Anthony Cowley proposes a shorter syntax for imports on haskell-cafe and trac . He withdraws his proposal five days later because the "disdainful mockery" and "strongly worded rebuttals" have him overwhelmed on what is only a "nights and weekends project." Reddit discussion here . - Henk-Jan van Tuyl runs smack into a library .a-extension File Not Found problem when installing data-default-instances-old-locale on 7.10. Culprit? Windows! And its %&@#! 255-character filepath limit. He is not alone . Why is 7.8 ok? Because package names in the filepath used to be abbreviated. Workaround? Instead of cabal install X, download it first: cabal get X, then cabal install ./X. Thanks to Matej Borovec and Michal Antkiewicz for sorting it out. - FP Complete announces Stack , a replacement for cabal-install the command-line tool (not Cabal the library infrastructure). Stack leverages Stackage Long-Term Support (LTS) releases for a speedy escape from cabal hell. Warmly received on /r/haskell . Dan Burton blogs on how Stack eases development by removing the need to remember a sequence of cabal commands . HN-worthy and a troll that Haskell's "an esoteric language that no one uses" provokes many a valiant, evidence-backed defense . - Redditor beerdude26 nudges folks on /r/haskell to continue cultivating the haskell wiki . He sets an example by splicing in the common newtype workaround into the entry on orphan instances. - In HN news : Cloud Haskell -- Erlang-style concurrent and distributed programming. Top comment notes that whereas the web site suggests that activity stopped in 2014, CH actually thrives on Github . - In HN news : Haskell wiki entry on Frag , a 2005 undergrad project by Mun Hon Cheong who recreated a Quake3-like First-Person Shooter (FPS) game using Yampa FRP. Although a decade old, Cody Goodman reports that he's gotten it to compile. - In HN news : APL lives! A functional programmer investigates APL , discovers that it "looks every bit as mind-bending and unbe?liev?able as scenes from Johnny Depp?s *Fear and Loathing in L**as Vegas*", and summarizes the syntax for the benefit of all. *Quotes of the Week:* - A typeclass with only one instance is nonsensical, and often a symptom of trying to use typeclasses as OO classes. -- Brandon Allbery - That Haskell shows the developer things about themselves even they didn't know is enough to make it worth learning. It's mind-bending and ideology-exposing. -- Redditor on /r/haskell - Haskell's great for writing an ugly solution and fixing it later because refactoring is so cheap. No need to get it right the first time. -- Gabriel Gonzalez on Twitter -- Kim-Ee nights and weekends project -------------- next part -------------- An HTML attachment was scrubbed... URL: From defigueiredo at ucdavis.edu Thu Jun 18 02:45:34 2015 From: defigueiredo at ucdavis.edu (Dimitri DeFigueiredo) Date: Wed, 17 Jun 2015 20:45:34 -0600 Subject: [Haskell-cafe] phantom types and record syntax Message-ID: <558230CE.2020806@ucdavis.edu> Hi All, My apologies if this is not the right forum, but am not satisfied with my current understanding. I am surprised that this program compiles in GHC: ----- data UserSupplied = UserSupplied -- i.e. unsafe data Safe = Safe data Username a = Username { first :: String, last :: String} sanitize :: Username UserSupplied -> Username Safe sanitize name = name { first = "John" } main = putStrLn "Hi!" ----- My trouble is that it seems the record syntax is*implicitly* converting from one type to the other. It seems I would have to remove the phantom type by adding a tag to avoid this: ----- data Username a = Username { first :: String, last :: String, tag :: a } sanitize :: Username UserSupplied -> Username Safe sanitize name = name { first = "John" } -- FAIL as expected!! :-) ----- But this makes me unwilling to use phantom types for security as I would be worried of unwittingly making the conversion. Could somebody sprinkle some insight into why this is "converted automatically" for phantom types? Is there another way around this? Thanks! Dimitri -------------- next part -------------- An HTML attachment was scrubbed... URL: From tikhon at jelv.is Thu Jun 18 03:10:14 2015 From: tikhon at jelv.is (Tikhon Jelvis) Date: Wed, 17 Jun 2015 20:10:14 -0700 Subject: [Haskell-cafe] phantom types and record syntax In-Reply-To: <558230CE.2020806@ucdavis.edu> References: <558230CE.2020806@ucdavis.edu> Message-ID: Record updates have to be able to change the type of the value in order to work with polymorphic fields. Here's a contrived example: data Foo a = Foo { foo :: a } reFoo x = x { foo = "blarg" } By the same logic, the resulting type can change the phantom parameter because the phantom parameter is not constrained at all. You could have the same problem without record syntax: unsafeId (Username first last) = Username first last That looks fine?but completely bypasses the phantom type! (In fact, it could even produce a Username Int or something.) This is a fundamental limitation of phantom types. Since they're not constrained at all, they're very easy to change. They're useful, but more as a convention and a warning than as an ironclad guarantee. In this specific case, I can think of two reasonable options. One is to make the Username type abstract?don't export the constructor and ensure that the only provided ways to make one are safe. Another is to make a String newtype with a flag, and keep that abstract. Domain-specific types like Username could use this newtype for their fields. newtype Str a = Str String data Username a = Username { first :: Str a, last :: Str a } As long as you have access to a Str constructor, you can make "Safe" instances however you like; however, if you keep the type abstract, it can be safe outside the defining module. There are some other design options, and it's something worth thinking about. But what you've found is a fundamental quality (and limitation) of phantom types and has to be kept in mind as you're working with them. On Wed, Jun 17, 2015 at 7:45 PM, Dimitri DeFigueiredo < defigueiredo at ucdavis.edu> wrote: > Hi All, > > My apologies if this is not the right forum, but am not satisfied with my > current understanding. > > I am surprised that this program compiles in GHC: > > ----- > data UserSupplied = UserSupplied -- i.e. unsafe > data Safe = Safe > > data Username a = Username { first :: String, last :: String} > > sanitize :: Username UserSupplied -> Username Safe > sanitize name = name { first = "John" } > > main = putStrLn "Hi!" > ----- > > My trouble is that it seems the record syntax is *implicitly* converting > from one type to the other. It seems I would have to remove the phantom > type by adding a tag to avoid this: > > ----- > data Username a = Username { first :: String, last :: String, tag :: a } > > sanitize :: Username UserSupplied -> Username Safe > sanitize name = name { first = "John" } -- FAIL as expected!! :-) > ----- > > But this makes me unwilling to use phantom types for security as I would > be worried of unwittingly making the conversion. > > Could somebody sprinkle some insight into why this is "converted > automatically" for phantom types? > Is there another way around this? > > > Thanks! > > > Dimitri > > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From voldermort at hotmail.com Thu Jun 18 08:09:19 2015 From: voldermort at hotmail.com (Jeremy) Date: Thu, 18 Jun 2015 01:09:19 -0700 (MST) Subject: [Haskell-cafe] Where is Haskell Weekly News syndicated? In-Reply-To: <20150315145524.GA73677@inanna.trygub.com> References: <1426087518070-5766854.post@n5.nabble.com> <1426408319367-5767017.post@n5.nabble.com> <20150315145524.GA73677@inanna.trygub.com> Message-ID: <1434614959662-5811671.post@n5.nabble.com> trygub wrote >> it underscores the need to post to a more capable >> publishing platform (such as a blog), which can then email to the lists. > > Please bear with us ? we are spinning the tools up. Any progress? I've tried subscribing to the newsgroups from my rss aggregator, but most editions are missed :-( -- View this message in context: http://haskell.1045720.n5.nabble.com/Where-is-Haskell-Weekly-News-syndicated-tp5766854p5811671.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. From ivan.miljenovic at gmail.com Thu Jun 18 08:11:01 2015 From: ivan.miljenovic at gmail.com (Ivan Lazar Miljenovic) Date: Thu, 18 Jun 2015 18:11:01 +1000 Subject: [Haskell-cafe] Canberra Functional Programming Group Message-ID: In case you live in Canberra, Australia and were unaware of this already, Alex Mason (aka Axman6) is helping to arrange/organise a new functional programming group. The first meeting for it is next week on 24 June (including free pizza!). For more information please see http://www.meetup.com/CanFPG/ -- Ivan Lazar Miljenovic Ivan.Miljenovic at gmail.com http://IvanMiljenovic.wordpress.com From hvr at gnu.org Thu Jun 18 08:32:05 2015 From: hvr at gnu.org (Herbert Valerio Riedel) Date: Thu, 18 Jun 2015 10:32:05 +0200 Subject: [Haskell-cafe] Native -XCPP Conclusion (was: RFC: "Native -XCPP" Proposal) In-Reply-To: <87zj5i55gs.fsf@gmail.com> (Herbert Valerio Riedel's message of "Wed, 06 May 2015 13:08:03 +0200") References: <87zj5i55gs.fsf@gmail.com> Message-ID: <87oakdo1ru.fsf@gmail.com> Hello *, Following up on the "Native -XCPP" Proposal discussion, it appears that cpphs' current LGPL+SLE licensing doesn't pose an *objective* showstopper problem but is rather more of an inconvenience as it causes argumentation/discussion overhead (which then /may/ actually result in Haskell being turned down eventually over alternatives that do without LGPL components). In order to acknowledge this discomfort, for GHC 7.12 we propose to follow "plan 4" according to [1] (i.e. calling out to a cpphs-executable as a separate process), thereby avoiding pulling any LGPL-subjected cpphs code into produced executables when linking against the 'ghc' package. "Plan 2" (i.e. embedding/linking cpphs' code directly into ghc) would reduce fork/exec overhead, which can be substantial on Windows [2], but plan 4 is no worse than what we have now. Last Call: Are there any objections with GHC adopting "plan 4"[1]? [1]: [2]: Thanks, HVR On 2015-05-06 at 13:08:03 +0200, Herbert Valerio Riedel wrote: > Hello *, > > As you may be aware, GHC's `{-# LANGUAGE CPP #-}` language extension > currently relies on the system's C-compiler bundled `cpp` program to > provide a "traditional mode" c-preprocessor. > > This has caused several problems in the past, since parsing Haskell code > with a preprocessor mode designed for use with C's tokenizer has caused > already quite some problems[1] in the past. I'd like to see GHC 7.12 > adopt an implemntation of `-XCPP` that does not rely on the shaky > system-`cpp` foundation. To this end I've created a wiki page > > https://ghc.haskell.org/trac/ghc/wiki/Proposal/NativeCpp > > to describe the actual problems in more detail, and a couple of possible > ways forward. Ideally, we'd simply integrate `cpphs` into GHC > (i.e. "plan 2"). However, due to `cpp`s non-BSD3 license this should be > discussed and debated since affects the overall-license of the GHC > code-base, which may or may not be a problem to GHC's user-base (and > that's what I hope this discussion will help to find out). > > So please go ahead and read the Wiki page... and then speak your mind! > > > Thanks, > HVR > > > [1]: ...does anybody remember the issues Haskell packages (& GHC) > encountered when Apple switched to the Clang tool-chain, thereby > causing code using `-XCPP` to suddenly break due to subtly > different `cpp`-semantics? -- "Elegance is not optional" -- Richard O'Keefe From ky3 at atamo.com Thu Jun 18 09:46:55 2015 From: ky3 at atamo.com (Kim-Ee Yeoh) Date: Thu, 18 Jun 2015 16:46:55 +0700 Subject: [Haskell-cafe] Where is Haskell Weekly News syndicated? In-Reply-To: <1434614959662-5811671.post@n5.nabble.com> References: <1426087518070-5766854.post@n5.nabble.com> <1426408319367-5767017.post@n5.nabble.com> <20150315145524.GA73677@inanna.trygub.com> <1434614959662-5811671.post@n5.nabble.com> Message-ID: On Thu, Jun 18, 2015 at 3:09 PM, Jeremy wrote: > Any progress? I've tried subscribing to the newsgroups from my rss > aggregator, but most editions are missed :-( Thanks for reminding me of this, Jeremy. It's not forgotten -- it's on a TO DO list that I review every week for HWN. Some items take priority and one of them will be announced in an upcoming editorial. In the meantime, have you looked at ifttt.com or zapier? I'm affiliated with neither but have used ifttt for tasks such as this. You can count on all issues having the subject of "Haskell Weekly News" and posted to the haskell-cafe. There are RSS feeds for haskell-cafe here: http://haskell.1045720.n5.nabble.com/template/NamlServlet.jtp?macro=feeds&node=3074699 Via ifttt, there's probably a way to input an RSS, filter on it, and export the HWN-only RSS. Jeremy, would you mind sharing any discoveries? -- Kim-Ee -------------- next part -------------- An HTML attachment was scrubbed... URL: From voldermort at hotmail.com Thu Jun 18 12:19:31 2015 From: voldermort at hotmail.com (Jeremy) Date: Thu, 18 Jun 2015 05:19:31 -0700 (MST) Subject: [Haskell-cafe] Where is Haskell Weekly News syndicated? In-Reply-To: References: <1426087518070-5766854.post@n5.nabble.com> <1426408319367-5767017.post@n5.nabble.com> <20150315145524.GA73677@inanna.trygub.com> <1434614959662-5811671.post@n5.nabble.com> Message-ID: <1434629971980-5811691.post@n5.nabble.com> Kim-Ee Yeoh wrote > In the meantime, have you looked at ifttt.com or zapier? I'm affiliated > with neither but have used ifttt for tasks such as this. > > You can count on all issues having the subject of "Haskell Weekly News" > and > posted to the haskell-cafe. There are RSS feeds for haskell-cafe here: > > http://haskell.1045720.n5.nabble.com/template/NamlServlet.jtp?macro=feeds&node=3074699 > > Via ifttt, there's probably a way to input an RSS, filter on it, and > export > the HWN-only RSS. > > Jeremy, would you mind sharing any discoveries? I did this with Inoreader but most of the weekly newsen didn't show up in the feed. It looked like some of them had been posted as replies of earlier newsen, which made the rss think it was a reply to an old thread and it didn't show up. I didn't spend an inordinate amount of time trying to debug how the list archives generate their feeds though. -- View this message in context: http://haskell.1045720.n5.nabble.com/Where-is-Haskell-Weekly-News-syndicated-tp5766854p5811691.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. From vigalchin at gmail.com Thu Jun 18 15:59:42 2015 From: vigalchin at gmail.com (Vasili I. Galchin) Date: Thu, 18 Jun 2015 08:59:42 -0700 Subject: [Haskell-cafe] Haskell and Spark Message-ID: Hello, There was a posting from a Polish guy(Wojcieh .,,,, been trying to contact him) on implementing a library/wrapper for Spark. Does anybody know the status? Vasili -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholls.mark at vimn.com Thu Jun 18 16:19:38 2015 From: nicholls.mark at vimn.com (Nicholls, Mark) Date: Thu, 18 Jun 2015 16:19:38 +0000 Subject: [Haskell-cafe] Mild confusion around type family Message-ID: Below is a very simple almost canonical natural number model. I'm slightly confused by how type families work Wikipedia says.... "Type families are a feature of some type systems that allow PARTIAL functions between types to be defined by pattern matching" So... > {-# LANGUAGE DataKinds #-} > {-# LANGUAGE ExplicitForAll #-} > {-# LANGUAGE FlexibleContexts #-} > {-# LANGUAGE FlexibleInstances #-} > {-# LANGUAGE GADTs #-} > {-# LANGUAGE MultiParamTypeClasses #-} > {-# LANGUAGE PolyKinds #-} > {-# LANGUAGE StandaloneDeriving #-} > {-# LANGUAGE TypeFamilies #-} > {-# LANGUAGE TypeOperators #-} > {-# LANGUAGE UndecidableInstances #-} > {-# LANGUAGE ScopedTypeVariables #-} lets do something simple > data Z > data S n > type family Sub a b > -- a - 0 == a > type instance Sub a Z = a > -- (a + 1) - (b + 1) == a - b > type instance Sub (S a) (S b) = Sub a b > oneMinusOne :: Z > oneMinusOne = undefined :: Sub (S Z) (S Z) I want this to be a type error!...but the above type family appears to not be partial...this IS defined...."Sub Z (S Z)" is a type! (I thought it wasn't) > oneMinusTwo :: Sub Z (S Z) > oneMinusTwo = undefined :: Sub (S Z) (S (S Z)) CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. -------------- next part -------------- An HTML attachment was scrubbed... URL: From miguel.a.santos.l at gmail.com Thu Jun 18 17:38:42 2015 From: miguel.a.santos.l at gmail.com (Miguel A. Santos) Date: Thu, 18 Jun 2015 13:38:42 -0400 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 Message-ID: (I already sent a comment on the Shakespeare site but couldn't get too far. So, if this isn't the right place for this issue, I'd appreciate you point me to the right one.) Hi, I can't install yesod. Doing a cabal install yesod-bin or cabal install yesod fails because it fails to build shakespeare. I tried with all versions of shapeare >= 2.0, as required by yesod-bin. Below are all outputs. My environment: OS X 10.6.8, Xcode 3.2 Haskell-platform 2014.2.0.0 ghc-7.8.3 cabal-install 1.22.4.0 using version 1.22.3.0 of the Cabal library. This corresponds to a fresh install of the HP, ghc, and cabal I didn't before trying to install yesod. The developer of Shakespeare suspects that be a bug of HP and suggested I try a clean install of GHC as explained in http://www.stackage.org/install#mac-os-x However, the bindist available there doesn't work with my OS 10.6.8 I have a large screen output from those trials that you can check on the Shakespeare github page corresponding to the thread I started there https://github.com/yesodweb/shakespeare/issues/156 If you prefer, I can paste it here as well. Thanks in advance. MA -- Public key ID: E8FE60D7 Public key server: see, e.g., hkp://keys.gnupg.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From romand.ne at gmail.com Thu Jun 18 17:44:20 2015 From: romand.ne at gmail.com (Roman Dzvinkovsky) Date: Thu, 18 Jun 2015 14:44:20 -0300 Subject: [Haskell-cafe] Haskell users on Chile In-Reply-To: References: <5576D88E.7090203@gmail.com> Message-ID: Living in Vi?a del Mar, would love to participate. 2015-06-09 9:46 GMT-03:00 Anupam Jain : > Great idea! Though not a native Chilean, I lived in Chile (Santiago) > for the better part of a year in 2014-2015, where my favourite > activity was infiltrating JS meetups and evangelizing Haskell :) > > It would be great to have a dedicated Haskell community there. > > -- Anupam > > On Tue, Jun 9, 2015 at 5:44 PM, Ruben Astudillo > wrote: > > Hi all > > > > I would like to see how many haskellers are living on Chile with hopes of > > forming a user group. If you are in here, you should reply this thread > and > > see > > how many of us there are. You can also contact me to my mail. > > > > -- > > Ruben Astudillo. pgp: 0x3C332311 , usala en lo posible :-) > > Crear un haiku, en diecisiete silabas, es complica... > > _______________________________________________ > > Haskell-Cafe mailing list > > Haskell-Cafe at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ky3 at atamo.com Thu Jun 18 17:46:58 2015 From: ky3 at atamo.com (Kim-Ee Yeoh) Date: Fri, 19 Jun 2015 00:46:58 +0700 Subject: [Haskell-cafe] Where is Haskell Weekly News syndicated? In-Reply-To: <1434629971980-5811691.post@n5.nabble.com> References: <1426087518070-5766854.post@n5.nabble.com> <1426408319367-5767017.post@n5.nabble.com> <20150315145524.GA73677@inanna.trygub.com> <1434614959662-5811671.post@n5.nabble.com> <1434629971980-5811691.post@n5.nabble.com> Message-ID: On Thu, Jun 18, 2015 at 7:19 PM, Jeremy wrote: > I did this with Inoreader but most of the weekly newsen didn't show up in > the feed. > > It looked like some of them had been posted as replies of earlier > newsen, which made the rss think it was a reply to an old thread and it > didn't show up. > Ah, I see what you mean. An ex-publisher did what you describe. That said, every one of my issues is sent out as a new email and that won't change. Use this link to see if you've got them all: http://goo.gl/7vrqrQ -- Kim-Ee -------------- next part -------------- An HTML attachment was scrubbed... URL: From chaddai.fouche at gmail.com Thu Jun 18 17:48:24 2015 From: chaddai.fouche at gmail.com (=?UTF-8?B?Q2hhZGRhw68gRm91Y2jDqQ==?=) Date: Thu, 18 Jun 2015 17:48:24 +0000 Subject: [Haskell-cafe] phantom types and record syntax In-Reply-To: <558230CE.2020806@ucdavis.edu> References: <558230CE.2020806@ucdavis.edu> Message-ID: Le jeu. 18 juin 2015 ? 04:45, Dimitri DeFigueiredo a ?crit : > I am surprised that this program compiles in GHC: > > snip > > My trouble is that it seems the record syntax is *implicitly* converting > from one type to the other. It seems I would have to remove the phantom > type by adding a tag to avoid this: > This is faulty reasoning because it imply that a value changed type in your code, based on your understanding that the record syntax is "changing" a value... This is not the case ! Haskell is functional, immutability is the rule. The record syntax is just a shortcut to create a new value sharing some of its parts with the old value. It is thus perfectly normal that the type of this new value can be different of the type of the old value if no other constraint prevent this (and Phantom types are by essence unconstrained by the value, that is why they're "Phantom"). > > But this makes me unwilling to use phantom types for security as I would > be worried of unwittingly making the conversion. > > The value of Phantom types is generally only displayed if you make them abstract types, since the only way to constrain the phantom type is by imposing restrictive signatures for your handling functions (and then using those restricted functions)... This is why you usually won't export the constructors, only smart constructors that can only produce a precise type of value with the right phantom type. In these conditions, you can't "unwittingly make a conversion" and your API impose a safe pattern of use, helped by the type system to interdict unsafe combination without any runtime cost. > > Could somebody sprinkle some insight into why this is "converted > automatically" for phantom types? > Is there another way around this? > > As I said, your perspective is wrong : there is no "conversion" here, simply a new value with a new type. I really fail to see why you would want your program to fail to compile, your "sanitize" is exactly the kind of function Phantom types are for : supposing you can only create "Username UserSupplied" with your API, and a part of your API only accept "Username Safe", you'll need a function like sanitize to bridge those two parts. -- Jeda? -------------- next part -------------- An HTML attachment was scrubbed... URL: From miguel.a.santos.l at gmail.com Thu Jun 18 18:14:53 2015 From: miguel.a.santos.l at gmail.com (Miguel A. Santos) Date: Thu, 18 Jun 2015 14:14:53 -0400 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: That is obviously a typo: I meant I *did* do a fresh install of the Haskell Platform and cabal before trying -and failing- to install yesod. On Thu, Jun 18, 2015 at 1:38 PM, Miguel A. Santos < miguel.a.santos.l at gmail.com> wrote: > This corresponds to a fresh install of the HP, ghc, and cabal I didn't > before trying to install yesod. > -- Public key ID: E8FE60D7 Public key server: see, e.g., hkp://keys.gnupg.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From cma at bitemyapp.com Thu Jun 18 18:36:37 2015 From: cma at bitemyapp.com (Christopher Allen) Date: Thu, 18 Jun 2015 13:36:37 -0500 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: Did you see that the Mac instructions said to follow the "other *nix" instructions if you were using an older version of Mac OS X? Those link here: https://www.haskell.org/ghc/download_ghc_7_8_4#binaries Get rid of all that (GHC, HP, Cabal), then install GHC using the bindist for Mac OS X linked above. On Thu, Jun 18, 2015 at 1:14 PM, Miguel A. Santos < miguel.a.santos.l at gmail.com> wrote: > That is obviously a typo: I meant I *did* do a fresh install of the > Haskell Platform and cabal before > trying -and failing- to install yesod. > > On Thu, Jun 18, 2015 at 1:38 PM, Miguel A. Santos < > miguel.a.santos.l at gmail.com> wrote: > >> This corresponds to a fresh install of the HP, ghc, and cabal I didn't >> before trying to install yesod. >> > > > -- > Public key ID: E8FE60D7 > Public key server: see, e.g., hkp://keys.gnupg.net > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -- Chris Allen Currently working on http://haskellbook.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From miguel.a.santos.l at gmail.com Thu Jun 18 19:08:47 2015 From: miguel.a.santos.l at gmail.com (Miguel A. Santos) Date: Thu, 18 Jun 2015 15:08:47 -0400 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: Indeed I saw that. That's what I meant with the bindist not being available for OSX 10.6.8; only for 10.7+ https://www.haskell.org/ghc/download_ghc_7_8_4#macosx_x86_64 My bad, I should have said it before. -- Public key ID: E8FE60D7 Public key server: see, e.g., hkp://keys.gnupg.net On Thu, Jun 18, 2015 at 2:36 PM, Christopher Allen wrote: > Did you see that the Mac instructions said to follow the "other *nix" > instructions if you were using an older version of Mac OS X? > > Those link here: https://www.haskell.org/ghc/download_ghc_7_8_4#binaries > > Get rid of all that (GHC, HP, Cabal), then install GHC using the bindist > for Mac OS X linked above. > > On Thu, Jun 18, 2015 at 1:14 PM, Miguel A. Santos < > miguel.a.santos.l at gmail.com> wrote: > >> That is obviously a typo: I meant I *did* do a fresh install of the >> Haskell Platform and cabal before >> trying -and failing- to install yesod. >> >> On Thu, Jun 18, 2015 at 1:38 PM, Miguel A. Santos < >> miguel.a.santos.l at gmail.com> wrote: >> >>> This corresponds to a fresh install of the HP, ghc, and cabal I didn't >>> before trying to install yesod. >>> >> >> >> -- >> Public key ID: E8FE60D7 >> Public key server: see, e.g., hkp://keys.gnupg.net >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> >> > > > -- > Chris Allen > Currently working on http://haskellbook.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cma at bitemyapp.com Thu Jun 18 19:32:28 2015 From: cma at bitemyapp.com (Christopher Allen) Date: Thu, 18 Jun 2015 14:32:28 -0500 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: Ah that's frustrating, that's my mistake ? I'm sorry. I thought you were talking about GHC for Mac OS X not being available for your OS version either. Your best bet on HP is to specify an older version of Yesod that will work with the dependencies that your version of HP comes with. On Thu, Jun 18, 2015 at 2:08 PM, Miguel A. Santos < miguel.a.santos.l at gmail.com> wrote: > Indeed I saw that. That's what I meant with the bindist not being > available for OSX 10.6.8; only for 10.7+ > https://www.haskell.org/ghc/download_ghc_7_8_4#macosx_x86_64 > My bad, I should have said it before. > > > > -- > Public key ID: E8FE60D7 > Public key server: see, e.g., hkp://keys.gnupg.net > > On Thu, Jun 18, 2015 at 2:36 PM, Christopher Allen > wrote: > >> Did you see that the Mac instructions said to follow the "other *nix" >> instructions if you were using an older version of Mac OS X? >> >> Those link here: https://www.haskell.org/ghc/download_ghc_7_8_4#binaries >> >> Get rid of all that (GHC, HP, Cabal), then install GHC using the bindist >> for Mac OS X linked above. >> >> On Thu, Jun 18, 2015 at 1:14 PM, Miguel A. Santos < >> miguel.a.santos.l at gmail.com> wrote: >> >>> That is obviously a typo: I meant I *did* do a fresh install of the >>> Haskell Platform and cabal before >>> trying -and failing- to install yesod. >>> >>> On Thu, Jun 18, 2015 at 1:38 PM, Miguel A. Santos < >>> miguel.a.santos.l at gmail.com> wrote: >>> >>>> This corresponds to a fresh install of the HP, ghc, and cabal I didn't >>>> before trying to install yesod. >>>> >>> >>> >>> -- >>> Public key ID: E8FE60D7 >>> Public key server: see, e.g., hkp://keys.gnupg.net >>> >>> _______________________________________________ >>> Haskell-Cafe mailing list >>> Haskell-Cafe at haskell.org >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>> >>> >> >> >> -- >> Chris Allen >> Currently working on http://haskellbook.com >> > > -- Chris Allen Currently working on http://haskellbook.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From miguel.a.santos.l at gmail.com Thu Jun 18 19:57:02 2015 From: miguel.a.santos.l at gmail.com (Miguel A. Santos) Date: Thu, 18 Jun 2015 15:57:02 -0400 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: Thanks! No problem. I gave a try to your suggestion. It doesn't look I'll get yesod installed without "paying" a bigger price than just "downgrading". :-/ Yesod 1.4.0 warns that forcing installing it will likely break pandoc, among other things. I can give it a try though, but I really use pandoc regularly. Plus, it's still not clear that the building process will not fail. And installing pandoc took me surprisingly a lot of time last time. Forcing Yesod-1.2.6.1 won't allow cabal to satisfy the dependencies. I guess I could keep trying other versions and see. But I think I'll try the 1.4.0 first. Will post here the results so that at least others may hopefully benefit from this. ----------------------------------------------------------------------------------------- msantos at MBP-2[15:42]:~/System$cabal install yesod-1.4.0 Resolving dependencies... In order, the following would be installed: monad-control-0.3.3.1 (latest: 1.0.0.4) (via: yesod-1.4.0 yesod-core-1.4.9.1 authenticate-1.3.2.11 xml-conduit-1.3.0 persistent-template-2.1.3.3 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 conduit-extra-1.1.9 resourcet-1.1.5 resource-pool-0.2.3.2 enclosed-exceptions-1.0.1.1 lifted-base-0.2.3.6) (new version) lifted-base-0.2.3.6 (via: yesod-auth-1.4.5 yesod-core-1.4.9.1 wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 conduit-1.2.4.2 resourcet-1.1.5 enclosed-exceptions-1.0.1.1) (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) enclosed-exceptions-1.0.1.1 (via: yaml-0.8.11) (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) resource-pool-0.2.3.2 (via: yesod-persistent-1.4.0.2 persistent-2.1.6) (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) resourcet-1.1.5 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 yesod-persistent-1.4.0.2 yesod-core-1.4.9.1 yaml-0.8.11 authenticate-1.3.2.11 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 conduit-extra-1.1.9 conduit-1.2.4.2) (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) conduit-1.2.4.2 (via: yesod-auth-1.4.5 yesod-persistent-1.4.0.2 yesod-core-1.4.9.1 yaml-0.8.11 authenticate-1.3.2.11 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 conduit-extra-1.1.9) (reinstall) conduit-extra-1.1.9 (via: yesod-1.4.0 yesod-auth-1.4.5 yesod-core-1.4.9.1 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 monad-logger-0.3.13.1) (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) http-conduit-2.1.5 (via: yesod-auth-1.4.5 authenticate-1.3.2.11) (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) monad-logger-0.3.13.1 (via: yesod-1.4.0 yesod-core-1.4.9.1 persistent-template-2.1.3.3 persistent-2.1.6) (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) persistent-2.1.6 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 yesod-persistent-1.4.0.2 persistent-template-2.1.3.3) (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) persistent-template-2.1.3.3 (via: yesod-auth-1.4.5 yesod-persistent-1.4.0.2) (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) shakespeare-2.0.5 (via: yesod-1.4.0 yesod-auth-1.4.5 yesod-form-1.4.4.1 yesod-core-1.4.9.1) (new package) wai-extra-3.0.7.1 (via: yesod-1.4.0 yesod-core-1.4.9.1) (reinstall) xml-conduit-1.3.0 (via: authenticate-1.3.2.11 tagstream-conduit-0.5.5.3) (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) tagstream-conduit-0.5.5.3 (via: authenticate-1.3.2.11) (reinstall) authenticate-1.3.2.11 (via: yesod-auth-1.4.5) (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) yaml-0.8.11 (via: yesod-1.4.0) (reinstall) yesod-core-1.4.9.1 (via: yesod-1.4.0 yesod-auth-1.4.5 yesod-form-1.4.4.1 yesod-persistent-1.4.0.2) (new package) yesod-persistent-1.4.0.2 (via: yesod-1.4.0 yesod-auth-1.4.5 yesod-form-1.4.4.1) (new package) yesod-form-1.4.4.1 (via: yesod-1.4.0 yesod-auth-1.4.5) (new package) yesod-auth-1.4.5 (via: yesod-1.4.0) (new package) yesod-1.4.0 (latest: 1.4.1.5) (new package) cabal: The following packages are likely to be broken by the reinstalls: pandoc-citeproc-0.7.1.1 pandoc-1.14.0.4 project-template-0.2.0 http-reverse-proxy-0.4.2 Use --force-reinstalls if you want to install anyway. msantos at MBP-2[15:42]:~/System$cabal install yesod-1.2.6.1 Resolving dependencies... cabal: Could not resolve dependencies: next goal: yesod (user goal) rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, 1.4.0 (global constraint requires ==1.2.6.1) trying: yesod-1.2.6.1 trying: streaming-commons-0.1.12.1/installed-200... (dependency of yesod-1.2.6.1) trying: warp-3.0.13.1/installed-150... (dependency of yesod-1.2.6.1) next goal: yesod-form (dependency of yesod-1.2.6.1) rejecting: yesod-form-1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2.1, 1.4.2, 1.4.1.1, 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => yesod-form>=1.3 && <1.4) trying: yesod-form-1.3.16 next goal: persistent (dependency of yesod-form-1.3.16) rejecting: persistent-2.1.6/installed-4f9..., 2.1.6, 2.1.5, 2.1.4, 2.1.3, 2.1.2, 2.1.1.7, 2.1.1.6, 2.1.1.5, 2.1.1.4, 2.1.1.3, 2.1.1.2, 2.1.1.1, 2.1.1, 2.1.0.2, 2.1.0.1, 2.1 (conflict: yesod-form => persistent>=1.2 && <2.1) trying: persistent-1.3.3 trying: path-pieces-0.2.0/installed-533... (dependency of persistent-1.3.3) next goal: yesod-core (dependency of yesod-1.2.6.1) rejecting: yesod-core-1.4.9.1, 1.4.9, 1.4.8.3, 1.4.8.2, 1.4.8.1, 1.4.8, 1.4.7.3, 1.4.7.2, 1.4.7.1, 1.4.7, 1.4.6.2, 1.4.6.1, 1.4.6, 1.4.5, 1.4.4.5, 1.4.4.4, 1.4.4.3, 1.4.4.2, 1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2, 1.4.1.1, 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => yesod-core>=1.2.2 && <1.3) rejecting: yesod-core-1.2.20.1, 1.2.20, 1.2.19.2, 1.2.19.1, 1.2.19, 1.2.18, 1.2.17, 1.2.16.1, 1.2.16, 1.2.15.2, 1.2.15.1, 1.2.15, 1.2.14, 1.2.13.1, 1.2.13, 1.2.12, 1.2.11.1, 1.2.11, 1.2.10, 1.2.9.2, 1.2.9.1, 1.2.9, 1.2.8, 1.2.7, 1.2.6.7, 1.2.6.6, 1.2.6.5, 1.2.6.4, 1.2.6.3, 1.2.6.2, 1.2.6.1 (conflict: path-pieces==0.2.0/installed-533..., yesod-core => path-pieces>=0.1.2 && <0.2) rejecting: yesod-core-1.2.6 (conflict: streaming-commons => text==1.1.0.0/installed-9bd..., yesod-core => text>=0.7 && <0.12) rejecting: yesod-core-1.2.5, 1.2.4.5, 1.2.4.4, 1.2.4.3, 1.2.4.2, 1.2.4.1, 1.2.4, 1.2.3, 1.2.2 (conflict: warp => wai==3.0.2.3/installed-39c..., yesod-core => wai>=1.4 && <1.5) rejecting: yesod-core-1.2.1, 1.2.0.4, 1.2.0.3, 1.2.0.2, 1.2.0.1, 1.2.0, 1.1.8.3, 1.1.8.2, 1.1.8.1, 1.1.8, 1.1.7.2, 1.1.7.1, 1.1.7, 1.1.6.1, 1.1.6, 1.1.5, 1.1.4.2, 1.1.4.1, 1.1.4, 1.1.3.1, 1.1.3, 1.1.2.2, 1.1.2.1, 1.1.2, 1.1.1.2, 1.1.1.1, 1.1.1, 1.1.0.1, 1.1.0, 1.0.1.3, 1.0.1.2, 1.0.1.1, 1.0.1, 1.0.0.2, 1.0.0.1, 1.0.0, 0.10.3, 0.10.2.2, 0.10.2.1, 0.10.2, 0.10.1, 0.9.4.1, 0.9.4, 0.9.3.6, 0.9.3.5, 0.9.3.4, 0.9.3.3, 0.9.3.2, 0.9.3.1, 0.9.3, 0.9.2, 0.9.1.1, 0.9.1, 0.8.3.2, 0.8.3.1, 0.8.3, 0.8.2, 0.8.1, 0.8.0.1, 0.8.0, 0.7.0.2, 0.7.0.1, 0.7.0 (conflict: yesod => yesod-core>=1.2.2 && <1.3) Backjump limit reached (change with --max-backjumps). -- Public key ID: E8FE60D7 Public key server: see, e.g., hkp://keys.gnupg.net On Thu, Jun 18, 2015 at 3:32 PM, Christopher Allen wrote: > Ah that's frustrating, that's my mistake ? I'm sorry. I thought you were > talking about GHC for Mac OS X not being available for your OS version > either. > > Your best bet on HP is to specify an older version of Yesod that will work > with the dependencies that your version of HP comes with. > > On Thu, Jun 18, 2015 at 2:08 PM, Miguel A. Santos < > miguel.a.santos.l at gmail.com> wrote: > >> Indeed I saw that. That's what I meant with the bindist not being >> available for OSX 10.6.8; only for 10.7+ >> https://www.haskell.org/ghc/download_ghc_7_8_4#macosx_x86_64 >> My bad, I should have said it before. >> >> >> >> -- >> Public key ID: E8FE60D7 >> Public key server: see, e.g., hkp://keys.gnupg.net >> >> On Thu, Jun 18, 2015 at 2:36 PM, Christopher Allen >> wrote: >> >>> Did you see that the Mac instructions said to follow the "other *nix" >>> instructions if you were using an older version of Mac OS X? >>> >>> Those link here: https://www.haskell.org/ghc/download_ghc_7_8_4#binaries >>> >>> Get rid of all that (GHC, HP, Cabal), then install GHC using the bindist >>> for Mac OS X linked above. >>> >>> On Thu, Jun 18, 2015 at 1:14 PM, Miguel A. Santos < >>> miguel.a.santos.l at gmail.com> wrote: >>> >>>> That is obviously a typo: I meant I *did* do a fresh install of the >>>> Haskell Platform and cabal before >>>> trying -and failing- to install yesod. >>>> >>>> On Thu, Jun 18, 2015 at 1:38 PM, Miguel A. Santos < >>>> miguel.a.santos.l at gmail.com> wrote: >>>> >>>>> This corresponds to a fresh install of the HP, ghc, and cabal I didn't >>>>> before trying to install yesod. >>>>> >>>> >>>> >>>> -- >>>> Public key ID: E8FE60D7 >>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>> >>>> _______________________________________________ >>>> Haskell-Cafe mailing list >>>> Haskell-Cafe at haskell.org >>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>> >>>> >>> >>> >>> -- >>> Chris Allen >>> Currently working on http://haskellbook.com >>> >> >> > > > -- > Chris Allen > Currently working on http://haskellbook.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cma at bitemyapp.com Thu Jun 18 20:16:45 2015 From: cma at bitemyapp.com (Christopher Allen) Date: Thu, 18 Jun 2015 15:16:45 -0500 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: Some of that looks like churn from trying to install an older version of Yesod over a newer one. Are you using a sandbox? if so, did you wipe it out before attempting Yesod 1.2.6.1? What we'd be looking for is a package conflict that tells you which package of what version that is globally installed is causing the conflict. Insta-Yesodian conflict implies you're reinstalling into a not-fresh packgage-db which means you either need to wipe your user package-db or use a sandbox. (I recommend the latter). If you haven't done so, do that, then re-attempt that version of Yesod (1.2.6.1). On Thu, Jun 18, 2015 at 2:57 PM, Miguel A. Santos < miguel.a.santos.l at gmail.com> wrote: > Thanks! No problem. I gave a try to your suggestion. It doesn't look I'll > get yesod installed without "paying" > a bigger price than just "downgrading". :-/ > > Yesod 1.4.0 warns that forcing installing it will likely break pandoc, > among other things. > I can give it a try though, but I really use pandoc regularly. Plus, it's > still not clear that the building process > will not fail. And installing pandoc took me surprisingly a lot of time > last time. > > Forcing Yesod-1.2.6.1 won't allow cabal to satisfy the dependencies. > > I guess I could keep trying other versions and see. But I think I'll try > the 1.4.0 first. Will post here > the results so that at least others may hopefully benefit from this. > > > ----------------------------------------------------------------------------------------- > msantos at MBP-2[15:42]:~/System$cabal install yesod-1.4.0 > Resolving dependencies... > In order, the following would be installed: > monad-control-0.3.3.1 (latest: 1.0.0.4) (via: yesod-1.4.0 > yesod-core-1.4.9.1 authenticate-1.3.2.11 xml-conduit-1.3.0 > persistent-template-2.1.3.3 persistent-2.1.6 monad-logger-0.3.13.1 > http-conduit-2.1.5 conduit-extra-1.1.9 resourcet-1.1.5 > resource-pool-0.2.3.2 enclosed-exceptions-1.0.1.1 lifted-base-0.2.3.6) (new > version) > lifted-base-0.2.3.6 (via: yesod-auth-1.4.5 yesod-core-1.4.9.1 > wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 > conduit-1.2.4.2 resourcet-1.1.5 enclosed-exceptions-1.0.1.1) (reinstall) > (changes: monad-control-1.0.0.4 -> 0.3.3.1) > enclosed-exceptions-1.0.1.1 (via: yaml-0.8.11) (reinstall) (changes: > monad-control-1.0.0.4 -> 0.3.3.1) > resource-pool-0.2.3.2 (via: yesod-persistent-1.4.0.2 persistent-2.1.6) > (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) > resourcet-1.1.5 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 > yesod-persistent-1.4.0.2 yesod-core-1.4.9.1 yaml-0.8.11 > authenticate-1.3.2.11 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 > wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 > conduit-extra-1.1.9 conduit-1.2.4.2) (reinstall) (changes: > monad-control-1.0.0.4 -> 0.3.3.1) > conduit-1.2.4.2 (via: yesod-auth-1.4.5 yesod-persistent-1.4.0.2 > yesod-core-1.4.9.1 yaml-0.8.11 authenticate-1.3.2.11 > tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 persistent-2.1.6 > monad-logger-0.3.13.1 http-conduit-2.1.5 conduit-extra-1.1.9) (reinstall) > conduit-extra-1.1.9 (via: yesod-1.4.0 yesod-auth-1.4.5 yesod-core-1.4.9.1 > tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 monad-logger-0.3.13.1) > (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) > http-conduit-2.1.5 (via: yesod-auth-1.4.5 authenticate-1.3.2.11) > (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) > monad-logger-0.3.13.1 (via: yesod-1.4.0 yesod-core-1.4.9.1 > persistent-template-2.1.3.3 persistent-2.1.6) (reinstall) (changes: > monad-control-1.0.0.4 -> 0.3.3.1) > persistent-2.1.6 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 > yesod-persistent-1.4.0.2 persistent-template-2.1.3.3) (reinstall) (changes: > monad-control-1.0.0.4 -> 0.3.3.1) > persistent-template-2.1.3.3 (via: yesod-auth-1.4.5 > yesod-persistent-1.4.0.2) (reinstall) (changes: monad-control-1.0.0.4 -> > 0.3.3.1) > shakespeare-2.0.5 (via: yesod-1.4.0 yesod-auth-1.4.5 yesod-form-1.4.4.1 > yesod-core-1.4.9.1) (new package) > wai-extra-3.0.7.1 (via: yesod-1.4.0 yesod-core-1.4.9.1) (reinstall) > xml-conduit-1.3.0 (via: authenticate-1.3.2.11 tagstream-conduit-0.5.5.3) > (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) > tagstream-conduit-0.5.5.3 (via: authenticate-1.3.2.11) (reinstall) > authenticate-1.3.2.11 (via: yesod-auth-1.4.5) (reinstall) (changes: > monad-control-1.0.0.4 -> 0.3.3.1) > yaml-0.8.11 (via: yesod-1.4.0) (reinstall) > yesod-core-1.4.9.1 (via: yesod-1.4.0 yesod-auth-1.4.5 yesod-form-1.4.4.1 > yesod-persistent-1.4.0.2) (new package) > yesod-persistent-1.4.0.2 (via: yesod-1.4.0 yesod-auth-1.4.5 > yesod-form-1.4.4.1) (new package) > yesod-form-1.4.4.1 (via: yesod-1.4.0 yesod-auth-1.4.5) (new package) > yesod-auth-1.4.5 (via: yesod-1.4.0) (new package) > yesod-1.4.0 (latest: 1.4.1.5) (new package) > cabal: The following packages are likely to be broken by the reinstalls: > pandoc-citeproc-0.7.1.1 > pandoc-1.14.0.4 > project-template-0.2.0 > http-reverse-proxy-0.4.2 > Use --force-reinstalls if you want to install anyway. > msantos at MBP-2[15:42]:~/System$cabal install yesod-1.2.6.1 > Resolving dependencies... > cabal: Could not resolve dependencies: > next goal: yesod (user goal) > rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, 1.4.0 > (global constraint requires ==1.2.6.1) > trying: yesod-1.2.6.1 > trying: streaming-commons-0.1.12.1/installed-200... (dependency of > yesod-1.2.6.1) > trying: warp-3.0.13.1/installed-150... (dependency of yesod-1.2.6.1) > next goal: yesod-form (dependency of yesod-1.2.6.1) > rejecting: yesod-form-1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2.1, 1.4.2, > 1.4.1.1, > 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => yesod-form>=1.3 && <1.4) > trying: yesod-form-1.3.16 > next goal: persistent (dependency of yesod-form-1.3.16) > rejecting: persistent-2.1.6/installed-4f9..., 2.1.6, 2.1.5, 2.1.4, 2.1.3, > 2.1.2, 2.1.1.7, 2.1.1.6, 2.1.1.5, 2.1.1.4, 2.1.1.3, 2.1.1.2, 2.1.1.1, > 2.1.1, > 2.1.0.2, 2.1.0.1, 2.1 (conflict: yesod-form => persistent>=1.2 && <2.1) > trying: persistent-1.3.3 > trying: path-pieces-0.2.0/installed-533... (dependency of persistent-1.3.3) > next goal: yesod-core (dependency of yesod-1.2.6.1) > rejecting: yesod-core-1.4.9.1, 1.4.9, 1.4.8.3, 1.4.8.2, 1.4.8.1, 1.4.8, > 1.4.7.3, 1.4.7.2, 1.4.7.1, 1.4.7, 1.4.6.2, 1.4.6.1, 1.4.6, 1.4.5, 1.4.4.5, > 1.4.4.4, 1.4.4.3, 1.4.4.2, 1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2, 1.4.1.1, > 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => yesod-core>=1.2.2 && > <1.3) > rejecting: yesod-core-1.2.20.1, 1.2.20, 1.2.19.2, 1.2.19.1, 1.2.19, 1.2.18, > 1.2.17, 1.2.16.1, 1.2.16, 1.2.15.2, 1.2.15.1, 1.2.15, 1.2.14, 1.2.13.1, > 1.2.13, 1.2.12, 1.2.11.1, 1.2.11, 1.2.10, 1.2.9.2, 1.2.9.1, 1.2.9, 1.2.8, > 1.2.7, 1.2.6.7, 1.2.6.6, 1.2.6.5, 1.2.6.4, 1.2.6.3, 1.2.6.2, 1.2.6.1 > (conflict: path-pieces==0.2.0/installed-533..., yesod-core => > path-pieces>=0.1.2 && <0.2) > rejecting: yesod-core-1.2.6 (conflict: streaming-commons => > text==1.1.0.0/installed-9bd..., yesod-core => text>=0.7 && <0.12) > rejecting: yesod-core-1.2.5, 1.2.4.5, 1.2.4.4, 1.2.4.3, 1.2.4.2, 1.2.4.1, > 1.2.4, 1.2.3, 1.2.2 (conflict: warp => wai==3.0.2.3/installed-39c..., > yesod-core => wai>=1.4 && <1.5) > rejecting: yesod-core-1.2.1, 1.2.0.4, 1.2.0.3, 1.2.0.2, 1.2.0.1, 1.2.0, > 1.1.8.3, 1.1.8.2, 1.1.8.1, 1.1.8, 1.1.7.2, 1.1.7.1, 1.1.7, 1.1.6.1, 1.1.6, > 1.1.5, 1.1.4.2, 1.1.4.1, 1.1.4, 1.1.3.1, 1.1.3, 1.1.2.2, 1.1.2.1, 1.1.2, > 1.1.1.2, 1.1.1.1, 1.1.1, 1.1.0.1, 1.1.0, 1.0.1.3, 1.0.1.2, 1.0.1.1, 1.0.1, > 1.0.0.2, 1.0.0.1, 1.0.0, 0.10.3, 0.10.2.2, 0.10.2.1, 0.10.2, 0.10.1, > 0.9.4.1, > 0.9.4, 0.9.3.6, 0.9.3.5, 0.9.3.4, 0.9.3.3, 0.9.3.2, 0.9.3.1, 0.9.3, 0.9.2, > 0.9.1.1, 0.9.1, 0.8.3.2, 0.8.3.1, 0.8.3, 0.8.2, 0.8.1, 0.8.0.1, 0.8.0, > 0.7.0.2, 0.7.0.1, 0.7.0 (conflict: yesod => yesod-core>=1.2.2 && <1.3) > Backjump limit reached (change with --max-backjumps). > > -- > Public key ID: E8FE60D7 > Public key server: see, e.g., hkp://keys.gnupg.net > > On Thu, Jun 18, 2015 at 3:32 PM, Christopher Allen > wrote: > >> Ah that's frustrating, that's my mistake ? I'm sorry. I thought you were >> talking about GHC for Mac OS X not being available for your OS version >> either. >> >> Your best bet on HP is to specify an older version of Yesod that will >> work with the dependencies that your version of HP comes with. >> >> On Thu, Jun 18, 2015 at 2:08 PM, Miguel A. Santos < >> miguel.a.santos.l at gmail.com> wrote: >> >>> Indeed I saw that. That's what I meant with the bindist not being >>> available for OSX 10.6.8; only for 10.7+ >>> https://www.haskell.org/ghc/download_ghc_7_8_4#macosx_x86_64 >>> My bad, I should have said it before. >>> >>> >>> >>> -- >>> Public key ID: E8FE60D7 >>> Public key server: see, e.g., hkp://keys.gnupg.net >>> >>> On Thu, Jun 18, 2015 at 2:36 PM, Christopher Allen >>> wrote: >>> >>>> Did you see that the Mac instructions said to follow the "other *nix" >>>> instructions if you were using an older version of Mac OS X? >>>> >>>> Those link here: >>>> https://www.haskell.org/ghc/download_ghc_7_8_4#binaries >>>> >>>> Get rid of all that (GHC, HP, Cabal), then install GHC using the >>>> bindist for Mac OS X linked above. >>>> >>>> On Thu, Jun 18, 2015 at 1:14 PM, Miguel A. Santos < >>>> miguel.a.santos.l at gmail.com> wrote: >>>> >>>>> That is obviously a typo: I meant I *did* do a fresh install of the >>>>> Haskell Platform and cabal before >>>>> trying -and failing- to install yesod. >>>>> >>>>> On Thu, Jun 18, 2015 at 1:38 PM, Miguel A. Santos < >>>>> miguel.a.santos.l at gmail.com> wrote: >>>>> >>>>>> This corresponds to a fresh install of the HP, ghc, and cabal I >>>>>> didn't before trying to install yesod. >>>>>> >>>>> >>>>> >>>>> -- >>>>> Public key ID: E8FE60D7 >>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>> >>>>> _______________________________________________ >>>>> Haskell-Cafe mailing list >>>>> Haskell-Cafe at haskell.org >>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>>> >>>>> >>>> >>>> >>>> -- >>>> Chris Allen >>>> Currently working on http://haskellbook.com >>>> >>> >>> >> >> >> -- >> Chris Allen >> Currently working on http://haskellbook.com >> > > -- Chris Allen Currently working on http://haskellbook.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From miguel.a.santos.l at gmail.com Thu Jun 18 20:28:25 2015 From: miguel.a.santos.l at gmail.com (Miguel A. Santos) Date: Thu, 18 Jun 2015 16:28:25 -0400 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: I haven't yet read how to use sandboxes, so, no, that I tried just like that cabal install... I did check first that cabal info yesod was saying I didn't have it install. But now that you mention it, I did may have had other packages lingering around from my last attempt of installing yesod. Meanwhile I did run forcing the install of 1.4.0... Ah, it finished with cabal install --force-reinstalls yesod-1.4.0 and... it complains about the shakespeare. "shakespeare-2.0.5 failed during the building phase. The exception was: ExitFailure 1" Below the full output. I'll give a try to the sandbox solution. ------------------------------------------------ msantos at MBP-2[16:09]:~/System/YESOD$cabal install --force-reinstalls yesod-1.4.0 Resolving dependencies... Warning: The following packages are likely to be broken by the reinstalls: pandoc-citeproc-0.7.1.1 pandoc-1.14.0.4 project-template-0.2.0 http-reverse-proxy-0.4.2 Continuing even though the plan contains dangerous reinstalls. Downloading monad-control-0.3.3.1... Configuring shakespeare-2.0.5... Configuring monad-control-0.3.3.1... Building monad-control-0.3.3.1... Building shakespeare-2.0.5... Installed monad-control-0.3.3.1 Configuring lifted-base-0.2.3.6... Building lifted-base-0.2.3.6... Configuring resource-pool-0.2.3.2... Installed lifted-base-0.2.3.6 Building resource-pool-0.2.3.2... Installed resource-pool-0.2.3.2 Configuring enclosed-exceptions-1.0.1.1... Building enclosed-exceptions-1.0.1.1... Configuring resourcet-1.1.5... Installed enclosed-exceptions-1.0.1.1 Building resourcet-1.1.5... Failed to install shakespeare-2.0.5 Build log ( /Users/msantos/.cabal/logs/shakespeare-2.0.5.log ): Configuring shakespeare-2.0.5... Building shakespeare-2.0.5... Preprocessing library shakespeare-2.0.5... [ 1 of 17] Compiling Text.MkSizeType ( Text/MkSizeType.hs, dist/build/Text/MkSizeType.o ) [ 2 of 17] Compiling Text.IndentToBrace ( Text/IndentToBrace.hs, dist/build/Text/IndentToBrace.o ) [ 3 of 17] Compiling Text.Shakespeare.Base ( Text/Shakespeare/Base.hs, dist/build/Text/Shakespeare/Base.o ) [ 4 of 17] Compiling Text.Hamlet.Parse ( Text/Hamlet/Parse.hs, dist/build/Text/Hamlet/Parse.o ) [ 5 of 17] Compiling Text.Hamlet ( Text/Hamlet.hs, dist/build/Text/Hamlet.o ) Text/Hamlet.hs:402:1: Warning: Defined but not used: ?varName? Text/Hamlet.hs:406:1: Warning: Defined but not used: ?strToExp? Text/Hamlet.hs:439:16: Warning: Defined but not used: ?html? Text/Hamlet.hs:440:14: Warning: Defined but not used: ?url? Text/Hamlet.hs:441:19: Warning: Defined but not used: ?url? Text/Hamlet.hs:442:16: Warning: Defined but not used: ?url? Text/Hamlet.hs:443:20: Warning: Defined but not used: ?msg_url? Text/Hamlet.hs:444:14: Warning: Defined but not used: ?msg? Text/Hamlet.hs:488:43: Warning: This binding for ?c? shadows the existing binding bound at Text/Hamlet.hs:484:13 [ 6 of 17] Compiling Text.Hamlet.RT ( Text/Hamlet/RT.hs, dist/build/Text/Hamlet/RT.o ) Text/Hamlet/RT.hs:78:13: Warning: Defined but not used: ?x? Text/Hamlet/RT.hs:78:26: Warning: Defined but not used: ?deref? Text/Hamlet/RT.hs:78:45: Warning: Defined but not used: ?docs? Text/Hamlet/RT.hs:85:13: Warning: Defined but not used: ?x? Text/Hamlet/RT.hs:85:25: Warning: Defined but not used: ?deref? Text/Hamlet/RT.hs:85:44: Warning: Defined but not used: ?jdocs? Text/Hamlet/RT.hs:85:50: Warning: Defined but not used: ?ndocs? Text/Hamlet/RT.hs:115:37: Warning: This binding for ?x? shadows the existing binding bound at Text/Hamlet/RT.hs:108:13 [ 7 of 17] Compiling Text.Shakespeare ( Text/Shakespeare.hs, dist/build/Text/Shakespeare.o ) [ 8 of 17] Compiling Text.Shakespeare.Text ( Text/Shakespeare/Text.hs, dist/build/Text/Shakespeare/Text.o ) [ 9 of 17] Compiling Text.Julius ( Text/Julius.hs, dist/build/Text/Julius.o ) Text/Julius.hs:90:63: Warning: In the use of ?fromValue? (imported from Data.Aeson.Encode): Deprecated: "Use 'encodeToTextBuilder' instead" [10 of 17] Compiling Text.Roy ( Text/Roy.hs, dist/build/Text/Roy.o ) [11 of 17] Compiling Text.Coffee ( Text/Coffee.hs, dist/build/Text/Coffee.o ) [12 of 17] Compiling Text.Css ( Text/Css.hs, dist/build/Text/Css.o ) Text/Css.hs:349:40: Warning: Defined but not used: ?subblocks? Text/Css.hs:367:5: Warning: Defined but not used: ?subGo? [13 of 17] Compiling Text.CssCommon ( Text/CssCommon.hs, dist/build/Text/CssCommon.o ) Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Loading package array-0.5.0.0 ... linking ... done. Loading package deepseq-1.3.0.2 ... linking ... done. Loading package filepath-1.3.0.2 ... linking ... done. Loading package old-locale-1.0.0.6 ... linking ... done. Loading package time-1.4.2 ... linking ... done. Loading package bytestring-0.10.4.0 ... linking ... done. Loading package unix-2.7.0.1 ... linking ... done. Loading package directory-1.2.1.0 ... linking ... done. Loading package process-1.2.0.0 ... linking ... done. Loading package transformers-0.3.0.0 ... linking ... done. Loading package mtl-2.1.3.1 ... linking ... done. Loading package text-1.1.0.0 ... linking ... done. Loading package parsec-3.1.5 ... : can't load .so/.DLL for: /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib (dlopen(/Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib, 9): Library not loaded: @rpath/libHStext-1.1.0.0-ghc7.8.3.dylib Referenced from: /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib Reason: image not found) Installed resourcet-1.1.5 Configuring wai-extra-3.0.7.1... Configuring conduit-1.2.4.2... Building conduit-1.2.4.2... Building wai-extra-3.0.7.1... Installed conduit-1.2.4.2 Configuring conduit-extra-1.1.9... Building conduit-extra-1.1.9... Configuring http-conduit-2.1.5... Installed wai-extra-3.0.7.1 Building http-conduit-2.1.5... Configuring yaml-0.8.11... Installed http-conduit-2.1.5 Building yaml-0.8.11... Installed conduit-extra-1.1.9 Configuring monad-logger-0.3.13.1... Building monad-logger-0.3.13.1... Configuring xml-conduit-1.3.0... Installed monad-logger-0.3.13.1 Building xml-conduit-1.3.0... Installed yaml-0.8.11 Configuring persistent-2.1.6... Building persistent-2.1.6... Installed xml-conduit-1.3.0 Configuring tagstream-conduit-0.5.5.3... Building tagstream-conduit-0.5.5.3... Installed tagstream-conduit-0.5.5.3 Configuring authenticate-1.3.2.11... Building authenticate-1.3.2.11... Installed authenticate-1.3.2.11 Installed persistent-2.1.6 Configuring persistent-template-2.1.3.3... Building persistent-template-2.1.3.3... Installed persistent-template-2.1.3.3 Updating documentation index /Users/msantos/Library/Haskell/share/doc/x86_64-osx-ghc-7.8.3/index.html cabal: Error: some packages failed to install: shakespeare-2.0.5 failed during the building phase. The exception was: ExitFailure 1 yesod-1.4.0 depends on shakespeare-2.0.5 which failed to install. yesod-auth-1.4.5 depends on shakespeare-2.0.5 which failed to install. yesod-core-1.4.9.1 depends on shakespeare-2.0.5 which failed to install. yesod-form-1.4.4.1 depends on shakespeare-2.0.5 which failed to install. yesod-persistent-1.4.0.2 depends on shakespeare-2.0.5 which failed to install. -- Public key ID: E8FE60D7 Public key server: see, e.g., hkp://keys.gnupg.net On Thu, Jun 18, 2015 at 4:16 PM, Christopher Allen wrote: > Some of that looks like churn from trying to install an older version of > Yesod over a newer one. Are you using a sandbox? if so, did you wipe it out > before attempting Yesod 1.2.6.1? What we'd be looking for is a package > conflict that tells you which package of what version that is globally > installed is causing the conflict. > > Insta-Yesodian conflict implies you're reinstalling into a not-fresh > packgage-db which means you either need to wipe your user package-db or use > a sandbox. (I recommend the latter). > > If you haven't done so, do that, then re-attempt that version of Yesod > (1.2.6.1). > > > > On Thu, Jun 18, 2015 at 2:57 PM, Miguel A. Santos < > miguel.a.santos.l at gmail.com> wrote: > >> Thanks! No problem. I gave a try to your suggestion. It doesn't look I'll >> get yesod installed without "paying" >> a bigger price than just "downgrading". :-/ >> >> Yesod 1.4.0 warns that forcing installing it will likely break pandoc, >> among other things. >> I can give it a try though, but I really use pandoc regularly. Plus, it's >> still not clear that the building process >> will not fail. And installing pandoc took me surprisingly a lot of time >> last time. >> >> Forcing Yesod-1.2.6.1 won't allow cabal to satisfy the dependencies. >> >> I guess I could keep trying other versions and see. But I think I'll try >> the 1.4.0 first. Will post here >> the results so that at least others may hopefully benefit from this. >> >> >> ----------------------------------------------------------------------------------------- >> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.4.0 >> Resolving dependencies... >> In order, the following would be installed: >> monad-control-0.3.3.1 (latest: 1.0.0.4) (via: yesod-1.4.0 >> yesod-core-1.4.9.1 authenticate-1.3.2.11 xml-conduit-1.3.0 >> persistent-template-2.1.3.3 persistent-2.1.6 monad-logger-0.3.13.1 >> http-conduit-2.1.5 conduit-extra-1.1.9 resourcet-1.1.5 >> resource-pool-0.2.3.2 enclosed-exceptions-1.0.1.1 lifted-base-0.2.3.6) (new >> version) >> lifted-base-0.2.3.6 (via: yesod-auth-1.4.5 yesod-core-1.4.9.1 >> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 >> conduit-1.2.4.2 resourcet-1.1.5 enclosed-exceptions-1.0.1.1) (reinstall) >> (changes: monad-control-1.0.0.4 -> 0.3.3.1) >> enclosed-exceptions-1.0.1.1 (via: yaml-0.8.11) (reinstall) (changes: >> monad-control-1.0.0.4 -> 0.3.3.1) >> resource-pool-0.2.3.2 (via: yesod-persistent-1.4.0.2 persistent-2.1.6) >> (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >> resourcet-1.1.5 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 >> yesod-persistent-1.4.0.2 yesod-core-1.4.9.1 yaml-0.8.11 >> authenticate-1.3.2.11 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 >> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 >> conduit-extra-1.1.9 conduit-1.2.4.2) (reinstall) (changes: >> monad-control-1.0.0.4 -> 0.3.3.1) >> conduit-1.2.4.2 (via: yesod-auth-1.4.5 yesod-persistent-1.4.0.2 >> yesod-core-1.4.9.1 yaml-0.8.11 authenticate-1.3.2.11 >> tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 persistent-2.1.6 >> monad-logger-0.3.13.1 http-conduit-2.1.5 conduit-extra-1.1.9) (reinstall) >> conduit-extra-1.1.9 (via: yesod-1.4.0 yesod-auth-1.4.5 yesod-core-1.4.9.1 >> tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 monad-logger-0.3.13.1) >> (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >> http-conduit-2.1.5 (via: yesod-auth-1.4.5 authenticate-1.3.2.11) >> (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >> monad-logger-0.3.13.1 (via: yesod-1.4.0 yesod-core-1.4.9.1 >> persistent-template-2.1.3.3 persistent-2.1.6) (reinstall) (changes: >> monad-control-1.0.0.4 -> 0.3.3.1) >> persistent-2.1.6 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 >> yesod-persistent-1.4.0.2 persistent-template-2.1.3.3) (reinstall) (changes: >> monad-control-1.0.0.4 -> 0.3.3.1) >> persistent-template-2.1.3.3 (via: yesod-auth-1.4.5 >> yesod-persistent-1.4.0.2) (reinstall) (changes: monad-control-1.0.0.4 -> >> 0.3.3.1) >> shakespeare-2.0.5 (via: yesod-1.4.0 yesod-auth-1.4.5 yesod-form-1.4.4.1 >> yesod-core-1.4.9.1) (new package) >> wai-extra-3.0.7.1 (via: yesod-1.4.0 yesod-core-1.4.9.1) (reinstall) >> xml-conduit-1.3.0 (via: authenticate-1.3.2.11 tagstream-conduit-0.5.5.3) >> (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >> tagstream-conduit-0.5.5.3 (via: authenticate-1.3.2.11) (reinstall) >> authenticate-1.3.2.11 (via: yesod-auth-1.4.5) (reinstall) (changes: >> monad-control-1.0.0.4 -> 0.3.3.1) >> yaml-0.8.11 (via: yesod-1.4.0) (reinstall) >> yesod-core-1.4.9.1 (via: yesod-1.4.0 yesod-auth-1.4.5 yesod-form-1.4.4.1 >> yesod-persistent-1.4.0.2) (new package) >> yesod-persistent-1.4.0.2 (via: yesod-1.4.0 yesod-auth-1.4.5 >> yesod-form-1.4.4.1) (new package) >> yesod-form-1.4.4.1 (via: yesod-1.4.0 yesod-auth-1.4.5) (new package) >> yesod-auth-1.4.5 (via: yesod-1.4.0) (new package) >> yesod-1.4.0 (latest: 1.4.1.5) (new package) >> cabal: The following packages are likely to be broken by the reinstalls: >> pandoc-citeproc-0.7.1.1 >> pandoc-1.14.0.4 >> project-template-0.2.0 >> http-reverse-proxy-0.4.2 >> Use --force-reinstalls if you want to install anyway. >> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.2.6.1 >> Resolving dependencies... >> cabal: Could not resolve dependencies: >> next goal: yesod (user goal) >> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, 1.4.0 >> (global constraint requires ==1.2.6.1) >> trying: yesod-1.2.6.1 >> trying: streaming-commons-0.1.12.1/installed-200... (dependency of >> yesod-1.2.6.1) >> trying: warp-3.0.13.1/installed-150... (dependency of yesod-1.2.6.1) >> next goal: yesod-form (dependency of yesod-1.2.6.1) >> rejecting: yesod-form-1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2.1, 1.4.2, >> 1.4.1.1, >> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => yesod-form>=1.3 && >> <1.4) >> trying: yesod-form-1.3.16 >> next goal: persistent (dependency of yesod-form-1.3.16) >> rejecting: persistent-2.1.6/installed-4f9..., 2.1.6, 2.1.5, 2.1.4, 2.1.3, >> 2.1.2, 2.1.1.7, 2.1.1.6, 2.1.1.5, 2.1.1.4, 2.1.1.3, 2.1.1.2, 2.1.1.1, >> 2.1.1, >> 2.1.0.2, 2.1.0.1, 2.1 (conflict: yesod-form => persistent>=1.2 && <2.1) >> trying: persistent-1.3.3 >> trying: path-pieces-0.2.0/installed-533... (dependency of >> persistent-1.3.3) >> next goal: yesod-core (dependency of yesod-1.2.6.1) >> rejecting: yesod-core-1.4.9.1, 1.4.9, 1.4.8.3, 1.4.8.2, 1.4.8.1, 1.4.8, >> 1.4.7.3, 1.4.7.2, 1.4.7.1, 1.4.7, 1.4.6.2, 1.4.6.1, 1.4.6, 1.4.5, 1.4.4.5, >> 1.4.4.4, 1.4.4.3, 1.4.4.2, 1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2, 1.4.1.1, >> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => yesod-core>=1.2.2 && >> <1.3) >> rejecting: yesod-core-1.2.20.1, 1.2.20, 1.2.19.2, 1.2.19.1, 1.2.19, >> 1.2.18, >> 1.2.17, 1.2.16.1, 1.2.16, 1.2.15.2, 1.2.15.1, 1.2.15, 1.2.14, 1.2.13.1, >> 1.2.13, 1.2.12, 1.2.11.1, 1.2.11, 1.2.10, 1.2.9.2, 1.2.9.1, 1.2.9, 1.2.8, >> 1.2.7, 1.2.6.7, 1.2.6.6, 1.2.6.5, 1.2.6.4, 1.2.6.3, 1.2.6.2, 1.2.6.1 >> (conflict: path-pieces==0.2.0/installed-533..., yesod-core => >> path-pieces>=0.1.2 && <0.2) >> rejecting: yesod-core-1.2.6 (conflict: streaming-commons => >> text==1.1.0.0/installed-9bd..., yesod-core => text>=0.7 && <0.12) >> rejecting: yesod-core-1.2.5, 1.2.4.5, 1.2.4.4, 1.2.4.3, 1.2.4.2, 1.2.4.1, >> 1.2.4, 1.2.3, 1.2.2 (conflict: warp => wai==3.0.2.3/installed-39c..., >> yesod-core => wai>=1.4 && <1.5) >> rejecting: yesod-core-1.2.1, 1.2.0.4, 1.2.0.3, 1.2.0.2, 1.2.0.1, 1.2.0, >> 1.1.8.3, 1.1.8.2, 1.1.8.1, 1.1.8, 1.1.7.2, 1.1.7.1, 1.1.7, 1.1.6.1, 1.1.6, >> 1.1.5, 1.1.4.2, 1.1.4.1, 1.1.4, 1.1.3.1, 1.1.3, 1.1.2.2, 1.1.2.1, 1.1.2, >> 1.1.1.2, 1.1.1.1, 1.1.1, 1.1.0.1, 1.1.0, 1.0.1.3, 1.0.1.2, 1.0.1.1, 1.0.1, >> 1.0.0.2, 1.0.0.1, 1.0.0, 0.10.3, 0.10.2.2, 0.10.2.1, 0.10.2, 0.10.1, >> 0.9.4.1, >> 0.9.4, 0.9.3.6, 0.9.3.5, 0.9.3.4, 0.9.3.3, 0.9.3.2, 0.9.3.1, 0.9.3, 0.9.2, >> 0.9.1.1, 0.9.1, 0.8.3.2, 0.8.3.1, 0.8.3, 0.8.2, 0.8.1, 0.8.0.1, 0.8.0, >> 0.7.0.2, 0.7.0.1, 0.7.0 (conflict: yesod => yesod-core>=1.2.2 && <1.3) >> Backjump limit reached (change with --max-backjumps). >> >> -- >> Public key ID: E8FE60D7 >> Public key server: see, e.g., hkp://keys.gnupg.net >> >> On Thu, Jun 18, 2015 at 3:32 PM, Christopher Allen >> wrote: >> >>> Ah that's frustrating, that's my mistake ? I'm sorry. I thought you were >>> talking about GHC for Mac OS X not being available for your OS version >>> either. >>> >>> Your best bet on HP is to specify an older version of Yesod that will >>> work with the dependencies that your version of HP comes with. >>> >>> On Thu, Jun 18, 2015 at 2:08 PM, Miguel A. Santos < >>> miguel.a.santos.l at gmail.com> wrote: >>> >>>> Indeed I saw that. That's what I meant with the bindist not being >>>> available for OSX 10.6.8; only for 10.7+ >>>> https://www.haskell.org/ghc/download_ghc_7_8_4#macosx_x86_64 >>>> My bad, I should have said it before. >>>> >>>> >>>> >>>> -- >>>> Public key ID: E8FE60D7 >>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>> >>>> On Thu, Jun 18, 2015 at 2:36 PM, Christopher Allen >>>> wrote: >>>> >>>>> Did you see that the Mac instructions said to follow the "other *nix" >>>>> instructions if you were using an older version of Mac OS X? >>>>> >>>>> Those link here: >>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#binaries >>>>> >>>>> Get rid of all that (GHC, HP, Cabal), then install GHC using the >>>>> bindist for Mac OS X linked above. >>>>> >>>>> On Thu, Jun 18, 2015 at 1:14 PM, Miguel A. Santos < >>>>> miguel.a.santos.l at gmail.com> wrote: >>>>> >>>>>> That is obviously a typo: I meant I *did* do a fresh install of the >>>>>> Haskell Platform and cabal before >>>>>> trying -and failing- to install yesod. >>>>>> >>>>>> On Thu, Jun 18, 2015 at 1:38 PM, Miguel A. Santos < >>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>> >>>>>>> This corresponds to a fresh install of the HP, ghc, and cabal I >>>>>>> didn't before trying to install yesod. >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Public key ID: E8FE60D7 >>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>> >>>>>> _______________________________________________ >>>>>> Haskell-Cafe mailing list >>>>>> Haskell-Cafe at haskell.org >>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Chris Allen >>>>> Currently working on http://haskellbook.com >>>>> >>>> >>>> >>> >>> >>> -- >>> Chris Allen >>> Currently working on http://haskellbook.com >>> >> >> > > > -- > Chris Allen > Currently working on http://haskellbook.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cma at bitemyapp.com Thu Jun 18 20:46:13 2015 From: cma at bitemyapp.com (Christopher Allen) Date: Thu, 18 Jun 2015 15:46:13 -0500 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: If you won't use a sandbox, then lets nuke your user package-db and start from scratch: rm -rf ~/.ghc cabal install yesod==1.2.6.1 On Thu, Jun 18, 2015 at 3:28 PM, Miguel A. Santos < miguel.a.santos.l at gmail.com> wrote: > I haven't yet read how to use sandboxes, so, no, that I tried just like > that cabal install... > I did check first that cabal info yesod was saying I didn't have it > install. But now that you mention it, I did > may have had other packages lingering around from my last attempt of > installing yesod. > > Meanwhile I did run forcing the install of 1.4.0... > Ah, it finished with cabal install --force-reinstalls yesod-1.4.0 and... > it complains about the shakespeare. > > "shakespeare-2.0.5 failed during the building phase. The exception was: > ExitFailure 1" > > Below the full output. > > I'll give a try to the sandbox solution. > > ------------------------------------------------ > msantos at MBP-2[16:09]:~/System/YESOD$cabal install --force-reinstalls > yesod-1.4.0 > Resolving dependencies... > Warning: The following packages are likely to be broken by the reinstalls: > pandoc-citeproc-0.7.1.1 > pandoc-1.14.0.4 > project-template-0.2.0 > http-reverse-proxy-0.4.2 > Continuing even though the plan contains dangerous reinstalls. > Downloading monad-control-0.3.3.1... > Configuring shakespeare-2.0.5... > Configuring monad-control-0.3.3.1... > Building monad-control-0.3.3.1... > Building shakespeare-2.0.5... > Installed monad-control-0.3.3.1 > Configuring lifted-base-0.2.3.6... > Building lifted-base-0.2.3.6... > Configuring resource-pool-0.2.3.2... > Installed lifted-base-0.2.3.6 > Building resource-pool-0.2.3.2... > Installed resource-pool-0.2.3.2 > Configuring enclosed-exceptions-1.0.1.1... > Building enclosed-exceptions-1.0.1.1... > Configuring resourcet-1.1.5... > Installed enclosed-exceptions-1.0.1.1 > Building resourcet-1.1.5... > Failed to install shakespeare-2.0.5 > Build log ( /Users/msantos/.cabal/logs/shakespeare-2.0.5.log ): > Configuring shakespeare-2.0.5... > Building shakespeare-2.0.5... > Preprocessing library shakespeare-2.0.5... > [ 1 of 17] Compiling Text.MkSizeType ( Text/MkSizeType.hs, > dist/build/Text/MkSizeType.o ) > [ 2 of 17] Compiling Text.IndentToBrace ( Text/IndentToBrace.hs, > dist/build/Text/IndentToBrace.o ) > [ 3 of 17] Compiling Text.Shakespeare.Base ( Text/Shakespeare/Base.hs, > dist/build/Text/Shakespeare/Base.o ) > [ 4 of 17] Compiling Text.Hamlet.Parse ( Text/Hamlet/Parse.hs, > dist/build/Text/Hamlet/Parse.o ) > [ 5 of 17] Compiling Text.Hamlet ( Text/Hamlet.hs, > dist/build/Text/Hamlet.o ) > > Text/Hamlet.hs:402:1: Warning: Defined but not used: ?varName? > > Text/Hamlet.hs:406:1: Warning: Defined but not used: ?strToExp? > > Text/Hamlet.hs:439:16: Warning: Defined but not used: ?html? > > Text/Hamlet.hs:440:14: Warning: Defined but not used: ?url? > > Text/Hamlet.hs:441:19: Warning: Defined but not used: ?url? > > Text/Hamlet.hs:442:16: Warning: Defined but not used: ?url? > > Text/Hamlet.hs:443:20: Warning: Defined but not used: ?msg_url? > > Text/Hamlet.hs:444:14: Warning: Defined but not used: ?msg? > > Text/Hamlet.hs:488:43: Warning: > This binding for ?c? shadows the existing binding > bound at Text/Hamlet.hs:484:13 > [ 6 of 17] Compiling Text.Hamlet.RT ( Text/Hamlet/RT.hs, > dist/build/Text/Hamlet/RT.o ) > > Text/Hamlet/RT.hs:78:13: Warning: Defined but not used: ?x? > > Text/Hamlet/RT.hs:78:26: Warning: Defined but not used: ?deref? > > Text/Hamlet/RT.hs:78:45: Warning: Defined but not used: ?docs? > > Text/Hamlet/RT.hs:85:13: Warning: Defined but not used: ?x? > > Text/Hamlet/RT.hs:85:25: Warning: Defined but not used: ?deref? > > Text/Hamlet/RT.hs:85:44: Warning: Defined but not used: ?jdocs? > > Text/Hamlet/RT.hs:85:50: Warning: Defined but not used: ?ndocs? > > Text/Hamlet/RT.hs:115:37: Warning: > This binding for ?x? shadows the existing binding > bound at Text/Hamlet/RT.hs:108:13 > [ 7 of 17] Compiling Text.Shakespeare ( Text/Shakespeare.hs, > dist/build/Text/Shakespeare.o ) > [ 8 of 17] Compiling Text.Shakespeare.Text ( Text/Shakespeare/Text.hs, > dist/build/Text/Shakespeare/Text.o ) > [ 9 of 17] Compiling Text.Julius ( Text/Julius.hs, > dist/build/Text/Julius.o ) > > Text/Julius.hs:90:63: Warning: > In the use of ?fromValue? (imported from Data.Aeson.Encode): > Deprecated: "Use 'encodeToTextBuilder' instead" > [10 of 17] Compiling Text.Roy ( Text/Roy.hs, dist/build/Text/Roy.o > ) > [11 of 17] Compiling Text.Coffee ( Text/Coffee.hs, > dist/build/Text/Coffee.o ) > [12 of 17] Compiling Text.Css ( Text/Css.hs, dist/build/Text/Css.o > ) > > Text/Css.hs:349:40: Warning: Defined but not used: ?subblocks? > > Text/Css.hs:367:5: Warning: Defined but not used: ?subGo? > [13 of 17] Compiling Text.CssCommon ( Text/CssCommon.hs, > dist/build/Text/CssCommon.o ) > Loading package ghc-prim ... linking ... done. > Loading package integer-gmp ... linking ... done. > Loading package base ... linking ... done. > Loading package array-0.5.0.0 ... linking ... done. > Loading package deepseq-1.3.0.2 ... linking ... done. > Loading package filepath-1.3.0.2 ... linking ... done. > Loading package old-locale-1.0.0.6 ... linking ... done. > Loading package time-1.4.2 ... linking ... done. > Loading package bytestring-0.10.4.0 ... linking ... done. > Loading package unix-2.7.0.1 ... linking ... done. > Loading package directory-1.2.1.0 ... linking ... done. > Loading package process-1.2.0.0 ... linking ... done. > Loading package transformers-0.3.0.0 ... linking ... done. > Loading package mtl-2.1.3.1 ... linking ... done. > Loading package text-1.1.0.0 ... linking ... done. > Loading package parsec-3.1.5 ... : can't load .so/.DLL for: > /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib > (dlopen(/Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib, > 9): Library not loaded: @rpath/libHStext-1.1.0.0-ghc7.8.3.dylib > Referenced from: > /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib > Reason: image not found) > Installed resourcet-1.1.5 > Configuring wai-extra-3.0.7.1... > Configuring conduit-1.2.4.2... > Building conduit-1.2.4.2... > Building wai-extra-3.0.7.1... > Installed conduit-1.2.4.2 > Configuring conduit-extra-1.1.9... > Building conduit-extra-1.1.9... > Configuring http-conduit-2.1.5... > Installed wai-extra-3.0.7.1 > Building http-conduit-2.1.5... > Configuring yaml-0.8.11... > Installed http-conduit-2.1.5 > Building yaml-0.8.11... > Installed conduit-extra-1.1.9 > Configuring monad-logger-0.3.13.1... > Building monad-logger-0.3.13.1... > Configuring xml-conduit-1.3.0... > Installed monad-logger-0.3.13.1 > Building xml-conduit-1.3.0... > Installed yaml-0.8.11 > Configuring persistent-2.1.6... > Building persistent-2.1.6... > Installed xml-conduit-1.3.0 > Configuring tagstream-conduit-0.5.5.3... > Building tagstream-conduit-0.5.5.3... > Installed tagstream-conduit-0.5.5.3 > Configuring authenticate-1.3.2.11... > Building authenticate-1.3.2.11... > Installed authenticate-1.3.2.11 > Installed persistent-2.1.6 > Configuring persistent-template-2.1.3.3... > Building persistent-template-2.1.3.3... > Installed persistent-template-2.1.3.3 > Updating documentation index > /Users/msantos/Library/Haskell/share/doc/x86_64-osx-ghc-7.8.3/index.html > cabal: Error: some packages failed to install: > shakespeare-2.0.5 failed during the building phase. The exception was: > ExitFailure 1 > yesod-1.4.0 depends on shakespeare-2.0.5 which failed to install. > yesod-auth-1.4.5 depends on shakespeare-2.0.5 which failed to install. > yesod-core-1.4.9.1 depends on shakespeare-2.0.5 which failed to install. > yesod-form-1.4.4.1 depends on shakespeare-2.0.5 which failed to install. > yesod-persistent-1.4.0.2 depends on shakespeare-2.0.5 which failed to > install. > > > -- > Public key ID: E8FE60D7 > Public key server: see, e.g., hkp://keys.gnupg.net > > On Thu, Jun 18, 2015 at 4:16 PM, Christopher Allen > wrote: > >> Some of that looks like churn from trying to install an older version of >> Yesod over a newer one. Are you using a sandbox? if so, did you wipe it out >> before attempting Yesod 1.2.6.1? What we'd be looking for is a package >> conflict that tells you which package of what version that is globally >> installed is causing the conflict. >> >> Insta-Yesodian conflict implies you're reinstalling into a not-fresh >> packgage-db which means you either need to wipe your user package-db or use >> a sandbox. (I recommend the latter). >> >> If you haven't done so, do that, then re-attempt that version of Yesod >> (1.2.6.1). >> >> >> >> On Thu, Jun 18, 2015 at 2:57 PM, Miguel A. Santos < >> miguel.a.santos.l at gmail.com> wrote: >> >>> Thanks! No problem. I gave a try to your suggestion. It doesn't look >>> I'll get yesod installed without "paying" >>> a bigger price than just "downgrading". :-/ >>> >>> Yesod 1.4.0 warns that forcing installing it will likely break pandoc, >>> among other things. >>> I can give it a try though, but I really use pandoc regularly. Plus, >>> it's still not clear that the building process >>> will not fail. And installing pandoc took me surprisingly a lot of time >>> last time. >>> >>> Forcing Yesod-1.2.6.1 won't allow cabal to satisfy the dependencies. >>> >>> I guess I could keep trying other versions and see. But I think I'll try >>> the 1.4.0 first. Will post here >>> the results so that at least others may hopefully benefit from this. >>> >>> >>> ----------------------------------------------------------------------------------------- >>> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.4.0 >>> Resolving dependencies... >>> In order, the following would be installed: >>> monad-control-0.3.3.1 (latest: 1.0.0.4) (via: yesod-1.4.0 >>> yesod-core-1.4.9.1 authenticate-1.3.2.11 xml-conduit-1.3.0 >>> persistent-template-2.1.3.3 persistent-2.1.6 monad-logger-0.3.13.1 >>> http-conduit-2.1.5 conduit-extra-1.1.9 resourcet-1.1.5 >>> resource-pool-0.2.3.2 enclosed-exceptions-1.0.1.1 lifted-base-0.2.3.6) (new >>> version) >>> lifted-base-0.2.3.6 (via: yesod-auth-1.4.5 yesod-core-1.4.9.1 >>> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 >>> conduit-1.2.4.2 resourcet-1.1.5 enclosed-exceptions-1.0.1.1) (reinstall) >>> (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>> enclosed-exceptions-1.0.1.1 (via: yaml-0.8.11) (reinstall) (changes: >>> monad-control-1.0.0.4 -> 0.3.3.1) >>> resource-pool-0.2.3.2 (via: yesod-persistent-1.4.0.2 persistent-2.1.6) >>> (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>> resourcet-1.1.5 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 >>> yesod-persistent-1.4.0.2 yesod-core-1.4.9.1 yaml-0.8.11 >>> authenticate-1.3.2.11 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 >>> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 >>> conduit-extra-1.1.9 conduit-1.2.4.2) (reinstall) (changes: >>> monad-control-1.0.0.4 -> 0.3.3.1) >>> conduit-1.2.4.2 (via: yesod-auth-1.4.5 yesod-persistent-1.4.0.2 >>> yesod-core-1.4.9.1 yaml-0.8.11 authenticate-1.3.2.11 >>> tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 persistent-2.1.6 >>> monad-logger-0.3.13.1 http-conduit-2.1.5 conduit-extra-1.1.9) (reinstall) >>> conduit-extra-1.1.9 (via: yesod-1.4.0 yesod-auth-1.4.5 >>> yesod-core-1.4.9.1 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 >>> monad-logger-0.3.13.1) (reinstall) (changes: monad-control-1.0.0.4 -> >>> 0.3.3.1) >>> http-conduit-2.1.5 (via: yesod-auth-1.4.5 authenticate-1.3.2.11) >>> (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>> monad-logger-0.3.13.1 (via: yesod-1.4.0 yesod-core-1.4.9.1 >>> persistent-template-2.1.3.3 persistent-2.1.6) (reinstall) (changes: >>> monad-control-1.0.0.4 -> 0.3.3.1) >>> persistent-2.1.6 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 >>> yesod-persistent-1.4.0.2 persistent-template-2.1.3.3) (reinstall) (changes: >>> monad-control-1.0.0.4 -> 0.3.3.1) >>> persistent-template-2.1.3.3 (via: yesod-auth-1.4.5 >>> yesod-persistent-1.4.0.2) (reinstall) (changes: monad-control-1.0.0.4 -> >>> 0.3.3.1) >>> shakespeare-2.0.5 (via: yesod-1.4.0 yesod-auth-1.4.5 yesod-form-1.4.4.1 >>> yesod-core-1.4.9.1) (new package) >>> wai-extra-3.0.7.1 (via: yesod-1.4.0 yesod-core-1.4.9.1) (reinstall) >>> xml-conduit-1.3.0 (via: authenticate-1.3.2.11 tagstream-conduit-0.5.5.3) >>> (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>> tagstream-conduit-0.5.5.3 (via: authenticate-1.3.2.11) (reinstall) >>> authenticate-1.3.2.11 (via: yesod-auth-1.4.5) (reinstall) (changes: >>> monad-control-1.0.0.4 -> 0.3.3.1) >>> yaml-0.8.11 (via: yesod-1.4.0) (reinstall) >>> yesod-core-1.4.9.1 (via: yesod-1.4.0 yesod-auth-1.4.5 yesod-form-1.4.4.1 >>> yesod-persistent-1.4.0.2) (new package) >>> yesod-persistent-1.4.0.2 (via: yesod-1.4.0 yesod-auth-1.4.5 >>> yesod-form-1.4.4.1) (new package) >>> yesod-form-1.4.4.1 (via: yesod-1.4.0 yesod-auth-1.4.5) (new package) >>> yesod-auth-1.4.5 (via: yesod-1.4.0) (new package) >>> yesod-1.4.0 (latest: 1.4.1.5) (new package) >>> cabal: The following packages are likely to be broken by the reinstalls: >>> pandoc-citeproc-0.7.1.1 >>> pandoc-1.14.0.4 >>> project-template-0.2.0 >>> http-reverse-proxy-0.4.2 >>> Use --force-reinstalls if you want to install anyway. >>> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.2.6.1 >>> Resolving dependencies... >>> cabal: Could not resolve dependencies: >>> next goal: yesod (user goal) >>> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, >>> 1.4.0 >>> (global constraint requires ==1.2.6.1) >>> trying: yesod-1.2.6.1 >>> trying: streaming-commons-0.1.12.1/installed-200... (dependency of >>> yesod-1.2.6.1) >>> trying: warp-3.0.13.1/installed-150... (dependency of yesod-1.2.6.1) >>> next goal: yesod-form (dependency of yesod-1.2.6.1) >>> rejecting: yesod-form-1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2.1, 1.4.2, >>> 1.4.1.1, >>> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => yesod-form>=1.3 && >>> <1.4) >>> trying: yesod-form-1.3.16 >>> next goal: persistent (dependency of yesod-form-1.3.16) >>> rejecting: persistent-2.1.6/installed-4f9..., 2.1.6, 2.1.5, 2.1.4, 2.1.3, >>> 2.1.2, 2.1.1.7, 2.1.1.6, 2.1.1.5, 2.1.1.4, 2.1.1.3, 2.1.1.2, 2.1.1.1, >>> 2.1.1, >>> 2.1.0.2, 2.1.0.1, 2.1 (conflict: yesod-form => persistent>=1.2 && <2.1) >>> trying: persistent-1.3.3 >>> trying: path-pieces-0.2.0/installed-533... (dependency of >>> persistent-1.3.3) >>> next goal: yesod-core (dependency of yesod-1.2.6.1) >>> rejecting: yesod-core-1.4.9.1, 1.4.9, 1.4.8.3, 1.4.8.2, 1.4.8.1, 1.4.8, >>> 1.4.7.3, 1.4.7.2, 1.4.7.1, 1.4.7, 1.4.6.2, 1.4.6.1, 1.4.6, 1.4.5, >>> 1.4.4.5, >>> 1.4.4.4, 1.4.4.3, 1.4.4.2, 1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2, >>> 1.4.1.1, >>> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => yesod-core>=1.2.2 && >>> <1.3) >>> rejecting: yesod-core-1.2.20.1, 1.2.20, 1.2.19.2, 1.2.19.1, 1.2.19, >>> 1.2.18, >>> 1.2.17, 1.2.16.1, 1.2.16, 1.2.15.2, 1.2.15.1, 1.2.15, 1.2.14, 1.2.13.1, >>> 1.2.13, 1.2.12, 1.2.11.1, 1.2.11, 1.2.10, 1.2.9.2, 1.2.9.1, 1.2.9, 1.2.8, >>> 1.2.7, 1.2.6.7, 1.2.6.6, 1.2.6.5, 1.2.6.4, 1.2.6.3, 1.2.6.2, 1.2.6.1 >>> (conflict: path-pieces==0.2.0/installed-533..., yesod-core => >>> path-pieces>=0.1.2 && <0.2) >>> rejecting: yesod-core-1.2.6 (conflict: streaming-commons => >>> text==1.1.0.0/installed-9bd..., yesod-core => text>=0.7 && <0.12) >>> rejecting: yesod-core-1.2.5, 1.2.4.5, 1.2.4.4, 1.2.4.3, 1.2.4.2, 1.2.4.1, >>> 1.2.4, 1.2.3, 1.2.2 (conflict: warp => wai==3.0.2.3/installed-39c..., >>> yesod-core => wai>=1.4 && <1.5) >>> rejecting: yesod-core-1.2.1, 1.2.0.4, 1.2.0.3, 1.2.0.2, 1.2.0.1, 1.2.0, >>> 1.1.8.3, 1.1.8.2, 1.1.8.1, 1.1.8, 1.1.7.2, 1.1.7.1, 1.1.7, 1.1.6.1, >>> 1.1.6, >>> 1.1.5, 1.1.4.2, 1.1.4.1, 1.1.4, 1.1.3.1, 1.1.3, 1.1.2.2, 1.1.2.1, 1.1.2, >>> 1.1.1.2, 1.1.1.1, 1.1.1, 1.1.0.1, 1.1.0, 1.0.1.3, 1.0.1.2, 1.0.1.1, >>> 1.0.1, >>> 1.0.0.2, 1.0.0.1, 1.0.0, 0.10.3, 0.10.2.2, 0.10.2.1, 0.10.2, 0.10.1, >>> 0.9.4.1, >>> 0.9.4, 0.9.3.6, 0.9.3.5, 0.9.3.4, 0.9.3.3, 0.9.3.2, 0.9.3.1, 0.9.3, >>> 0.9.2, >>> 0.9.1.1, 0.9.1, 0.8.3.2, 0.8.3.1, 0.8.3, 0.8.2, 0.8.1, 0.8.0.1, 0.8.0, >>> 0.7.0.2, 0.7.0.1, 0.7.0 (conflict: yesod => yesod-core>=1.2.2 && <1.3) >>> Backjump limit reached (change with --max-backjumps). >>> >>> -- >>> Public key ID: E8FE60D7 >>> Public key server: see, e.g., hkp://keys.gnupg.net >>> >>> On Thu, Jun 18, 2015 at 3:32 PM, Christopher Allen >>> wrote: >>> >>>> Ah that's frustrating, that's my mistake ? I'm sorry. I thought you >>>> were talking about GHC for Mac OS X not being available for your OS version >>>> either. >>>> >>>> Your best bet on HP is to specify an older version of Yesod that will >>>> work with the dependencies that your version of HP comes with. >>>> >>>> On Thu, Jun 18, 2015 at 2:08 PM, Miguel A. Santos < >>>> miguel.a.santos.l at gmail.com> wrote: >>>> >>>>> Indeed I saw that. That's what I meant with the bindist not being >>>>> available for OSX 10.6.8; only for 10.7+ >>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#macosx_x86_64 >>>>> My bad, I should have said it before. >>>>> >>>>> >>>>> >>>>> -- >>>>> Public key ID: E8FE60D7 >>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>> >>>>> On Thu, Jun 18, 2015 at 2:36 PM, Christopher Allen >>>>> wrote: >>>>> >>>>>> Did you see that the Mac instructions said to follow the "other *nix" >>>>>> instructions if you were using an older version of Mac OS X? >>>>>> >>>>>> Those link here: >>>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#binaries >>>>>> >>>>>> Get rid of all that (GHC, HP, Cabal), then install GHC using the >>>>>> bindist for Mac OS X linked above. >>>>>> >>>>>> On Thu, Jun 18, 2015 at 1:14 PM, Miguel A. Santos < >>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>> >>>>>>> That is obviously a typo: I meant I *did* do a fresh install of the >>>>>>> Haskell Platform and cabal before >>>>>>> trying -and failing- to install yesod. >>>>>>> >>>>>>> On Thu, Jun 18, 2015 at 1:38 PM, Miguel A. Santos < >>>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>>> >>>>>>>> This corresponds to a fresh install of the HP, ghc, and cabal I >>>>>>>> didn't before trying to install yesod. >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Public key ID: E8FE60D7 >>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Haskell-Cafe mailing list >>>>>>> Haskell-Cafe at haskell.org >>>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Chris Allen >>>>>> Currently working on http://haskellbook.com >>>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> Chris Allen >>>> Currently working on http://haskellbook.com >>>> >>> >>> >> >> >> -- >> Chris Allen >> Currently working on http://haskellbook.com >> > > -- Chris Allen Currently working on http://haskellbook.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From miguel.a.santos.l at gmail.com Thu Jun 18 20:54:09 2015 From: miguel.a.santos.l at gmail.com (Miguel A. Santos) Date: Thu, 18 Jun 2015 16:54:09 -0400 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: Hmm.. wouldn't that mean, I later have to reinstall all my packages? :-/ Meanwhile, I did try the sandbox way. It didn't work either. Briefly I issued cabal sandbox init and then cabal install yesod-1.2.6.1 Details below. The initial complain about not being able to resolve dependencies makes me think I may be missing more things about working with sandboxes. Just checked https://www.haskell.org/cabal/users-guide/installing-packages.html#developing-with-sandboxes and guessed the init would be enough. -------------------------------------------------------- msantos at MBP-2[16:38]:~/System/YESOD/Sandbox$cabal sandbox init Writing a default package environment file to /Users/msantos/System/YESOD/Sandbox/cabal.sandbox.config Creating a new sandbox at /Users/msantos/System/YESOD/Sandbox/.cabal-sandbox msantos at MBP-2[16:41]:~/System/YESOD/Sandbox$cabal install yesod-1.2.6.1 Resolving dependencies... cabal: Could not resolve dependencies: next goal: yesod (user goal) rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, 1.4.0 (global constraint requires ==1.2.6.1) trying: yesod-1.2.6.1 trying: streaming-commons-0.1.12.1 (dependency of yesod-1.2.6.1) trying: network-2.4.2.3/installed-575... (dependency of streaming-commons-0.1.12.1) trying: parsec-3.1.5/installed-04a... (dependency of network-2.4.2.3/installed-575...) trying: mtl-2.1.3.1/installed-8bc... (dependency of parsec-3.1.5/installed-04a...) trying: shakespeare-2.0.5 (dependency of yesod-1.2.6.1) trying: exceptions-0.8.0.2 (dependency of shakespeare-2.0.5) trying: transformers-compat-0.4.0.4 (dependency of exceptions-0.8.0.2) trying: transformers-compat-0.4.0.4:-two rejecting: transformers-compat-0.4.0.4:-three (conflict: mtl => transformers==0.3.0.0/installed-16a..., transformers-compat-0.4.0.4:three => transformers>=0.4.1 && <0.5) rejecting: transformers-compat-0.4.0.4:+three (manual flag can only be changed explicitly) Backjump limit reached (change with --max-backjumps). Note: when using a sandbox, all packages are required to have consistent dependencies. Try reinstalling/unregistering the offending packages or recreating the sandbox. -- Public key ID: E8FE60D7 Public key server: see, e.g., hkp://keys.gnupg.net On Thu, Jun 18, 2015 at 4:46 PM, Christopher Allen wrote: > If you won't use a sandbox, then lets nuke your user package-db and start > from scratch: > > rm -rf ~/.ghc > cabal install yesod==1.2.6.1 > > On Thu, Jun 18, 2015 at 3:28 PM, Miguel A. Santos < > miguel.a.santos.l at gmail.com> wrote: > >> I haven't yet read how to use sandboxes, so, no, that I tried just like >> that cabal install... >> I did check first that cabal info yesod was saying I didn't have it >> install. But now that you mention it, I did >> may have had other packages lingering around from my last attempt of >> installing yesod. >> >> Meanwhile I did run forcing the install of 1.4.0... >> Ah, it finished with cabal install --force-reinstalls yesod-1.4.0 and... >> it complains about the shakespeare. >> >> "shakespeare-2.0.5 failed during the building phase. The exception was: >> ExitFailure 1" >> >> Below the full output. >> >> I'll give a try to the sandbox solution. >> >> ------------------------------------------------ >> msantos at MBP-2[16:09]:~/System/YESOD$cabal install --force-reinstalls >> yesod-1.4.0 >> Resolving dependencies... >> Warning: The following packages are likely to be broken by the reinstalls: >> pandoc-citeproc-0.7.1.1 >> pandoc-1.14.0.4 >> project-template-0.2.0 >> http-reverse-proxy-0.4.2 >> Continuing even though the plan contains dangerous reinstalls. >> Downloading monad-control-0.3.3.1... >> Configuring shakespeare-2.0.5... >> Configuring monad-control-0.3.3.1... >> Building monad-control-0.3.3.1... >> Building shakespeare-2.0.5... >> Installed monad-control-0.3.3.1 >> Configuring lifted-base-0.2.3.6... >> Building lifted-base-0.2.3.6... >> Configuring resource-pool-0.2.3.2... >> Installed lifted-base-0.2.3.6 >> Building resource-pool-0.2.3.2... >> Installed resource-pool-0.2.3.2 >> Configuring enclosed-exceptions-1.0.1.1... >> Building enclosed-exceptions-1.0.1.1... >> Configuring resourcet-1.1.5... >> Installed enclosed-exceptions-1.0.1.1 >> Building resourcet-1.1.5... >> Failed to install shakespeare-2.0.5 >> Build log ( /Users/msantos/.cabal/logs/shakespeare-2.0.5.log ): >> Configuring shakespeare-2.0.5... >> Building shakespeare-2.0.5... >> Preprocessing library shakespeare-2.0.5... >> [ 1 of 17] Compiling Text.MkSizeType ( Text/MkSizeType.hs, >> dist/build/Text/MkSizeType.o ) >> [ 2 of 17] Compiling Text.IndentToBrace ( Text/IndentToBrace.hs, >> dist/build/Text/IndentToBrace.o ) >> [ 3 of 17] Compiling Text.Shakespeare.Base ( Text/Shakespeare/Base.hs, >> dist/build/Text/Shakespeare/Base.o ) >> [ 4 of 17] Compiling Text.Hamlet.Parse ( Text/Hamlet/Parse.hs, >> dist/build/Text/Hamlet/Parse.o ) >> [ 5 of 17] Compiling Text.Hamlet ( Text/Hamlet.hs, >> dist/build/Text/Hamlet.o ) >> >> Text/Hamlet.hs:402:1: Warning: Defined but not used: ?varName? >> >> Text/Hamlet.hs:406:1: Warning: Defined but not used: ?strToExp? >> >> Text/Hamlet.hs:439:16: Warning: Defined but not used: ?html? >> >> Text/Hamlet.hs:440:14: Warning: Defined but not used: ?url? >> >> Text/Hamlet.hs:441:19: Warning: Defined but not used: ?url? >> >> Text/Hamlet.hs:442:16: Warning: Defined but not used: ?url? >> >> Text/Hamlet.hs:443:20: Warning: Defined but not used: ?msg_url? >> >> Text/Hamlet.hs:444:14: Warning: Defined but not used: ?msg? >> >> Text/Hamlet.hs:488:43: Warning: >> This binding for ?c? shadows the existing binding >> bound at Text/Hamlet.hs:484:13 >> [ 6 of 17] Compiling Text.Hamlet.RT ( Text/Hamlet/RT.hs, >> dist/build/Text/Hamlet/RT.o ) >> >> Text/Hamlet/RT.hs:78:13: Warning: Defined but not used: ?x? >> >> Text/Hamlet/RT.hs:78:26: Warning: Defined but not used: ?deref? >> >> Text/Hamlet/RT.hs:78:45: Warning: Defined but not used: ?docs? >> >> Text/Hamlet/RT.hs:85:13: Warning: Defined but not used: ?x? >> >> Text/Hamlet/RT.hs:85:25: Warning: Defined but not used: ?deref? >> >> Text/Hamlet/RT.hs:85:44: Warning: Defined but not used: ?jdocs? >> >> Text/Hamlet/RT.hs:85:50: Warning: Defined but not used: ?ndocs? >> >> Text/Hamlet/RT.hs:115:37: Warning: >> This binding for ?x? shadows the existing binding >> bound at Text/Hamlet/RT.hs:108:13 >> [ 7 of 17] Compiling Text.Shakespeare ( Text/Shakespeare.hs, >> dist/build/Text/Shakespeare.o ) >> [ 8 of 17] Compiling Text.Shakespeare.Text ( Text/Shakespeare/Text.hs, >> dist/build/Text/Shakespeare/Text.o ) >> [ 9 of 17] Compiling Text.Julius ( Text/Julius.hs, >> dist/build/Text/Julius.o ) >> >> Text/Julius.hs:90:63: Warning: >> In the use of ?fromValue? (imported from Data.Aeson.Encode): >> Deprecated: "Use 'encodeToTextBuilder' instead" >> [10 of 17] Compiling Text.Roy ( Text/Roy.hs, >> dist/build/Text/Roy.o ) >> [11 of 17] Compiling Text.Coffee ( Text/Coffee.hs, >> dist/build/Text/Coffee.o ) >> [12 of 17] Compiling Text.Css ( Text/Css.hs, >> dist/build/Text/Css.o ) >> >> Text/Css.hs:349:40: Warning: Defined but not used: ?subblocks? >> >> Text/Css.hs:367:5: Warning: Defined but not used: ?subGo? >> [13 of 17] Compiling Text.CssCommon ( Text/CssCommon.hs, >> dist/build/Text/CssCommon.o ) >> Loading package ghc-prim ... linking ... done. >> Loading package integer-gmp ... linking ... done. >> Loading package base ... linking ... done. >> Loading package array-0.5.0.0 ... linking ... done. >> Loading package deepseq-1.3.0.2 ... linking ... done. >> Loading package filepath-1.3.0.2 ... linking ... done. >> Loading package old-locale-1.0.0.6 ... linking ... done. >> Loading package time-1.4.2 ... linking ... done. >> Loading package bytestring-0.10.4.0 ... linking ... done. >> Loading package unix-2.7.0.1 ... linking ... done. >> Loading package directory-1.2.1.0 ... linking ... done. >> Loading package process-1.2.0.0 ... linking ... done. >> Loading package transformers-0.3.0.0 ... linking ... done. >> Loading package mtl-2.1.3.1 ... linking ... done. >> Loading package text-1.1.0.0 ... linking ... done. >> Loading package parsec-3.1.5 ... : can't load .so/.DLL for: >> /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib >> (dlopen(/Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib, >> 9): Library not loaded: @rpath/libHStext-1.1.0.0-ghc7.8.3.dylib >> Referenced from: >> /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib >> Reason: image not found) >> Installed resourcet-1.1.5 >> Configuring wai-extra-3.0.7.1... >> Configuring conduit-1.2.4.2... >> Building conduit-1.2.4.2... >> Building wai-extra-3.0.7.1... >> Installed conduit-1.2.4.2 >> Configuring conduit-extra-1.1.9... >> Building conduit-extra-1.1.9... >> Configuring http-conduit-2.1.5... >> Installed wai-extra-3.0.7.1 >> Building http-conduit-2.1.5... >> Configuring yaml-0.8.11... >> Installed http-conduit-2.1.5 >> Building yaml-0.8.11... >> Installed conduit-extra-1.1.9 >> Configuring monad-logger-0.3.13.1... >> Building monad-logger-0.3.13.1... >> Configuring xml-conduit-1.3.0... >> Installed monad-logger-0.3.13.1 >> Building xml-conduit-1.3.0... >> Installed yaml-0.8.11 >> Configuring persistent-2.1.6... >> Building persistent-2.1.6... >> Installed xml-conduit-1.3.0 >> Configuring tagstream-conduit-0.5.5.3... >> Building tagstream-conduit-0.5.5.3... >> Installed tagstream-conduit-0.5.5.3 >> Configuring authenticate-1.3.2.11... >> Building authenticate-1.3.2.11... >> Installed authenticate-1.3.2.11 >> Installed persistent-2.1.6 >> Configuring persistent-template-2.1.3.3... >> Building persistent-template-2.1.3.3... >> Installed persistent-template-2.1.3.3 >> Updating documentation index >> /Users/msantos/Library/Haskell/share/doc/x86_64-osx-ghc-7.8.3/index.html >> cabal: Error: some packages failed to install: >> shakespeare-2.0.5 failed during the building phase. The exception was: >> ExitFailure 1 >> yesod-1.4.0 depends on shakespeare-2.0.5 which failed to install. >> yesod-auth-1.4.5 depends on shakespeare-2.0.5 which failed to install. >> yesod-core-1.4.9.1 depends on shakespeare-2.0.5 which failed to install. >> yesod-form-1.4.4.1 depends on shakespeare-2.0.5 which failed to install. >> yesod-persistent-1.4.0.2 depends on shakespeare-2.0.5 which failed to >> install. >> >> >> -- >> Public key ID: E8FE60D7 >> Public key server: see, e.g., hkp://keys.gnupg.net >> >> On Thu, Jun 18, 2015 at 4:16 PM, Christopher Allen >> wrote: >> >>> Some of that looks like churn from trying to install an older version of >>> Yesod over a newer one. Are you using a sandbox? if so, did you wipe it out >>> before attempting Yesod 1.2.6.1? What we'd be looking for is a package >>> conflict that tells you which package of what version that is globally >>> installed is causing the conflict. >>> >>> Insta-Yesodian conflict implies you're reinstalling into a not-fresh >>> packgage-db which means you either need to wipe your user package-db or use >>> a sandbox. (I recommend the latter). >>> >>> If you haven't done so, do that, then re-attempt that version of Yesod >>> (1.2.6.1). >>> >>> >>> >>> On Thu, Jun 18, 2015 at 2:57 PM, Miguel A. Santos < >>> miguel.a.santos.l at gmail.com> wrote: >>> >>>> Thanks! No problem. I gave a try to your suggestion. It doesn't look >>>> I'll get yesod installed without "paying" >>>> a bigger price than just "downgrading". :-/ >>>> >>>> Yesod 1.4.0 warns that forcing installing it will likely break pandoc, >>>> among other things. >>>> I can give it a try though, but I really use pandoc regularly. Plus, >>>> it's still not clear that the building process >>>> will not fail. And installing pandoc took me surprisingly a lot of time >>>> last time. >>>> >>>> Forcing Yesod-1.2.6.1 won't allow cabal to satisfy the dependencies. >>>> >>>> I guess I could keep trying other versions and see. But I think I'll >>>> try the 1.4.0 first. Will post here >>>> the results so that at least others may hopefully benefit from this. >>>> >>>> >>>> ----------------------------------------------------------------------------------------- >>>> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.4.0 >>>> Resolving dependencies... >>>> In order, the following would be installed: >>>> monad-control-0.3.3.1 (latest: 1.0.0.4) (via: yesod-1.4.0 >>>> yesod-core-1.4.9.1 authenticate-1.3.2.11 xml-conduit-1.3.0 >>>> persistent-template-2.1.3.3 persistent-2.1.6 monad-logger-0.3.13.1 >>>> http-conduit-2.1.5 conduit-extra-1.1.9 resourcet-1.1.5 >>>> resource-pool-0.2.3.2 enclosed-exceptions-1.0.1.1 lifted-base-0.2.3.6) (new >>>> version) >>>> lifted-base-0.2.3.6 (via: yesod-auth-1.4.5 yesod-core-1.4.9.1 >>>> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 >>>> conduit-1.2.4.2 resourcet-1.1.5 enclosed-exceptions-1.0.1.1) (reinstall) >>>> (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>> enclosed-exceptions-1.0.1.1 (via: yaml-0.8.11) (reinstall) (changes: >>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>> resource-pool-0.2.3.2 (via: yesod-persistent-1.4.0.2 persistent-2.1.6) >>>> (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>> resourcet-1.1.5 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 >>>> yesod-persistent-1.4.0.2 yesod-core-1.4.9.1 yaml-0.8.11 >>>> authenticate-1.3.2.11 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 >>>> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 >>>> conduit-extra-1.1.9 conduit-1.2.4.2) (reinstall) (changes: >>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>> conduit-1.2.4.2 (via: yesod-auth-1.4.5 yesod-persistent-1.4.0.2 >>>> yesod-core-1.4.9.1 yaml-0.8.11 authenticate-1.3.2.11 >>>> tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 persistent-2.1.6 >>>> monad-logger-0.3.13.1 http-conduit-2.1.5 conduit-extra-1.1.9) (reinstall) >>>> conduit-extra-1.1.9 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>> yesod-core-1.4.9.1 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 >>>> monad-logger-0.3.13.1) (reinstall) (changes: monad-control-1.0.0.4 -> >>>> 0.3.3.1) >>>> http-conduit-2.1.5 (via: yesod-auth-1.4.5 authenticate-1.3.2.11) >>>> (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>> monad-logger-0.3.13.1 (via: yesod-1.4.0 yesod-core-1.4.9.1 >>>> persistent-template-2.1.3.3 persistent-2.1.6) (reinstall) (changes: >>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>> persistent-2.1.6 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 >>>> yesod-persistent-1.4.0.2 persistent-template-2.1.3.3) (reinstall) (changes: >>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>> persistent-template-2.1.3.3 (via: yesod-auth-1.4.5 >>>> yesod-persistent-1.4.0.2) (reinstall) (changes: monad-control-1.0.0.4 -> >>>> 0.3.3.1) >>>> shakespeare-2.0.5 (via: yesod-1.4.0 yesod-auth-1.4.5 yesod-form-1.4.4.1 >>>> yesod-core-1.4.9.1) (new package) >>>> wai-extra-3.0.7.1 (via: yesod-1.4.0 yesod-core-1.4.9.1) (reinstall) >>>> xml-conduit-1.3.0 (via: authenticate-1.3.2.11 >>>> tagstream-conduit-0.5.5.3) (reinstall) (changes: monad-control-1.0.0.4 -> >>>> 0.3.3.1) >>>> tagstream-conduit-0.5.5.3 (via: authenticate-1.3.2.11) (reinstall) >>>> authenticate-1.3.2.11 (via: yesod-auth-1.4.5) (reinstall) (changes: >>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>> yaml-0.8.11 (via: yesod-1.4.0) (reinstall) >>>> yesod-core-1.4.9.1 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>> yesod-form-1.4.4.1 yesod-persistent-1.4.0.2) (new package) >>>> yesod-persistent-1.4.0.2 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>> yesod-form-1.4.4.1) (new package) >>>> yesod-form-1.4.4.1 (via: yesod-1.4.0 yesod-auth-1.4.5) (new package) >>>> yesod-auth-1.4.5 (via: yesod-1.4.0) (new package) >>>> yesod-1.4.0 (latest: 1.4.1.5) (new package) >>>> cabal: The following packages are likely to be broken by the reinstalls: >>>> pandoc-citeproc-0.7.1.1 >>>> pandoc-1.14.0.4 >>>> project-template-0.2.0 >>>> http-reverse-proxy-0.4.2 >>>> Use --force-reinstalls if you want to install anyway. >>>> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.2.6.1 >>>> Resolving dependencies... >>>> cabal: Could not resolve dependencies: >>>> next goal: yesod (user goal) >>>> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, >>>> 1.4.0 >>>> (global constraint requires ==1.2.6.1) >>>> trying: yesod-1.2.6.1 >>>> trying: streaming-commons-0.1.12.1/installed-200... (dependency of >>>> yesod-1.2.6.1) >>>> trying: warp-3.0.13.1/installed-150... (dependency of yesod-1.2.6.1) >>>> next goal: yesod-form (dependency of yesod-1.2.6.1) >>>> rejecting: yesod-form-1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2.1, 1.4.2, >>>> 1.4.1.1, >>>> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => yesod-form>=1.3 && >>>> <1.4) >>>> trying: yesod-form-1.3.16 >>>> next goal: persistent (dependency of yesod-form-1.3.16) >>>> rejecting: persistent-2.1.6/installed-4f9..., 2.1.6, 2.1.5, 2.1.4, >>>> 2.1.3, >>>> 2.1.2, 2.1.1.7, 2.1.1.6, 2.1.1.5, 2.1.1.4, 2.1.1.3, 2.1.1.2, 2.1.1.1, >>>> 2.1.1, >>>> 2.1.0.2, 2.1.0.1, 2.1 (conflict: yesod-form => persistent>=1.2 && <2.1) >>>> trying: persistent-1.3.3 >>>> trying: path-pieces-0.2.0/installed-533... (dependency of >>>> persistent-1.3.3) >>>> next goal: yesod-core (dependency of yesod-1.2.6.1) >>>> rejecting: yesod-core-1.4.9.1, 1.4.9, 1.4.8.3, 1.4.8.2, 1.4.8.1, 1.4.8, >>>> 1.4.7.3, 1.4.7.2, 1.4.7.1, 1.4.7, 1.4.6.2, 1.4.6.1, 1.4.6, 1.4.5, >>>> 1.4.4.5, >>>> 1.4.4.4, 1.4.4.3, 1.4.4.2, 1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2, >>>> 1.4.1.1, >>>> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => yesod-core>=1.2.2 && >>>> <1.3) >>>> rejecting: yesod-core-1.2.20.1, 1.2.20, 1.2.19.2, 1.2.19.1, 1.2.19, >>>> 1.2.18, >>>> 1.2.17, 1.2.16.1, 1.2.16, 1.2.15.2, 1.2.15.1, 1.2.15, 1.2.14, 1.2.13.1, >>>> 1.2.13, 1.2.12, 1.2.11.1, 1.2.11, 1.2.10, 1.2.9.2, 1.2.9.1, 1.2.9, >>>> 1.2.8, >>>> 1.2.7, 1.2.6.7, 1.2.6.6, 1.2.6.5, 1.2.6.4, 1.2.6.3, 1.2.6.2, 1.2.6.1 >>>> (conflict: path-pieces==0.2.0/installed-533..., yesod-core => >>>> path-pieces>=0.1.2 && <0.2) >>>> rejecting: yesod-core-1.2.6 (conflict: streaming-commons => >>>> text==1.1.0.0/installed-9bd..., yesod-core => text>=0.7 && <0.12) >>>> rejecting: yesod-core-1.2.5, 1.2.4.5, 1.2.4.4, 1.2.4.3, 1.2.4.2, >>>> 1.2.4.1, >>>> 1.2.4, 1.2.3, 1.2.2 (conflict: warp => wai==3.0.2.3/installed-39c..., >>>> yesod-core => wai>=1.4 && <1.5) >>>> rejecting: yesod-core-1.2.1, 1.2.0.4, 1.2.0.3, 1.2.0.2, 1.2.0.1, 1.2.0, >>>> 1.1.8.3, 1.1.8.2, 1.1.8.1, 1.1.8, 1.1.7.2, 1.1.7.1, 1.1.7, 1.1.6.1, >>>> 1.1.6, >>>> 1.1.5, 1.1.4.2, 1.1.4.1, 1.1.4, 1.1.3.1, 1.1.3, 1.1.2.2, 1.1.2.1, 1.1.2, >>>> 1.1.1.2, 1.1.1.1, 1.1.1, 1.1.0.1, 1.1.0, 1.0.1.3, 1.0.1.2, 1.0.1.1, >>>> 1.0.1, >>>> 1.0.0.2, 1.0.0.1, 1.0.0, 0.10.3, 0.10.2.2, 0.10.2.1, 0.10.2, 0.10.1, >>>> 0.9.4.1, >>>> 0.9.4, 0.9.3.6, 0.9.3.5, 0.9.3.4, 0.9.3.3, 0.9.3.2, 0.9.3.1, 0.9.3, >>>> 0.9.2, >>>> 0.9.1.1, 0.9.1, 0.8.3.2, 0.8.3.1, 0.8.3, 0.8.2, 0.8.1, 0.8.0.1, 0.8.0, >>>> 0.7.0.2, 0.7.0.1, 0.7.0 (conflict: yesod => yesod-core>=1.2.2 && <1.3) >>>> Backjump limit reached (change with --max-backjumps). >>>> >>>> -- >>>> Public key ID: E8FE60D7 >>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>> >>>> On Thu, Jun 18, 2015 at 3:32 PM, Christopher Allen >>>> wrote: >>>> >>>>> Ah that's frustrating, that's my mistake ? I'm sorry. I thought you >>>>> were talking about GHC for Mac OS X not being available for your OS version >>>>> either. >>>>> >>>>> Your best bet on HP is to specify an older version of Yesod that will >>>>> work with the dependencies that your version of HP comes with. >>>>> >>>>> On Thu, Jun 18, 2015 at 2:08 PM, Miguel A. Santos < >>>>> miguel.a.santos.l at gmail.com> wrote: >>>>> >>>>>> Indeed I saw that. That's what I meant with the bindist not being >>>>>> available for OSX 10.6.8; only for 10.7+ >>>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#macosx_x86_64 >>>>>> My bad, I should have said it before. >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Public key ID: E8FE60D7 >>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>> >>>>>> On Thu, Jun 18, 2015 at 2:36 PM, Christopher Allen >>>>> > wrote: >>>>>> >>>>>>> Did you see that the Mac instructions said to follow the "other >>>>>>> *nix" instructions if you were using an older version of Mac OS X? >>>>>>> >>>>>>> Those link here: >>>>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#binaries >>>>>>> >>>>>>> Get rid of all that (GHC, HP, Cabal), then install GHC using the >>>>>>> bindist for Mac OS X linked above. >>>>>>> >>>>>>> On Thu, Jun 18, 2015 at 1:14 PM, Miguel A. Santos < >>>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>>> >>>>>>>> That is obviously a typo: I meant I *did* do a fresh install of the >>>>>>>> Haskell Platform and cabal before >>>>>>>> trying -and failing- to install yesod. >>>>>>>> >>>>>>>> On Thu, Jun 18, 2015 at 1:38 PM, Miguel A. Santos < >>>>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>>>> >>>>>>>>> This corresponds to a fresh install of the HP, ghc, and cabal I >>>>>>>>> didn't before trying to install yesod. >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Public key ID: E8FE60D7 >>>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Haskell-Cafe mailing list >>>>>>>> Haskell-Cafe at haskell.org >>>>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Chris Allen >>>>>>> Currently working on http://haskellbook.com >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Chris Allen >>>>> Currently working on http://haskellbook.com >>>>> >>>> >>>> >>> >>> >>> -- >>> Chris Allen >>> Currently working on http://haskellbook.com >>> >> >> > > > -- > Chris Allen > Currently working on http://haskellbook.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From miguel.a.santos.l at gmail.com Thu Jun 18 21:09:49 2015 From: miguel.a.santos.l at gmail.com (Miguel A. Santos) Date: Thu, 18 Jun 2015 17:09:49 -0400 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: I'm trying with mv ~/.ghc/ ~/.ghc-org cabal install yesod==1.2.6.1 the rm seemed to "harsh". That should work as well as the actual rm, won't it? I'll post the results in a little while. (I'm running other things and it's being a bit slow) -- Public key ID: E8FE60D7 Public key server: see, e.g., hkp://keys.gnupg.net On Thu, Jun 18, 2015 at 4:54 PM, Miguel A. Santos < miguel.a.santos.l at gmail.com> wrote: > Hmm.. wouldn't that mean, I later have to reinstall all my packages? :-/ > > Meanwhile, I did try the sandbox way. It didn't work either. Briefly I > issued > cabal sandbox init > and then > cabal install yesod-1.2.6.1 > Details below. > > The initial complain about not being able to resolve dependencies makes me > think > I may be missing more things about working with sandboxes. Just checked > > https://www.haskell.org/cabal/users-guide/installing-packages.html#developing-with-sandboxes > and guessed the init would be enough. > > -------------------------------------------------------- > msantos at MBP-2[16:38]:~/System/YESOD/Sandbox$cabal sandbox init > Writing a default package environment file to > /Users/msantos/System/YESOD/Sandbox/cabal.sandbox.config > Creating a new sandbox at > /Users/msantos/System/YESOD/Sandbox/.cabal-sandbox > msantos at MBP-2[16:41]:~/System/YESOD/Sandbox$cabal install yesod-1.2.6.1 > Resolving dependencies... > cabal: Could not resolve dependencies: > next goal: yesod (user goal) > rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, 1.4.0 > (global constraint requires ==1.2.6.1) > trying: yesod-1.2.6.1 > trying: streaming-commons-0.1.12.1 (dependency of yesod-1.2.6.1) > trying: network-2.4.2.3/installed-575... (dependency of > streaming-commons-0.1.12.1) > trying: parsec-3.1.5/installed-04a... (dependency of > network-2.4.2.3/installed-575...) > trying: mtl-2.1.3.1/installed-8bc... (dependency of > parsec-3.1.5/installed-04a...) > trying: shakespeare-2.0.5 (dependency of yesod-1.2.6.1) > trying: exceptions-0.8.0.2 (dependency of shakespeare-2.0.5) > trying: transformers-compat-0.4.0.4 (dependency of exceptions-0.8.0.2) > trying: transformers-compat-0.4.0.4:-two > rejecting: transformers-compat-0.4.0.4:-three (conflict: mtl => > transformers==0.3.0.0/installed-16a..., transformers-compat-0.4.0.4:three > => > transformers>=0.4.1 && <0.5) > rejecting: transformers-compat-0.4.0.4:+three (manual flag can only be > changed > explicitly) > Backjump limit reached (change with --max-backjumps). > > Note: when using a sandbox, all packages are required to have consistent > dependencies. Try reinstalling/unregistering the offending packages or > recreating the sandbox. > > -- > Public key ID: E8FE60D7 > Public key server: see, e.g., hkp://keys.gnupg.net > > On Thu, Jun 18, 2015 at 4:46 PM, Christopher Allen > wrote: > >> If you won't use a sandbox, then lets nuke your user package-db and start >> from scratch: >> >> rm -rf ~/.ghc >> cabal install yesod==1.2.6.1 >> >> On Thu, Jun 18, 2015 at 3:28 PM, Miguel A. Santos < >> miguel.a.santos.l at gmail.com> wrote: >> >>> I haven't yet read how to use sandboxes, so, no, that I tried just like >>> that cabal install... >>> I did check first that cabal info yesod was saying I didn't have it >>> install. But now that you mention it, I did >>> may have had other packages lingering around from my last attempt of >>> installing yesod. >>> >>> Meanwhile I did run forcing the install of 1.4.0... >>> Ah, it finished with cabal install --force-reinstalls yesod-1.4.0 and... >>> it complains about the shakespeare. >>> >>> "shakespeare-2.0.5 failed during the building phase. The exception was: >>> ExitFailure 1" >>> >>> Below the full output. >>> >>> I'll give a try to the sandbox solution. >>> >>> ------------------------------------------------ >>> msantos at MBP-2[16:09]:~/System/YESOD$cabal install --force-reinstalls >>> yesod-1.4.0 >>> Resolving dependencies... >>> Warning: The following packages are likely to be broken by the >>> reinstalls: >>> pandoc-citeproc-0.7.1.1 >>> pandoc-1.14.0.4 >>> project-template-0.2.0 >>> http-reverse-proxy-0.4.2 >>> Continuing even though the plan contains dangerous reinstalls. >>> Downloading monad-control-0.3.3.1... >>> Configuring shakespeare-2.0.5... >>> Configuring monad-control-0.3.3.1... >>> Building monad-control-0.3.3.1... >>> Building shakespeare-2.0.5... >>> Installed monad-control-0.3.3.1 >>> Configuring lifted-base-0.2.3.6... >>> Building lifted-base-0.2.3.6... >>> Configuring resource-pool-0.2.3.2... >>> Installed lifted-base-0.2.3.6 >>> Building resource-pool-0.2.3.2... >>> Installed resource-pool-0.2.3.2 >>> Configuring enclosed-exceptions-1.0.1.1... >>> Building enclosed-exceptions-1.0.1.1... >>> Configuring resourcet-1.1.5... >>> Installed enclosed-exceptions-1.0.1.1 >>> Building resourcet-1.1.5... >>> Failed to install shakespeare-2.0.5 >>> Build log ( /Users/msantos/.cabal/logs/shakespeare-2.0.5.log ): >>> Configuring shakespeare-2.0.5... >>> Building shakespeare-2.0.5... >>> Preprocessing library shakespeare-2.0.5... >>> [ 1 of 17] Compiling Text.MkSizeType ( Text/MkSizeType.hs, >>> dist/build/Text/MkSizeType.o ) >>> [ 2 of 17] Compiling Text.IndentToBrace ( Text/IndentToBrace.hs, >>> dist/build/Text/IndentToBrace.o ) >>> [ 3 of 17] Compiling Text.Shakespeare.Base ( Text/Shakespeare/Base.hs, >>> dist/build/Text/Shakespeare/Base.o ) >>> [ 4 of 17] Compiling Text.Hamlet.Parse ( Text/Hamlet/Parse.hs, >>> dist/build/Text/Hamlet/Parse.o ) >>> [ 5 of 17] Compiling Text.Hamlet ( Text/Hamlet.hs, >>> dist/build/Text/Hamlet.o ) >>> >>> Text/Hamlet.hs:402:1: Warning: Defined but not used: ?varName? >>> >>> Text/Hamlet.hs:406:1: Warning: Defined but not used: ?strToExp? >>> >>> Text/Hamlet.hs:439:16: Warning: Defined but not used: ?html? >>> >>> Text/Hamlet.hs:440:14: Warning: Defined but not used: ?url? >>> >>> Text/Hamlet.hs:441:19: Warning: Defined but not used: ?url? >>> >>> Text/Hamlet.hs:442:16: Warning: Defined but not used: ?url? >>> >>> Text/Hamlet.hs:443:20: Warning: Defined but not used: ?msg_url? >>> >>> Text/Hamlet.hs:444:14: Warning: Defined but not used: ?msg? >>> >>> Text/Hamlet.hs:488:43: Warning: >>> This binding for ?c? shadows the existing binding >>> bound at Text/Hamlet.hs:484:13 >>> [ 6 of 17] Compiling Text.Hamlet.RT ( Text/Hamlet/RT.hs, >>> dist/build/Text/Hamlet/RT.o ) >>> >>> Text/Hamlet/RT.hs:78:13: Warning: Defined but not used: ?x? >>> >>> Text/Hamlet/RT.hs:78:26: Warning: Defined but not used: ?deref? >>> >>> Text/Hamlet/RT.hs:78:45: Warning: Defined but not used: ?docs? >>> >>> Text/Hamlet/RT.hs:85:13: Warning: Defined but not used: ?x? >>> >>> Text/Hamlet/RT.hs:85:25: Warning: Defined but not used: ?deref? >>> >>> Text/Hamlet/RT.hs:85:44: Warning: Defined but not used: ?jdocs? >>> >>> Text/Hamlet/RT.hs:85:50: Warning: Defined but not used: ?ndocs? >>> >>> Text/Hamlet/RT.hs:115:37: Warning: >>> This binding for ?x? shadows the existing binding >>> bound at Text/Hamlet/RT.hs:108:13 >>> [ 7 of 17] Compiling Text.Shakespeare ( Text/Shakespeare.hs, >>> dist/build/Text/Shakespeare.o ) >>> [ 8 of 17] Compiling Text.Shakespeare.Text ( Text/Shakespeare/Text.hs, >>> dist/build/Text/Shakespeare/Text.o ) >>> [ 9 of 17] Compiling Text.Julius ( Text/Julius.hs, >>> dist/build/Text/Julius.o ) >>> >>> Text/Julius.hs:90:63: Warning: >>> In the use of ?fromValue? (imported from Data.Aeson.Encode): >>> Deprecated: "Use 'encodeToTextBuilder' instead" >>> [10 of 17] Compiling Text.Roy ( Text/Roy.hs, >>> dist/build/Text/Roy.o ) >>> [11 of 17] Compiling Text.Coffee ( Text/Coffee.hs, >>> dist/build/Text/Coffee.o ) >>> [12 of 17] Compiling Text.Css ( Text/Css.hs, >>> dist/build/Text/Css.o ) >>> >>> Text/Css.hs:349:40: Warning: Defined but not used: ?subblocks? >>> >>> Text/Css.hs:367:5: Warning: Defined but not used: ?subGo? >>> [13 of 17] Compiling Text.CssCommon ( Text/CssCommon.hs, >>> dist/build/Text/CssCommon.o ) >>> Loading package ghc-prim ... linking ... done. >>> Loading package integer-gmp ... linking ... done. >>> Loading package base ... linking ... done. >>> Loading package array-0.5.0.0 ... linking ... done. >>> Loading package deepseq-1.3.0.2 ... linking ... done. >>> Loading package filepath-1.3.0.2 ... linking ... done. >>> Loading package old-locale-1.0.0.6 ... linking ... done. >>> Loading package time-1.4.2 ... linking ... done. >>> Loading package bytestring-0.10.4.0 ... linking ... done. >>> Loading package unix-2.7.0.1 ... linking ... done. >>> Loading package directory-1.2.1.0 ... linking ... done. >>> Loading package process-1.2.0.0 ... linking ... done. >>> Loading package transformers-0.3.0.0 ... linking ... done. >>> Loading package mtl-2.1.3.1 ... linking ... done. >>> Loading package text-1.1.0.0 ... linking ... done. >>> Loading package parsec-3.1.5 ... : can't load .so/.DLL >>> for: >>> /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib >>> (dlopen(/Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib, >>> 9): Library not loaded: @rpath/libHStext-1.1.0.0-ghc7.8.3.dylib >>> Referenced from: >>> /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib >>> Reason: image not found) >>> Installed resourcet-1.1.5 >>> Configuring wai-extra-3.0.7.1... >>> Configuring conduit-1.2.4.2... >>> Building conduit-1.2.4.2... >>> Building wai-extra-3.0.7.1... >>> Installed conduit-1.2.4.2 >>> Configuring conduit-extra-1.1.9... >>> Building conduit-extra-1.1.9... >>> Configuring http-conduit-2.1.5... >>> Installed wai-extra-3.0.7.1 >>> Building http-conduit-2.1.5... >>> Configuring yaml-0.8.11... >>> Installed http-conduit-2.1.5 >>> Building yaml-0.8.11... >>> Installed conduit-extra-1.1.9 >>> Configuring monad-logger-0.3.13.1... >>> Building monad-logger-0.3.13.1... >>> Configuring xml-conduit-1.3.0... >>> Installed monad-logger-0.3.13.1 >>> Building xml-conduit-1.3.0... >>> Installed yaml-0.8.11 >>> Configuring persistent-2.1.6... >>> Building persistent-2.1.6... >>> Installed xml-conduit-1.3.0 >>> Configuring tagstream-conduit-0.5.5.3... >>> Building tagstream-conduit-0.5.5.3... >>> Installed tagstream-conduit-0.5.5.3 >>> Configuring authenticate-1.3.2.11... >>> Building authenticate-1.3.2.11... >>> Installed authenticate-1.3.2.11 >>> Installed persistent-2.1.6 >>> Configuring persistent-template-2.1.3.3... >>> Building persistent-template-2.1.3.3... >>> Installed persistent-template-2.1.3.3 >>> Updating documentation index >>> /Users/msantos/Library/Haskell/share/doc/x86_64-osx-ghc-7.8.3/index.html >>> cabal: Error: some packages failed to install: >>> shakespeare-2.0.5 failed during the building phase. The exception was: >>> ExitFailure 1 >>> yesod-1.4.0 depends on shakespeare-2.0.5 which failed to install. >>> yesod-auth-1.4.5 depends on shakespeare-2.0.5 which failed to install. >>> yesod-core-1.4.9.1 depends on shakespeare-2.0.5 which failed to install. >>> yesod-form-1.4.4.1 depends on shakespeare-2.0.5 which failed to install. >>> yesod-persistent-1.4.0.2 depends on shakespeare-2.0.5 which failed to >>> install. >>> >>> >>> -- >>> Public key ID: E8FE60D7 >>> Public key server: see, e.g., hkp://keys.gnupg.net >>> >>> On Thu, Jun 18, 2015 at 4:16 PM, Christopher Allen >>> wrote: >>> >>>> Some of that looks like churn from trying to install an older version >>>> of Yesod over a newer one. Are you using a sandbox? if so, did you wipe it >>>> out before attempting Yesod 1.2.6.1? What we'd be looking for is a package >>>> conflict that tells you which package of what version that is globally >>>> installed is causing the conflict. >>>> >>>> Insta-Yesodian conflict implies you're reinstalling into a not-fresh >>>> packgage-db which means you either need to wipe your user package-db or use >>>> a sandbox. (I recommend the latter). >>>> >>>> If you haven't done so, do that, then re-attempt that version of Yesod >>>> (1.2.6.1). >>>> >>>> >>>> >>>> On Thu, Jun 18, 2015 at 2:57 PM, Miguel A. Santos < >>>> miguel.a.santos.l at gmail.com> wrote: >>>> >>>>> Thanks! No problem. I gave a try to your suggestion. It doesn't look >>>>> I'll get yesod installed without "paying" >>>>> a bigger price than just "downgrading". :-/ >>>>> >>>>> Yesod 1.4.0 warns that forcing installing it will likely break pandoc, >>>>> among other things. >>>>> I can give it a try though, but I really use pandoc regularly. Plus, >>>>> it's still not clear that the building process >>>>> will not fail. And installing pandoc took me surprisingly a lot of >>>>> time last time. >>>>> >>>>> Forcing Yesod-1.2.6.1 won't allow cabal to satisfy the dependencies. >>>>> >>>>> I guess I could keep trying other versions and see. But I think I'll >>>>> try the 1.4.0 first. Will post here >>>>> the results so that at least others may hopefully benefit from this. >>>>> >>>>> >>>>> ----------------------------------------------------------------------------------------- >>>>> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.4.0 >>>>> Resolving dependencies... >>>>> In order, the following would be installed: >>>>> monad-control-0.3.3.1 (latest: 1.0.0.4) (via: yesod-1.4.0 >>>>> yesod-core-1.4.9.1 authenticate-1.3.2.11 xml-conduit-1.3.0 >>>>> persistent-template-2.1.3.3 persistent-2.1.6 monad-logger-0.3.13.1 >>>>> http-conduit-2.1.5 conduit-extra-1.1.9 resourcet-1.1.5 >>>>> resource-pool-0.2.3.2 enclosed-exceptions-1.0.1.1 lifted-base-0.2.3.6) (new >>>>> version) >>>>> lifted-base-0.2.3.6 (via: yesod-auth-1.4.5 yesod-core-1.4.9.1 >>>>> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 >>>>> conduit-1.2.4.2 resourcet-1.1.5 enclosed-exceptions-1.0.1.1) (reinstall) >>>>> (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>>> enclosed-exceptions-1.0.1.1 (via: yaml-0.8.11) (reinstall) (changes: >>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>> resource-pool-0.2.3.2 (via: yesod-persistent-1.4.0.2 persistent-2.1.6) >>>>> (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>>> resourcet-1.1.5 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 >>>>> yesod-persistent-1.4.0.2 yesod-core-1.4.9.1 yaml-0.8.11 >>>>> authenticate-1.3.2.11 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 >>>>> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 >>>>> conduit-extra-1.1.9 conduit-1.2.4.2) (reinstall) (changes: >>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>> conduit-1.2.4.2 (via: yesod-auth-1.4.5 yesod-persistent-1.4.0.2 >>>>> yesod-core-1.4.9.1 yaml-0.8.11 authenticate-1.3.2.11 >>>>> tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 persistent-2.1.6 >>>>> monad-logger-0.3.13.1 http-conduit-2.1.5 conduit-extra-1.1.9) (reinstall) >>>>> conduit-extra-1.1.9 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>> yesod-core-1.4.9.1 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 >>>>> monad-logger-0.3.13.1) (reinstall) (changes: monad-control-1.0.0.4 -> >>>>> 0.3.3.1) >>>>> http-conduit-2.1.5 (via: yesod-auth-1.4.5 authenticate-1.3.2.11) >>>>> (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>>> monad-logger-0.3.13.1 (via: yesod-1.4.0 yesod-core-1.4.9.1 >>>>> persistent-template-2.1.3.3 persistent-2.1.6) (reinstall) (changes: >>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>> persistent-2.1.6 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 >>>>> yesod-persistent-1.4.0.2 persistent-template-2.1.3.3) (reinstall) (changes: >>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>> persistent-template-2.1.3.3 (via: yesod-auth-1.4.5 >>>>> yesod-persistent-1.4.0.2) (reinstall) (changes: monad-control-1.0.0.4 -> >>>>> 0.3.3.1) >>>>> shakespeare-2.0.5 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>> yesod-form-1.4.4.1 yesod-core-1.4.9.1) (new package) >>>>> wai-extra-3.0.7.1 (via: yesod-1.4.0 yesod-core-1.4.9.1) (reinstall) >>>>> xml-conduit-1.3.0 (via: authenticate-1.3.2.11 >>>>> tagstream-conduit-0.5.5.3) (reinstall) (changes: monad-control-1.0.0.4 -> >>>>> 0.3.3.1) >>>>> tagstream-conduit-0.5.5.3 (via: authenticate-1.3.2.11) (reinstall) >>>>> authenticate-1.3.2.11 (via: yesod-auth-1.4.5) (reinstall) (changes: >>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>> yaml-0.8.11 (via: yesod-1.4.0) (reinstall) >>>>> yesod-core-1.4.9.1 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>> yesod-form-1.4.4.1 yesod-persistent-1.4.0.2) (new package) >>>>> yesod-persistent-1.4.0.2 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>> yesod-form-1.4.4.1) (new package) >>>>> yesod-form-1.4.4.1 (via: yesod-1.4.0 yesod-auth-1.4.5) (new package) >>>>> yesod-auth-1.4.5 (via: yesod-1.4.0) (new package) >>>>> yesod-1.4.0 (latest: 1.4.1.5) (new package) >>>>> cabal: The following packages are likely to be broken by the >>>>> reinstalls: >>>>> pandoc-citeproc-0.7.1.1 >>>>> pandoc-1.14.0.4 >>>>> project-template-0.2.0 >>>>> http-reverse-proxy-0.4.2 >>>>> Use --force-reinstalls if you want to install anyway. >>>>> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.2.6.1 >>>>> Resolving dependencies... >>>>> cabal: Could not resolve dependencies: >>>>> next goal: yesod (user goal) >>>>> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, >>>>> 1.4.0 >>>>> (global constraint requires ==1.2.6.1) >>>>> trying: yesod-1.2.6.1 >>>>> trying: streaming-commons-0.1.12.1/installed-200... (dependency of >>>>> yesod-1.2.6.1) >>>>> trying: warp-3.0.13.1/installed-150... (dependency of yesod-1.2.6.1) >>>>> next goal: yesod-form (dependency of yesod-1.2.6.1) >>>>> rejecting: yesod-form-1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2.1, 1.4.2, >>>>> 1.4.1.1, >>>>> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => yesod-form>=1.3 && >>>>> <1.4) >>>>> trying: yesod-form-1.3.16 >>>>> next goal: persistent (dependency of yesod-form-1.3.16) >>>>> rejecting: persistent-2.1.6/installed-4f9..., 2.1.6, 2.1.5, 2.1.4, >>>>> 2.1.3, >>>>> 2.1.2, 2.1.1.7, 2.1.1.6, 2.1.1.5, 2.1.1.4, 2.1.1.3, 2.1.1.2, 2.1.1.1, >>>>> 2.1.1, >>>>> 2.1.0.2, 2.1.0.1, 2.1 (conflict: yesod-form => persistent>=1.2 && <2.1) >>>>> trying: persistent-1.3.3 >>>>> trying: path-pieces-0.2.0/installed-533... (dependency of >>>>> persistent-1.3.3) >>>>> next goal: yesod-core (dependency of yesod-1.2.6.1) >>>>> rejecting: yesod-core-1.4.9.1, 1.4.9, 1.4.8.3, 1.4.8.2, 1.4.8.1, 1.4.8, >>>>> 1.4.7.3, 1.4.7.2, 1.4.7.1, 1.4.7, 1.4.6.2, 1.4.6.1, 1.4.6, 1.4.5, >>>>> 1.4.4.5, >>>>> 1.4.4.4, 1.4.4.3, 1.4.4.2, 1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2, >>>>> 1.4.1.1, >>>>> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => yesod-core>=1.2.2 >>>>> && <1.3) >>>>> rejecting: yesod-core-1.2.20.1, 1.2.20, 1.2.19.2, 1.2.19.1, 1.2.19, >>>>> 1.2.18, >>>>> 1.2.17, 1.2.16.1, 1.2.16, 1.2.15.2, 1.2.15.1, 1.2.15, 1.2.14, 1.2.13.1, >>>>> 1.2.13, 1.2.12, 1.2.11.1, 1.2.11, 1.2.10, 1.2.9.2, 1.2.9.1, 1.2.9, >>>>> 1.2.8, >>>>> 1.2.7, 1.2.6.7, 1.2.6.6, 1.2.6.5, 1.2.6.4, 1.2.6.3, 1.2.6.2, 1.2.6.1 >>>>> (conflict: path-pieces==0.2.0/installed-533..., yesod-core => >>>>> path-pieces>=0.1.2 && <0.2) >>>>> rejecting: yesod-core-1.2.6 (conflict: streaming-commons => >>>>> text==1.1.0.0/installed-9bd..., yesod-core => text>=0.7 && <0.12) >>>>> rejecting: yesod-core-1.2.5, 1.2.4.5, 1.2.4.4, 1.2.4.3, 1.2.4.2, >>>>> 1.2.4.1, >>>>> 1.2.4, 1.2.3, 1.2.2 (conflict: warp => wai==3.0.2.3/installed-39c..., >>>>> yesod-core => wai>=1.4 && <1.5) >>>>> rejecting: yesod-core-1.2.1, 1.2.0.4, 1.2.0.3, 1.2.0.2, 1.2.0.1, 1.2.0, >>>>> 1.1.8.3, 1.1.8.2, 1.1.8.1, 1.1.8, 1.1.7.2, 1.1.7.1, 1.1.7, 1.1.6.1, >>>>> 1.1.6, >>>>> 1.1.5, 1.1.4.2, 1.1.4.1, 1.1.4, 1.1.3.1, 1.1.3, 1.1.2.2, 1.1.2.1, >>>>> 1.1.2, >>>>> 1.1.1.2, 1.1.1.1, 1.1.1, 1.1.0.1, 1.1.0, 1.0.1.3, 1.0.1.2, 1.0.1.1, >>>>> 1.0.1, >>>>> 1.0.0.2, 1.0.0.1, 1.0.0, 0.10.3, 0.10.2.2, 0.10.2.1, 0.10.2, 0.10.1, >>>>> 0.9.4.1, >>>>> 0.9.4, 0.9.3.6, 0.9.3.5, 0.9.3.4, 0.9.3.3, 0.9.3.2, 0.9.3.1, 0.9.3, >>>>> 0.9.2, >>>>> 0.9.1.1, 0.9.1, 0.8.3.2, 0.8.3.1, 0.8.3, 0.8.2, 0.8.1, 0.8.0.1, 0.8.0, >>>>> 0.7.0.2, 0.7.0.1, 0.7.0 (conflict: yesod => yesod-core>=1.2.2 && <1.3) >>>>> Backjump limit reached (change with --max-backjumps). >>>>> >>>>> -- >>>>> Public key ID: E8FE60D7 >>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>> >>>>> On Thu, Jun 18, 2015 at 3:32 PM, Christopher Allen >>>>> wrote: >>>>> >>>>>> Ah that's frustrating, that's my mistake ? I'm sorry. I thought you >>>>>> were talking about GHC for Mac OS X not being available for your OS version >>>>>> either. >>>>>> >>>>>> Your best bet on HP is to specify an older version of Yesod that will >>>>>> work with the dependencies that your version of HP comes with. >>>>>> >>>>>> On Thu, Jun 18, 2015 at 2:08 PM, Miguel A. Santos < >>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>> >>>>>>> Indeed I saw that. That's what I meant with the bindist not being >>>>>>> available for OSX 10.6.8; only for 10.7+ >>>>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#macosx_x86_64 >>>>>>> My bad, I should have said it before. >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Public key ID: E8FE60D7 >>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>>> >>>>>>> On Thu, Jun 18, 2015 at 2:36 PM, Christopher Allen < >>>>>>> cma at bitemyapp.com> wrote: >>>>>>> >>>>>>>> Did you see that the Mac instructions said to follow the "other >>>>>>>> *nix" instructions if you were using an older version of Mac OS X? >>>>>>>> >>>>>>>> Those link here: >>>>>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#binaries >>>>>>>> >>>>>>>> Get rid of all that (GHC, HP, Cabal), then install GHC using the >>>>>>>> bindist for Mac OS X linked above. >>>>>>>> >>>>>>>> On Thu, Jun 18, 2015 at 1:14 PM, Miguel A. Santos < >>>>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>>>> >>>>>>>>> That is obviously a typo: I meant I *did* do a fresh install of >>>>>>>>> the Haskell Platform and cabal before >>>>>>>>> trying -and failing- to install yesod. >>>>>>>>> >>>>>>>>> On Thu, Jun 18, 2015 at 1:38 PM, Miguel A. Santos < >>>>>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>>>>> >>>>>>>>>> This corresponds to a fresh install of the HP, ghc, and cabal I >>>>>>>>>> didn't before trying to install yesod. >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Public key ID: E8FE60D7 >>>>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Haskell-Cafe mailing list >>>>>>>>> Haskell-Cafe at haskell.org >>>>>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Chris Allen >>>>>>>> Currently working on http://haskellbook.com >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Chris Allen >>>>>> Currently working on http://haskellbook.com >>>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> Chris Allen >>>> Currently working on http://haskellbook.com >>>> >>> >>> >> >> >> -- >> Chris Allen >> Currently working on http://haskellbook.com >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From etanter at dcc.uchile.cl Thu Jun 18 21:14:32 2015 From: etanter at dcc.uchile.cl (=?utf-8?Q?=C3=89ric_Tanter?=) Date: Thu, 18 Jun 2015 18:14:32 -0300 Subject: [Haskell-cafe] Haskell users on Chile In-Reply-To: References: <5576D88E.7090203@gmail.com> Message-ID: <3102A7DE-6DEB-4B5B-B322-060E3ED07C17@dcc.uchile.cl> I?m a CS professor at Universidad de Chile, doing research in PL, some of it in Haskell. I also use Haskell for part of my PL courses, so there might be some Haskellers that came out of these experiences. Also, Ismael Figueroa (in cc) graduated from his PhD under my supervision last year. His PhD thesis was entirely around Haskell (monadic embedding of aspects, compositional reasoning about interference), and we?ve done some other stuff on Haskell too (effect capabilities). Ismael is now professor at Universidad Cat?lica de Valpara?so. -- ?ric > On Jun 18, 2015, at 2:44 PM, Roman Dzvinkovsky wrote: > > Living in Vi?a del Mar, would love to participate. > > 2015-06-09 9:46 GMT-03:00 Anupam Jain >: > Great idea! Though not a native Chilean, I lived in Chile (Santiago) > for the better part of a year in 2014-2015, where my favourite > activity was infiltrating JS meetups and evangelizing Haskell :) > > It would be great to have a dedicated Haskell community there. > > -- Anupam > > On Tue, Jun 9, 2015 at 5:44 PM, Ruben Astudillo > wrote: > > Hi all > > > > I would like to see how many haskellers are living on Chile with hopes of > > forming a user group. If you are in here, you should reply this thread and > > see > > how many of us there are. You can also contact me to my mail. > > > > -- > > Ruben Astudillo. pgp: 0x3C332311 , usala en lo posible :-) > > Crear un haiku, en diecisiete silabas, es complica... > > _______________________________________________ > > Haskell-Cafe mailing list > > Haskell-Cafe at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe -------------- next part -------------- An HTML attachment was scrubbed... URL: From cma at bitemyapp.com Thu Jun 18 21:15:58 2015 From: cma at bitemyapp.com (Christopher Allen) Date: Thu, 18 Jun 2015 16:15:58 -0500 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: You don't need to rm -rf ~/.ghc if you're using a sandbox. The sandbox (usually) occludes the user package-db. Well, the sandbox may not have fixed the incompatibility of HP and that particular version of Yesod, but we're better information from the dependency solver. That said, this is going to simply require a lot of trial and error if you want to try this approach and me telling you increment/decrement versions isn't going to be any faster. I'd say your best options are: 1. Upgrade your installation of Mac OS X so you can use the vanilla GHC bindist, or even better, GHC for Mac OS X 2. Use your copy of Haskell Platform to build GHC from source and use that instead of GHC (possibly a quagmire, might work out okay. Will take a long time to build.) 3. Unregister all the unnecessary packages from your global package-db. Listing here: https://www.haskell.org/platform/changelog.html (Additional Platform Libraries, do *not* uninstall any of the core libraries) If you make a mistake you may need to reinstall Platform. 4. Give passing --allow-newer to cabal install a shot. This is rough. Not that many people on <10.7 OS X versions so there aren't enough squeaky wheels for this sort of thing. Sorry I couldn't do more. On Thu, Jun 18, 2015 at 3:54 PM, Miguel A. Santos < miguel.a.santos.l at gmail.com> wrote: > Hmm.. wouldn't that mean, I later have to reinstall all my packages? :-/ > > Meanwhile, I did try the sandbox way. It didn't work either. Briefly I > issued > cabal sandbox init > and then > cabal install yesod-1.2.6.1 > Details below. > > The initial complain about not being able to resolve dependencies makes me > think > I may be missing more things about working with sandboxes. Just checked > > https://www.haskell.org/cabal/users-guide/installing-packages.html#developing-with-sandboxes > and guessed the init would be enough. > > -------------------------------------------------------- > msantos at MBP-2[16:38]:~/System/YESOD/Sandbox$cabal sandbox init > Writing a default package environment file to > /Users/msantos/System/YESOD/Sandbox/cabal.sandbox.config > Creating a new sandbox at > /Users/msantos/System/YESOD/Sandbox/.cabal-sandbox > msantos at MBP-2[16:41]:~/System/YESOD/Sandbox$cabal install yesod-1.2.6.1 > Resolving dependencies... > cabal: Could not resolve dependencies: > next goal: yesod (user goal) > rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, 1.4.0 > (global constraint requires ==1.2.6.1) > trying: yesod-1.2.6.1 > trying: streaming-commons-0.1.12.1 (dependency of yesod-1.2.6.1) > trying: network-2.4.2.3/installed-575... (dependency of > streaming-commons-0.1.12.1) > trying: parsec-3.1.5/installed-04a... (dependency of > network-2.4.2.3/installed-575...) > trying: mtl-2.1.3.1/installed-8bc... (dependency of > parsec-3.1.5/installed-04a...) > trying: shakespeare-2.0.5 (dependency of yesod-1.2.6.1) > trying: exceptions-0.8.0.2 (dependency of shakespeare-2.0.5) > trying: transformers-compat-0.4.0.4 (dependency of exceptions-0.8.0.2) > trying: transformers-compat-0.4.0.4:-two > rejecting: transformers-compat-0.4.0.4:-three (conflict: mtl => > transformers==0.3.0.0/installed-16a..., transformers-compat-0.4.0.4:three > => > transformers>=0.4.1 && <0.5) > rejecting: transformers-compat-0.4.0.4:+three (manual flag can only be > changed > explicitly) > Backjump limit reached (change with --max-backjumps). > > Note: when using a sandbox, all packages are required to have consistent > dependencies. Try reinstalling/unregistering the offending packages or > recreating the sandbox. > > -- > Public key ID: E8FE60D7 > Public key server: see, e.g., hkp://keys.gnupg.net > > On Thu, Jun 18, 2015 at 4:46 PM, Christopher Allen > wrote: > >> If you won't use a sandbox, then lets nuke your user package-db and start >> from scratch: >> >> rm -rf ~/.ghc >> cabal install yesod==1.2.6.1 >> >> On Thu, Jun 18, 2015 at 3:28 PM, Miguel A. Santos < >> miguel.a.santos.l at gmail.com> wrote: >> >>> I haven't yet read how to use sandboxes, so, no, that I tried just like >>> that cabal install... >>> I did check first that cabal info yesod was saying I didn't have it >>> install. But now that you mention it, I did >>> may have had other packages lingering around from my last attempt of >>> installing yesod. >>> >>> Meanwhile I did run forcing the install of 1.4.0... >>> Ah, it finished with cabal install --force-reinstalls yesod-1.4.0 and... >>> it complains about the shakespeare. >>> >>> "shakespeare-2.0.5 failed during the building phase. The exception was: >>> ExitFailure 1" >>> >>> Below the full output. >>> >>> I'll give a try to the sandbox solution. >>> >>> ------------------------------------------------ >>> msantos at MBP-2[16:09]:~/System/YESOD$cabal install --force-reinstalls >>> yesod-1.4.0 >>> Resolving dependencies... >>> Warning: The following packages are likely to be broken by the >>> reinstalls: >>> pandoc-citeproc-0.7.1.1 >>> pandoc-1.14.0.4 >>> project-template-0.2.0 >>> http-reverse-proxy-0.4.2 >>> Continuing even though the plan contains dangerous reinstalls. >>> Downloading monad-control-0.3.3.1... >>> Configuring shakespeare-2.0.5... >>> Configuring monad-control-0.3.3.1... >>> Building monad-control-0.3.3.1... >>> Building shakespeare-2.0.5... >>> Installed monad-control-0.3.3.1 >>> Configuring lifted-base-0.2.3.6... >>> Building lifted-base-0.2.3.6... >>> Configuring resource-pool-0.2.3.2... >>> Installed lifted-base-0.2.3.6 >>> Building resource-pool-0.2.3.2... >>> Installed resource-pool-0.2.3.2 >>> Configuring enclosed-exceptions-1.0.1.1... >>> Building enclosed-exceptions-1.0.1.1... >>> Configuring resourcet-1.1.5... >>> Installed enclosed-exceptions-1.0.1.1 >>> Building resourcet-1.1.5... >>> Failed to install shakespeare-2.0.5 >>> Build log ( /Users/msantos/.cabal/logs/shakespeare-2.0.5.log ): >>> Configuring shakespeare-2.0.5... >>> Building shakespeare-2.0.5... >>> Preprocessing library shakespeare-2.0.5... >>> [ 1 of 17] Compiling Text.MkSizeType ( Text/MkSizeType.hs, >>> dist/build/Text/MkSizeType.o ) >>> [ 2 of 17] Compiling Text.IndentToBrace ( Text/IndentToBrace.hs, >>> dist/build/Text/IndentToBrace.o ) >>> [ 3 of 17] Compiling Text.Shakespeare.Base ( Text/Shakespeare/Base.hs, >>> dist/build/Text/Shakespeare/Base.o ) >>> [ 4 of 17] Compiling Text.Hamlet.Parse ( Text/Hamlet/Parse.hs, >>> dist/build/Text/Hamlet/Parse.o ) >>> [ 5 of 17] Compiling Text.Hamlet ( Text/Hamlet.hs, >>> dist/build/Text/Hamlet.o ) >>> >>> Text/Hamlet.hs:402:1: Warning: Defined but not used: ?varName? >>> >>> Text/Hamlet.hs:406:1: Warning: Defined but not used: ?strToExp? >>> >>> Text/Hamlet.hs:439:16: Warning: Defined but not used: ?html? >>> >>> Text/Hamlet.hs:440:14: Warning: Defined but not used: ?url? >>> >>> Text/Hamlet.hs:441:19: Warning: Defined but not used: ?url? >>> >>> Text/Hamlet.hs:442:16: Warning: Defined but not used: ?url? >>> >>> Text/Hamlet.hs:443:20: Warning: Defined but not used: ?msg_url? >>> >>> Text/Hamlet.hs:444:14: Warning: Defined but not used: ?msg? >>> >>> Text/Hamlet.hs:488:43: Warning: >>> This binding for ?c? shadows the existing binding >>> bound at Text/Hamlet.hs:484:13 >>> [ 6 of 17] Compiling Text.Hamlet.RT ( Text/Hamlet/RT.hs, >>> dist/build/Text/Hamlet/RT.o ) >>> >>> Text/Hamlet/RT.hs:78:13: Warning: Defined but not used: ?x? >>> >>> Text/Hamlet/RT.hs:78:26: Warning: Defined but not used: ?deref? >>> >>> Text/Hamlet/RT.hs:78:45: Warning: Defined but not used: ?docs? >>> >>> Text/Hamlet/RT.hs:85:13: Warning: Defined but not used: ?x? >>> >>> Text/Hamlet/RT.hs:85:25: Warning: Defined but not used: ?deref? >>> >>> Text/Hamlet/RT.hs:85:44: Warning: Defined but not used: ?jdocs? >>> >>> Text/Hamlet/RT.hs:85:50: Warning: Defined but not used: ?ndocs? >>> >>> Text/Hamlet/RT.hs:115:37: Warning: >>> This binding for ?x? shadows the existing binding >>> bound at Text/Hamlet/RT.hs:108:13 >>> [ 7 of 17] Compiling Text.Shakespeare ( Text/Shakespeare.hs, >>> dist/build/Text/Shakespeare.o ) >>> [ 8 of 17] Compiling Text.Shakespeare.Text ( Text/Shakespeare/Text.hs, >>> dist/build/Text/Shakespeare/Text.o ) >>> [ 9 of 17] Compiling Text.Julius ( Text/Julius.hs, >>> dist/build/Text/Julius.o ) >>> >>> Text/Julius.hs:90:63: Warning: >>> In the use of ?fromValue? (imported from Data.Aeson.Encode): >>> Deprecated: "Use 'encodeToTextBuilder' instead" >>> [10 of 17] Compiling Text.Roy ( Text/Roy.hs, >>> dist/build/Text/Roy.o ) >>> [11 of 17] Compiling Text.Coffee ( Text/Coffee.hs, >>> dist/build/Text/Coffee.o ) >>> [12 of 17] Compiling Text.Css ( Text/Css.hs, >>> dist/build/Text/Css.o ) >>> >>> Text/Css.hs:349:40: Warning: Defined but not used: ?subblocks? >>> >>> Text/Css.hs:367:5: Warning: Defined but not used: ?subGo? >>> [13 of 17] Compiling Text.CssCommon ( Text/CssCommon.hs, >>> dist/build/Text/CssCommon.o ) >>> Loading package ghc-prim ... linking ... done. >>> Loading package integer-gmp ... linking ... done. >>> Loading package base ... linking ... done. >>> Loading package array-0.5.0.0 ... linking ... done. >>> Loading package deepseq-1.3.0.2 ... linking ... done. >>> Loading package filepath-1.3.0.2 ... linking ... done. >>> Loading package old-locale-1.0.0.6 ... linking ... done. >>> Loading package time-1.4.2 ... linking ... done. >>> Loading package bytestring-0.10.4.0 ... linking ... done. >>> Loading package unix-2.7.0.1 ... linking ... done. >>> Loading package directory-1.2.1.0 ... linking ... done. >>> Loading package process-1.2.0.0 ... linking ... done. >>> Loading package transformers-0.3.0.0 ... linking ... done. >>> Loading package mtl-2.1.3.1 ... linking ... done. >>> Loading package text-1.1.0.0 ... linking ... done. >>> Loading package parsec-3.1.5 ... : can't load .so/.DLL >>> for: >>> /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib >>> (dlopen(/Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib, >>> 9): Library not loaded: @rpath/libHStext-1.1.0.0-ghc7.8.3.dylib >>> Referenced from: >>> /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib >>> Reason: image not found) >>> Installed resourcet-1.1.5 >>> Configuring wai-extra-3.0.7.1... >>> Configuring conduit-1.2.4.2... >>> Building conduit-1.2.4.2... >>> Building wai-extra-3.0.7.1... >>> Installed conduit-1.2.4.2 >>> Configuring conduit-extra-1.1.9... >>> Building conduit-extra-1.1.9... >>> Configuring http-conduit-2.1.5... >>> Installed wai-extra-3.0.7.1 >>> Building http-conduit-2.1.5... >>> Configuring yaml-0.8.11... >>> Installed http-conduit-2.1.5 >>> Building yaml-0.8.11... >>> Installed conduit-extra-1.1.9 >>> Configuring monad-logger-0.3.13.1... >>> Building monad-logger-0.3.13.1... >>> Configuring xml-conduit-1.3.0... >>> Installed monad-logger-0.3.13.1 >>> Building xml-conduit-1.3.0... >>> Installed yaml-0.8.11 >>> Configuring persistent-2.1.6... >>> Building persistent-2.1.6... >>> Installed xml-conduit-1.3.0 >>> Configuring tagstream-conduit-0.5.5.3... >>> Building tagstream-conduit-0.5.5.3... >>> Installed tagstream-conduit-0.5.5.3 >>> Configuring authenticate-1.3.2.11... >>> Building authenticate-1.3.2.11... >>> Installed authenticate-1.3.2.11 >>> Installed persistent-2.1.6 >>> Configuring persistent-template-2.1.3.3... >>> Building persistent-template-2.1.3.3... >>> Installed persistent-template-2.1.3.3 >>> Updating documentation index >>> /Users/msantos/Library/Haskell/share/doc/x86_64-osx-ghc-7.8.3/index.html >>> cabal: Error: some packages failed to install: >>> shakespeare-2.0.5 failed during the building phase. The exception was: >>> ExitFailure 1 >>> yesod-1.4.0 depends on shakespeare-2.0.5 which failed to install. >>> yesod-auth-1.4.5 depends on shakespeare-2.0.5 which failed to install. >>> yesod-core-1.4.9.1 depends on shakespeare-2.0.5 which failed to install. >>> yesod-form-1.4.4.1 depends on shakespeare-2.0.5 which failed to install. >>> yesod-persistent-1.4.0.2 depends on shakespeare-2.0.5 which failed to >>> install. >>> >>> >>> -- >>> Public key ID: E8FE60D7 >>> Public key server: see, e.g., hkp://keys.gnupg.net >>> >>> On Thu, Jun 18, 2015 at 4:16 PM, Christopher Allen >>> wrote: >>> >>>> Some of that looks like churn from trying to install an older version >>>> of Yesod over a newer one. Are you using a sandbox? if so, did you wipe it >>>> out before attempting Yesod 1.2.6.1? What we'd be looking for is a package >>>> conflict that tells you which package of what version that is globally >>>> installed is causing the conflict. >>>> >>>> Insta-Yesodian conflict implies you're reinstalling into a not-fresh >>>> packgage-db which means you either need to wipe your user package-db or use >>>> a sandbox. (I recommend the latter). >>>> >>>> If you haven't done so, do that, then re-attempt that version of Yesod >>>> (1.2.6.1). >>>> >>>> >>>> >>>> On Thu, Jun 18, 2015 at 2:57 PM, Miguel A. Santos < >>>> miguel.a.santos.l at gmail.com> wrote: >>>> >>>>> Thanks! No problem. I gave a try to your suggestion. It doesn't look >>>>> I'll get yesod installed without "paying" >>>>> a bigger price than just "downgrading". :-/ >>>>> >>>>> Yesod 1.4.0 warns that forcing installing it will likely break pandoc, >>>>> among other things. >>>>> I can give it a try though, but I really use pandoc regularly. Plus, >>>>> it's still not clear that the building process >>>>> will not fail. And installing pandoc took me surprisingly a lot of >>>>> time last time. >>>>> >>>>> Forcing Yesod-1.2.6.1 won't allow cabal to satisfy the dependencies. >>>>> >>>>> I guess I could keep trying other versions and see. But I think I'll >>>>> try the 1.4.0 first. Will post here >>>>> the results so that at least others may hopefully benefit from this. >>>>> >>>>> >>>>> ----------------------------------------------------------------------------------------- >>>>> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.4.0 >>>>> Resolving dependencies... >>>>> In order, the following would be installed: >>>>> monad-control-0.3.3.1 (latest: 1.0.0.4) (via: yesod-1.4.0 >>>>> yesod-core-1.4.9.1 authenticate-1.3.2.11 xml-conduit-1.3.0 >>>>> persistent-template-2.1.3.3 persistent-2.1.6 monad-logger-0.3.13.1 >>>>> http-conduit-2.1.5 conduit-extra-1.1.9 resourcet-1.1.5 >>>>> resource-pool-0.2.3.2 enclosed-exceptions-1.0.1.1 lifted-base-0.2.3.6) (new >>>>> version) >>>>> lifted-base-0.2.3.6 (via: yesod-auth-1.4.5 yesod-core-1.4.9.1 >>>>> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 >>>>> conduit-1.2.4.2 resourcet-1.1.5 enclosed-exceptions-1.0.1.1) (reinstall) >>>>> (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>>> enclosed-exceptions-1.0.1.1 (via: yaml-0.8.11) (reinstall) (changes: >>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>> resource-pool-0.2.3.2 (via: yesod-persistent-1.4.0.2 persistent-2.1.6) >>>>> (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>>> resourcet-1.1.5 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 >>>>> yesod-persistent-1.4.0.2 yesod-core-1.4.9.1 yaml-0.8.11 >>>>> authenticate-1.3.2.11 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 >>>>> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 >>>>> conduit-extra-1.1.9 conduit-1.2.4.2) (reinstall) (changes: >>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>> conduit-1.2.4.2 (via: yesod-auth-1.4.5 yesod-persistent-1.4.0.2 >>>>> yesod-core-1.4.9.1 yaml-0.8.11 authenticate-1.3.2.11 >>>>> tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 persistent-2.1.6 >>>>> monad-logger-0.3.13.1 http-conduit-2.1.5 conduit-extra-1.1.9) (reinstall) >>>>> conduit-extra-1.1.9 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>> yesod-core-1.4.9.1 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 >>>>> monad-logger-0.3.13.1) (reinstall) (changes: monad-control-1.0.0.4 -> >>>>> 0.3.3.1) >>>>> http-conduit-2.1.5 (via: yesod-auth-1.4.5 authenticate-1.3.2.11) >>>>> (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>>> monad-logger-0.3.13.1 (via: yesod-1.4.0 yesod-core-1.4.9.1 >>>>> persistent-template-2.1.3.3 persistent-2.1.6) (reinstall) (changes: >>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>> persistent-2.1.6 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 >>>>> yesod-persistent-1.4.0.2 persistent-template-2.1.3.3) (reinstall) (changes: >>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>> persistent-template-2.1.3.3 (via: yesod-auth-1.4.5 >>>>> yesod-persistent-1.4.0.2) (reinstall) (changes: monad-control-1.0.0.4 -> >>>>> 0.3.3.1) >>>>> shakespeare-2.0.5 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>> yesod-form-1.4.4.1 yesod-core-1.4.9.1) (new package) >>>>> wai-extra-3.0.7.1 (via: yesod-1.4.0 yesod-core-1.4.9.1) (reinstall) >>>>> xml-conduit-1.3.0 (via: authenticate-1.3.2.11 >>>>> tagstream-conduit-0.5.5.3) (reinstall) (changes: monad-control-1.0.0.4 -> >>>>> 0.3.3.1) >>>>> tagstream-conduit-0.5.5.3 (via: authenticate-1.3.2.11) (reinstall) >>>>> authenticate-1.3.2.11 (via: yesod-auth-1.4.5) (reinstall) (changes: >>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>> yaml-0.8.11 (via: yesod-1.4.0) (reinstall) >>>>> yesod-core-1.4.9.1 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>> yesod-form-1.4.4.1 yesod-persistent-1.4.0.2) (new package) >>>>> yesod-persistent-1.4.0.2 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>> yesod-form-1.4.4.1) (new package) >>>>> yesod-form-1.4.4.1 (via: yesod-1.4.0 yesod-auth-1.4.5) (new package) >>>>> yesod-auth-1.4.5 (via: yesod-1.4.0) (new package) >>>>> yesod-1.4.0 (latest: 1.4.1.5) (new package) >>>>> cabal: The following packages are likely to be broken by the >>>>> reinstalls: >>>>> pandoc-citeproc-0.7.1.1 >>>>> pandoc-1.14.0.4 >>>>> project-template-0.2.0 >>>>> http-reverse-proxy-0.4.2 >>>>> Use --force-reinstalls if you want to install anyway. >>>>> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.2.6.1 >>>>> Resolving dependencies... >>>>> cabal: Could not resolve dependencies: >>>>> next goal: yesod (user goal) >>>>> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, >>>>> 1.4.0 >>>>> (global constraint requires ==1.2.6.1) >>>>> trying: yesod-1.2.6.1 >>>>> trying: streaming-commons-0.1.12.1/installed-200... (dependency of >>>>> yesod-1.2.6.1) >>>>> trying: warp-3.0.13.1/installed-150... (dependency of yesod-1.2.6.1) >>>>> next goal: yesod-form (dependency of yesod-1.2.6.1) >>>>> rejecting: yesod-form-1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2.1, 1.4.2, >>>>> 1.4.1.1, >>>>> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => yesod-form>=1.3 && >>>>> <1.4) >>>>> trying: yesod-form-1.3.16 >>>>> next goal: persistent (dependency of yesod-form-1.3.16) >>>>> rejecting: persistent-2.1.6/installed-4f9..., 2.1.6, 2.1.5, 2.1.4, >>>>> 2.1.3, >>>>> 2.1.2, 2.1.1.7, 2.1.1.6, 2.1.1.5, 2.1.1.4, 2.1.1.3, 2.1.1.2, 2.1.1.1, >>>>> 2.1.1, >>>>> 2.1.0.2, 2.1.0.1, 2.1 (conflict: yesod-form => persistent>=1.2 && <2.1) >>>>> trying: persistent-1.3.3 >>>>> trying: path-pieces-0.2.0/installed-533... (dependency of >>>>> persistent-1.3.3) >>>>> next goal: yesod-core (dependency of yesod-1.2.6.1) >>>>> rejecting: yesod-core-1.4.9.1, 1.4.9, 1.4.8.3, 1.4.8.2, 1.4.8.1, 1.4.8, >>>>> 1.4.7.3, 1.4.7.2, 1.4.7.1, 1.4.7, 1.4.6.2, 1.4.6.1, 1.4.6, 1.4.5, >>>>> 1.4.4.5, >>>>> 1.4.4.4, 1.4.4.3, 1.4.4.2, 1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2, >>>>> 1.4.1.1, >>>>> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => yesod-core>=1.2.2 >>>>> && <1.3) >>>>> rejecting: yesod-core-1.2.20.1, 1.2.20, 1.2.19.2, 1.2.19.1, 1.2.19, >>>>> 1.2.18, >>>>> 1.2.17, 1.2.16.1, 1.2.16, 1.2.15.2, 1.2.15.1, 1.2.15, 1.2.14, 1.2.13.1, >>>>> 1.2.13, 1.2.12, 1.2.11.1, 1.2.11, 1.2.10, 1.2.9.2, 1.2.9.1, 1.2.9, >>>>> 1.2.8, >>>>> 1.2.7, 1.2.6.7, 1.2.6.6, 1.2.6.5, 1.2.6.4, 1.2.6.3, 1.2.6.2, 1.2.6.1 >>>>> (conflict: path-pieces==0.2.0/installed-533..., yesod-core => >>>>> path-pieces>=0.1.2 && <0.2) >>>>> rejecting: yesod-core-1.2.6 (conflict: streaming-commons => >>>>> text==1.1.0.0/installed-9bd..., yesod-core => text>=0.7 && <0.12) >>>>> rejecting: yesod-core-1.2.5, 1.2.4.5, 1.2.4.4, 1.2.4.3, 1.2.4.2, >>>>> 1.2.4.1, >>>>> 1.2.4, 1.2.3, 1.2.2 (conflict: warp => wai==3.0.2.3/installed-39c..., >>>>> yesod-core => wai>=1.4 && <1.5) >>>>> rejecting: yesod-core-1.2.1, 1.2.0.4, 1.2.0.3, 1.2.0.2, 1.2.0.1, 1.2.0, >>>>> 1.1.8.3, 1.1.8.2, 1.1.8.1, 1.1.8, 1.1.7.2, 1.1.7.1, 1.1.7, 1.1.6.1, >>>>> 1.1.6, >>>>> 1.1.5, 1.1.4.2, 1.1.4.1, 1.1.4, 1.1.3.1, 1.1.3, 1.1.2.2, 1.1.2.1, >>>>> 1.1.2, >>>>> 1.1.1.2, 1.1.1.1, 1.1.1, 1.1.0.1, 1.1.0, 1.0.1.3, 1.0.1.2, 1.0.1.1, >>>>> 1.0.1, >>>>> 1.0.0.2, 1.0.0.1, 1.0.0, 0.10.3, 0.10.2.2, 0.10.2.1, 0.10.2, 0.10.1, >>>>> 0.9.4.1, >>>>> 0.9.4, 0.9.3.6, 0.9.3.5, 0.9.3.4, 0.9.3.3, 0.9.3.2, 0.9.3.1, 0.9.3, >>>>> 0.9.2, >>>>> 0.9.1.1, 0.9.1, 0.8.3.2, 0.8.3.1, 0.8.3, 0.8.2, 0.8.1, 0.8.0.1, 0.8.0, >>>>> 0.7.0.2, 0.7.0.1, 0.7.0 (conflict: yesod => yesod-core>=1.2.2 && <1.3) >>>>> Backjump limit reached (change with --max-backjumps). >>>>> >>>>> -- >>>>> Public key ID: E8FE60D7 >>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>> >>>>> On Thu, Jun 18, 2015 at 3:32 PM, Christopher Allen >>>>> wrote: >>>>> >>>>>> Ah that's frustrating, that's my mistake ? I'm sorry. I thought you >>>>>> were talking about GHC for Mac OS X not being available for your OS version >>>>>> either. >>>>>> >>>>>> Your best bet on HP is to specify an older version of Yesod that will >>>>>> work with the dependencies that your version of HP comes with. >>>>>> >>>>>> On Thu, Jun 18, 2015 at 2:08 PM, Miguel A. Santos < >>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>> >>>>>>> Indeed I saw that. That's what I meant with the bindist not being >>>>>>> available for OSX 10.6.8; only for 10.7+ >>>>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#macosx_x86_64 >>>>>>> My bad, I should have said it before. >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Public key ID: E8FE60D7 >>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>>> >>>>>>> On Thu, Jun 18, 2015 at 2:36 PM, Christopher Allen < >>>>>>> cma at bitemyapp.com> wrote: >>>>>>> >>>>>>>> Did you see that the Mac instructions said to follow the "other >>>>>>>> *nix" instructions if you were using an older version of Mac OS X? >>>>>>>> >>>>>>>> Those link here: >>>>>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#binaries >>>>>>>> >>>>>>>> Get rid of all that (GHC, HP, Cabal), then install GHC using the >>>>>>>> bindist for Mac OS X linked above. >>>>>>>> >>>>>>>> On Thu, Jun 18, 2015 at 1:14 PM, Miguel A. Santos < >>>>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>>>> >>>>>>>>> That is obviously a typo: I meant I *did* do a fresh install of >>>>>>>>> the Haskell Platform and cabal before >>>>>>>>> trying -and failing- to install yesod. >>>>>>>>> >>>>>>>>> On Thu, Jun 18, 2015 at 1:38 PM, Miguel A. Santos < >>>>>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>>>>> >>>>>>>>>> This corresponds to a fresh install of the HP, ghc, and cabal I >>>>>>>>>> didn't before trying to install yesod. >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Public key ID: E8FE60D7 >>>>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Haskell-Cafe mailing list >>>>>>>>> Haskell-Cafe at haskell.org >>>>>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Chris Allen >>>>>>>> Currently working on http://haskellbook.com >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Chris Allen >>>>>> Currently working on http://haskellbook.com >>>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> Chris Allen >>>> Currently working on http://haskellbook.com >>>> >>> >>> >> >> >> -- >> Chris Allen >> Currently working on http://haskellbook.com >> > > -- Chris Allen Currently working on http://haskellbook.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From miguel.a.santos.l at gmail.com Thu Jun 18 22:18:47 2015 From: miguel.a.santos.l at gmail.com (Miguel A. Santos) Date: Thu, 18 Jun 2015 18:18:47 -0400 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: Ok, removing ~/.ghc (actually just moving it to ~/.ghc-org) didn't work either. The detailed output is below but from a cursory view it seems not much better than within the sandbox try before. I understand I'm staying in the "past" and with that comes problems like this one, but upgrading to Yellowstone is not an option for me. I have some questions about your other options. In particular, I'm not sure what you mean by (capitals) GHC. I thought that's just the compiler. I don't understand your first sentence after "vanilla". What is what I got with HP if not GHC for MacOSX!? About point 2., I'm building (already for hours, that's the 'other' process I'd running) ghc from the tarball ghc-7.8.4-src.tar.bz2 available at the bottom of that same link we mentioned before, namely, https://www.haskell.org/ghc/download_ghc_7_8_4#binaries Is this the same as what you mean by this 2nd option? Mind you I'm already using version 7.8.3. How will a new version of the compiler change what looks like a compatibility problem with a package? or you mean it is not that simple? Option 3: It seems to me I may as well just remove everything, install HP again (already downloaded) and after that step finishes, trying installing right away yesod, before I try with any other packages. Seems a path based mostly on blind hope than logic to me :-p as the only big thing I installed between my fresh install of HP and my initial try of yesod was pandoc, which had some large dependencies to deal with. But it's a simple one, so I may check it definitely out of the equation. Option 4: I guess this is something I can try right away without much effort. To be concrete you mean then cabal install --allow-newer yesod ? Btw, thanks so much for your prompt help! -------------------------------------------- msantos at MBP-2[17:09]:~/System/YESOD$mv ~/.ghc/ ~/.ghc-org msantos at MBP-2[17:30]:~$cabal install yesod==1.2.6.1 Warning: The package list for 'hackage.haskell.org' is 15.0 days old. Run 'cabal update' to get the latest list of available packages. Resolving dependencies... cabal: Could not resolve dependencies: next goal: yesod (user goal) rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, 1.4.0 (global constraint requires ==1.2.6.1) trying: yesod-1.2.6.1 trying: streaming-commons-0.1.12.1 (dependency of yesod-1.2.6.1) trying: network-2.4.2.3/installed-575... (dependency of streaming-commons-0.1.12.1) trying: parsec-3.1.5/installed-04a... (dependency of network-2.4.2.3/installed-575...) trying: mtl-2.1.3.1/installed-8bc... (dependency of parsec-3.1.5/installed-04a...) trying: shakespeare-2.0.5 (dependency of yesod-1.2.6.1) trying: exceptions-0.8.0.2 (dependency of shakespeare-2.0.5) trying: transformers-compat-0.4.0.4 (dependency of exceptions-0.8.0.2) trying: transformers-compat-0.4.0.4:-two rejecting: transformers-compat-0.4.0.4:-three (conflict: mtl => transformers==0.3.0.0/installed-16a..., transformers-compat-0.4.0.4:three => transformers>=0.4.1 && <0.5) rejecting: transformers-compat-0.4.0.4:+three (manual flag can only be changed explicitly) Backjump limit reached (change with --max-backjumps). -- Public key ID: E8FE60D7 Public key server: see, e.g., hkp://keys.gnupg.net On Thu, Jun 18, 2015 at 5:15 PM, Christopher Allen wrote: > You don't need to rm -rf ~/.ghc if you're using a sandbox. The sandbox > (usually) occludes the user package-db. > > Well, the sandbox may not have fixed the incompatibility of HP and that > particular version of Yesod, but we're better information from the > dependency solver. > > That said, this is going to simply require a lot of trial and error if you > want to try this approach and me telling you increment/decrement versions > isn't going to be any faster. > > I'd say your best options are: > > 1. Upgrade your installation of Mac OS X so you can use the vanilla GHC > bindist, or even better, GHC for Mac OS X > > 2. Use your copy of Haskell Platform to build GHC from source and use that > instead of GHC (possibly a quagmire, might work out okay. Will take a long > time to build.) > > 3. Unregister all the unnecessary packages from your global package-db. > Listing here: https://www.haskell.org/platform/changelog.html (Additional > Platform Libraries, do *not* uninstall any of the core libraries) > If you make a mistake you may need to reinstall Platform. > > 4. Give passing --allow-newer to cabal install a shot. > > This is rough. Not that many people on <10.7 OS X versions so there aren't > enough squeaky wheels for this sort of thing. > > Sorry I couldn't do more. > > > > On Thu, Jun 18, 2015 at 3:54 PM, Miguel A. Santos < > miguel.a.santos.l at gmail.com> wrote: > >> Hmm.. wouldn't that mean, I later have to reinstall all my packages? :-/ >> >> Meanwhile, I did try the sandbox way. It didn't work either. Briefly I >> issued >> cabal sandbox init >> and then >> cabal install yesod-1.2.6.1 >> Details below. >> >> The initial complain about not being able to resolve dependencies makes >> me think >> I may be missing more things about working with sandboxes. Just checked >> >> https://www.haskell.org/cabal/users-guide/installing-packages.html#developing-with-sandboxes >> and guessed the init would be enough. >> >> -------------------------------------------------------- >> msantos at MBP-2[16:38]:~/System/YESOD/Sandbox$cabal sandbox init >> Writing a default package environment file to >> /Users/msantos/System/YESOD/Sandbox/cabal.sandbox.config >> Creating a new sandbox at >> /Users/msantos/System/YESOD/Sandbox/.cabal-sandbox >> msantos at MBP-2[16:41]:~/System/YESOD/Sandbox$cabal install yesod-1.2.6.1 >> Resolving dependencies... >> cabal: Could not resolve dependencies: >> next goal: yesod (user goal) >> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, 1.4.0 >> (global constraint requires ==1.2.6.1) >> trying: yesod-1.2.6.1 >> trying: streaming-commons-0.1.12.1 (dependency of yesod-1.2.6.1) >> trying: network-2.4.2.3/installed-575... (dependency of >> streaming-commons-0.1.12.1) >> trying: parsec-3.1.5/installed-04a... (dependency of >> network-2.4.2.3/installed-575...) >> trying: mtl-2.1.3.1/installed-8bc... (dependency of >> parsec-3.1.5/installed-04a...) >> trying: shakespeare-2.0.5 (dependency of yesod-1.2.6.1) >> trying: exceptions-0.8.0.2 (dependency of shakespeare-2.0.5) >> trying: transformers-compat-0.4.0.4 (dependency of exceptions-0.8.0.2) >> trying: transformers-compat-0.4.0.4:-two >> rejecting: transformers-compat-0.4.0.4:-three (conflict: mtl => >> transformers==0.3.0.0/installed-16a..., >> transformers-compat-0.4.0.4:three => >> transformers>=0.4.1 && <0.5) >> rejecting: transformers-compat-0.4.0.4:+three (manual flag can only be >> changed >> explicitly) >> Backjump limit reached (change with --max-backjumps). >> >> Note: when using a sandbox, all packages are required to have consistent >> dependencies. Try reinstalling/unregistering the offending packages or >> recreating the sandbox. >> >> -- >> Public key ID: E8FE60D7 >> Public key server: see, e.g., hkp://keys.gnupg.net >> >> On Thu, Jun 18, 2015 at 4:46 PM, Christopher Allen >> wrote: >> >>> If you won't use a sandbox, then lets nuke your user package-db and >>> start from scratch: >>> >>> rm -rf ~/.ghc >>> cabal install yesod==1.2.6.1 >>> >>> On Thu, Jun 18, 2015 at 3:28 PM, Miguel A. Santos < >>> miguel.a.santos.l at gmail.com> wrote: >>> >>>> I haven't yet read how to use sandboxes, so, no, that I tried just like >>>> that cabal install... >>>> I did check first that cabal info yesod was saying I didn't have it >>>> install. But now that you mention it, I did >>>> may have had other packages lingering around from my last attempt of >>>> installing yesod. >>>> >>>> Meanwhile I did run forcing the install of 1.4.0... >>>> Ah, it finished with cabal install --force-reinstalls yesod-1.4.0 and... >>>> it complains about the shakespeare. >>>> >>>> "shakespeare-2.0.5 failed during the building phase. The exception was: >>>> ExitFailure 1" >>>> >>>> Below the full output. >>>> >>>> I'll give a try to the sandbox solution. >>>> >>>> ------------------------------------------------ >>>> msantos at MBP-2[16:09]:~/System/YESOD$cabal install --force-reinstalls >>>> yesod-1.4.0 >>>> Resolving dependencies... >>>> Warning: The following packages are likely to be broken by the >>>> reinstalls: >>>> pandoc-citeproc-0.7.1.1 >>>> pandoc-1.14.0.4 >>>> project-template-0.2.0 >>>> http-reverse-proxy-0.4.2 >>>> Continuing even though the plan contains dangerous reinstalls. >>>> Downloading monad-control-0.3.3.1... >>>> Configuring shakespeare-2.0.5... >>>> Configuring monad-control-0.3.3.1... >>>> Building monad-control-0.3.3.1... >>>> Building shakespeare-2.0.5... >>>> Installed monad-control-0.3.3.1 >>>> Configuring lifted-base-0.2.3.6... >>>> Building lifted-base-0.2.3.6... >>>> Configuring resource-pool-0.2.3.2... >>>> Installed lifted-base-0.2.3.6 >>>> Building resource-pool-0.2.3.2... >>>> Installed resource-pool-0.2.3.2 >>>> Configuring enclosed-exceptions-1.0.1.1... >>>> Building enclosed-exceptions-1.0.1.1... >>>> Configuring resourcet-1.1.5... >>>> Installed enclosed-exceptions-1.0.1.1 >>>> Building resourcet-1.1.5... >>>> Failed to install shakespeare-2.0.5 >>>> Build log ( /Users/msantos/.cabal/logs/shakespeare-2.0.5.log ): >>>> Configuring shakespeare-2.0.5... >>>> Building shakespeare-2.0.5... >>>> Preprocessing library shakespeare-2.0.5... >>>> [ 1 of 17] Compiling Text.MkSizeType ( Text/MkSizeType.hs, >>>> dist/build/Text/MkSizeType.o ) >>>> [ 2 of 17] Compiling Text.IndentToBrace ( Text/IndentToBrace.hs, >>>> dist/build/Text/IndentToBrace.o ) >>>> [ 3 of 17] Compiling Text.Shakespeare.Base ( Text/Shakespeare/Base.hs, >>>> dist/build/Text/Shakespeare/Base.o ) >>>> [ 4 of 17] Compiling Text.Hamlet.Parse ( Text/Hamlet/Parse.hs, >>>> dist/build/Text/Hamlet/Parse.o ) >>>> [ 5 of 17] Compiling Text.Hamlet ( Text/Hamlet.hs, >>>> dist/build/Text/Hamlet.o ) >>>> >>>> Text/Hamlet.hs:402:1: Warning: Defined but not used: ?varName? >>>> >>>> Text/Hamlet.hs:406:1: Warning: Defined but not used: ?strToExp? >>>> >>>> Text/Hamlet.hs:439:16: Warning: Defined but not used: ?html? >>>> >>>> Text/Hamlet.hs:440:14: Warning: Defined but not used: ?url? >>>> >>>> Text/Hamlet.hs:441:19: Warning: Defined but not used: ?url? >>>> >>>> Text/Hamlet.hs:442:16: Warning: Defined but not used: ?url? >>>> >>>> Text/Hamlet.hs:443:20: Warning: Defined but not used: ?msg_url? >>>> >>>> Text/Hamlet.hs:444:14: Warning: Defined but not used: ?msg? >>>> >>>> Text/Hamlet.hs:488:43: Warning: >>>> This binding for ?c? shadows the existing binding >>>> bound at Text/Hamlet.hs:484:13 >>>> [ 6 of 17] Compiling Text.Hamlet.RT ( Text/Hamlet/RT.hs, >>>> dist/build/Text/Hamlet/RT.o ) >>>> >>>> Text/Hamlet/RT.hs:78:13: Warning: Defined but not used: ?x? >>>> >>>> Text/Hamlet/RT.hs:78:26: Warning: Defined but not used: ?deref? >>>> >>>> Text/Hamlet/RT.hs:78:45: Warning: Defined but not used: ?docs? >>>> >>>> Text/Hamlet/RT.hs:85:13: Warning: Defined but not used: ?x? >>>> >>>> Text/Hamlet/RT.hs:85:25: Warning: Defined but not used: ?deref? >>>> >>>> Text/Hamlet/RT.hs:85:44: Warning: Defined but not used: ?jdocs? >>>> >>>> Text/Hamlet/RT.hs:85:50: Warning: Defined but not used: ?ndocs? >>>> >>>> Text/Hamlet/RT.hs:115:37: Warning: >>>> This binding for ?x? shadows the existing binding >>>> bound at Text/Hamlet/RT.hs:108:13 >>>> [ 7 of 17] Compiling Text.Shakespeare ( Text/Shakespeare.hs, >>>> dist/build/Text/Shakespeare.o ) >>>> [ 8 of 17] Compiling Text.Shakespeare.Text ( Text/Shakespeare/Text.hs, >>>> dist/build/Text/Shakespeare/Text.o ) >>>> [ 9 of 17] Compiling Text.Julius ( Text/Julius.hs, >>>> dist/build/Text/Julius.o ) >>>> >>>> Text/Julius.hs:90:63: Warning: >>>> In the use of ?fromValue? (imported from Data.Aeson.Encode): >>>> Deprecated: "Use 'encodeToTextBuilder' instead" >>>> [10 of 17] Compiling Text.Roy ( Text/Roy.hs, >>>> dist/build/Text/Roy.o ) >>>> [11 of 17] Compiling Text.Coffee ( Text/Coffee.hs, >>>> dist/build/Text/Coffee.o ) >>>> [12 of 17] Compiling Text.Css ( Text/Css.hs, >>>> dist/build/Text/Css.o ) >>>> >>>> Text/Css.hs:349:40: Warning: Defined but not used: ?subblocks? >>>> >>>> Text/Css.hs:367:5: Warning: Defined but not used: ?subGo? >>>> [13 of 17] Compiling Text.CssCommon ( Text/CssCommon.hs, >>>> dist/build/Text/CssCommon.o ) >>>> Loading package ghc-prim ... linking ... done. >>>> Loading package integer-gmp ... linking ... done. >>>> Loading package base ... linking ... done. >>>> Loading package array-0.5.0.0 ... linking ... done. >>>> Loading package deepseq-1.3.0.2 ... linking ... done. >>>> Loading package filepath-1.3.0.2 ... linking ... done. >>>> Loading package old-locale-1.0.0.6 ... linking ... done. >>>> Loading package time-1.4.2 ... linking ... done. >>>> Loading package bytestring-0.10.4.0 ... linking ... done. >>>> Loading package unix-2.7.0.1 ... linking ... done. >>>> Loading package directory-1.2.1.0 ... linking ... done. >>>> Loading package process-1.2.0.0 ... linking ... done. >>>> Loading package transformers-0.3.0.0 ... linking ... done. >>>> Loading package mtl-2.1.3.1 ... linking ... done. >>>> Loading package text-1.1.0.0 ... linking ... done. >>>> Loading package parsec-3.1.5 ... : can't load .so/.DLL >>>> for: >>>> /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib >>>> (dlopen(/Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib, >>>> 9): Library not loaded: @rpath/libHStext-1.1.0.0-ghc7.8.3.dylib >>>> Referenced from: >>>> /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib >>>> Reason: image not found) >>>> Installed resourcet-1.1.5 >>>> Configuring wai-extra-3.0.7.1... >>>> Configuring conduit-1.2.4.2... >>>> Building conduit-1.2.4.2... >>>> Building wai-extra-3.0.7.1... >>>> Installed conduit-1.2.4.2 >>>> Configuring conduit-extra-1.1.9... >>>> Building conduit-extra-1.1.9... >>>> Configuring http-conduit-2.1.5... >>>> Installed wai-extra-3.0.7.1 >>>> Building http-conduit-2.1.5... >>>> Configuring yaml-0.8.11... >>>> Installed http-conduit-2.1.5 >>>> Building yaml-0.8.11... >>>> Installed conduit-extra-1.1.9 >>>> Configuring monad-logger-0.3.13.1... >>>> Building monad-logger-0.3.13.1... >>>> Configuring xml-conduit-1.3.0... >>>> Installed monad-logger-0.3.13.1 >>>> Building xml-conduit-1.3.0... >>>> Installed yaml-0.8.11 >>>> Configuring persistent-2.1.6... >>>> Building persistent-2.1.6... >>>> Installed xml-conduit-1.3.0 >>>> Configuring tagstream-conduit-0.5.5.3... >>>> Building tagstream-conduit-0.5.5.3... >>>> Installed tagstream-conduit-0.5.5.3 >>>> Configuring authenticate-1.3.2.11... >>>> Building authenticate-1.3.2.11... >>>> Installed authenticate-1.3.2.11 >>>> Installed persistent-2.1.6 >>>> Configuring persistent-template-2.1.3.3... >>>> Building persistent-template-2.1.3.3... >>>> Installed persistent-template-2.1.3.3 >>>> Updating documentation index >>>> /Users/msantos/Library/Haskell/share/doc/x86_64-osx-ghc-7.8.3/index.html >>>> cabal: Error: some packages failed to install: >>>> shakespeare-2.0.5 failed during the building phase. The exception was: >>>> ExitFailure 1 >>>> yesod-1.4.0 depends on shakespeare-2.0.5 which failed to install. >>>> yesod-auth-1.4.5 depends on shakespeare-2.0.5 which failed to install. >>>> yesod-core-1.4.9.1 depends on shakespeare-2.0.5 which failed to install. >>>> yesod-form-1.4.4.1 depends on shakespeare-2.0.5 which failed to install. >>>> yesod-persistent-1.4.0.2 depends on shakespeare-2.0.5 which failed to >>>> install. >>>> >>>> >>>> -- >>>> Public key ID: E8FE60D7 >>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>> >>>> On Thu, Jun 18, 2015 at 4:16 PM, Christopher Allen >>>> wrote: >>>> >>>>> Some of that looks like churn from trying to install an older version >>>>> of Yesod over a newer one. Are you using a sandbox? if so, did you wipe it >>>>> out before attempting Yesod 1.2.6.1? What we'd be looking for is a package >>>>> conflict that tells you which package of what version that is globally >>>>> installed is causing the conflict. >>>>> >>>>> Insta-Yesodian conflict implies you're reinstalling into a not-fresh >>>>> packgage-db which means you either need to wipe your user package-db or use >>>>> a sandbox. (I recommend the latter). >>>>> >>>>> If you haven't done so, do that, then re-attempt that version of Yesod >>>>> (1.2.6.1). >>>>> >>>>> >>>>> >>>>> On Thu, Jun 18, 2015 at 2:57 PM, Miguel A. Santos < >>>>> miguel.a.santos.l at gmail.com> wrote: >>>>> >>>>>> Thanks! No problem. I gave a try to your suggestion. It doesn't look >>>>>> I'll get yesod installed without "paying" >>>>>> a bigger price than just "downgrading". :-/ >>>>>> >>>>>> Yesod 1.4.0 warns that forcing installing it will likely break >>>>>> pandoc, among other things. >>>>>> I can give it a try though, but I really use pandoc regularly. Plus, >>>>>> it's still not clear that the building process >>>>>> will not fail. And installing pandoc took me surprisingly a lot of >>>>>> time last time. >>>>>> >>>>>> Forcing Yesod-1.2.6.1 won't allow cabal to satisfy the dependencies. >>>>>> >>>>>> I guess I could keep trying other versions and see. But I think I'll >>>>>> try the 1.4.0 first. Will post here >>>>>> the results so that at least others may hopefully benefit from this. >>>>>> >>>>>> >>>>>> ----------------------------------------------------------------------------------------- >>>>>> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.4.0 >>>>>> Resolving dependencies... >>>>>> In order, the following would be installed: >>>>>> monad-control-0.3.3.1 (latest: 1.0.0.4) (via: yesod-1.4.0 >>>>>> yesod-core-1.4.9.1 authenticate-1.3.2.11 xml-conduit-1.3.0 >>>>>> persistent-template-2.1.3.3 persistent-2.1.6 monad-logger-0.3.13.1 >>>>>> http-conduit-2.1.5 conduit-extra-1.1.9 resourcet-1.1.5 >>>>>> resource-pool-0.2.3.2 enclosed-exceptions-1.0.1.1 lifted-base-0.2.3.6) (new >>>>>> version) >>>>>> lifted-base-0.2.3.6 (via: yesod-auth-1.4.5 yesod-core-1.4.9.1 >>>>>> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 >>>>>> conduit-1.2.4.2 resourcet-1.1.5 enclosed-exceptions-1.0.1.1) (reinstall) >>>>>> (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>>>> enclosed-exceptions-1.0.1.1 (via: yaml-0.8.11) (reinstall) (changes: >>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>>> resource-pool-0.2.3.2 (via: yesod-persistent-1.4.0.2 >>>>>> persistent-2.1.6) (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>>>> resourcet-1.1.5 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 >>>>>> yesod-persistent-1.4.0.2 yesod-core-1.4.9.1 yaml-0.8.11 >>>>>> authenticate-1.3.2.11 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 >>>>>> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 >>>>>> conduit-extra-1.1.9 conduit-1.2.4.2) (reinstall) (changes: >>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>>> conduit-1.2.4.2 (via: yesod-auth-1.4.5 yesod-persistent-1.4.0.2 >>>>>> yesod-core-1.4.9.1 yaml-0.8.11 authenticate-1.3.2.11 >>>>>> tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 persistent-2.1.6 >>>>>> monad-logger-0.3.13.1 http-conduit-2.1.5 conduit-extra-1.1.9) (reinstall) >>>>>> conduit-extra-1.1.9 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>>> yesod-core-1.4.9.1 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 >>>>>> monad-logger-0.3.13.1) (reinstall) (changes: monad-control-1.0.0.4 -> >>>>>> 0.3.3.1) >>>>>> http-conduit-2.1.5 (via: yesod-auth-1.4.5 authenticate-1.3.2.11) >>>>>> (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>>>> monad-logger-0.3.13.1 (via: yesod-1.4.0 yesod-core-1.4.9.1 >>>>>> persistent-template-2.1.3.3 persistent-2.1.6) (reinstall) (changes: >>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>>> persistent-2.1.6 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 >>>>>> yesod-persistent-1.4.0.2 persistent-template-2.1.3.3) (reinstall) (changes: >>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>>> persistent-template-2.1.3.3 (via: yesod-auth-1.4.5 >>>>>> yesod-persistent-1.4.0.2) (reinstall) (changes: monad-control-1.0.0.4 -> >>>>>> 0.3.3.1) >>>>>> shakespeare-2.0.5 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>>> yesod-form-1.4.4.1 yesod-core-1.4.9.1) (new package) >>>>>> wai-extra-3.0.7.1 (via: yesod-1.4.0 yesod-core-1.4.9.1) (reinstall) >>>>>> xml-conduit-1.3.0 (via: authenticate-1.3.2.11 >>>>>> tagstream-conduit-0.5.5.3) (reinstall) (changes: monad-control-1.0.0.4 -> >>>>>> 0.3.3.1) >>>>>> tagstream-conduit-0.5.5.3 (via: authenticate-1.3.2.11) (reinstall) >>>>>> authenticate-1.3.2.11 (via: yesod-auth-1.4.5) (reinstall) (changes: >>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>>> yaml-0.8.11 (via: yesod-1.4.0) (reinstall) >>>>>> yesod-core-1.4.9.1 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>>> yesod-form-1.4.4.1 yesod-persistent-1.4.0.2) (new package) >>>>>> yesod-persistent-1.4.0.2 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>>> yesod-form-1.4.4.1) (new package) >>>>>> yesod-form-1.4.4.1 (via: yesod-1.4.0 yesod-auth-1.4.5) (new package) >>>>>> yesod-auth-1.4.5 (via: yesod-1.4.0) (new package) >>>>>> yesod-1.4.0 (latest: 1.4.1.5) (new package) >>>>>> cabal: The following packages are likely to be broken by the >>>>>> reinstalls: >>>>>> pandoc-citeproc-0.7.1.1 >>>>>> pandoc-1.14.0.4 >>>>>> project-template-0.2.0 >>>>>> http-reverse-proxy-0.4.2 >>>>>> Use --force-reinstalls if you want to install anyway. >>>>>> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.2.6.1 >>>>>> Resolving dependencies... >>>>>> cabal: Could not resolve dependencies: >>>>>> next goal: yesod (user goal) >>>>>> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, >>>>>> 1.4.0 >>>>>> (global constraint requires ==1.2.6.1) >>>>>> trying: yesod-1.2.6.1 >>>>>> trying: streaming-commons-0.1.12.1/installed-200... (dependency of >>>>>> yesod-1.2.6.1) >>>>>> trying: warp-3.0.13.1/installed-150... (dependency of yesod-1.2.6.1) >>>>>> next goal: yesod-form (dependency of yesod-1.2.6.1) >>>>>> rejecting: yesod-form-1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2.1, 1.4.2, >>>>>> 1.4.1.1, >>>>>> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => yesod-form>=1.3 && >>>>>> <1.4) >>>>>> trying: yesod-form-1.3.16 >>>>>> next goal: persistent (dependency of yesod-form-1.3.16) >>>>>> rejecting: persistent-2.1.6/installed-4f9..., 2.1.6, 2.1.5, 2.1.4, >>>>>> 2.1.3, >>>>>> 2.1.2, 2.1.1.7, 2.1.1.6, 2.1.1.5, 2.1.1.4, 2.1.1.3, 2.1.1.2, 2.1.1.1, >>>>>> 2.1.1, >>>>>> 2.1.0.2, 2.1.0.1, 2.1 (conflict: yesod-form => persistent>=1.2 && >>>>>> <2.1) >>>>>> trying: persistent-1.3.3 >>>>>> trying: path-pieces-0.2.0/installed-533... (dependency of >>>>>> persistent-1.3.3) >>>>>> next goal: yesod-core (dependency of yesod-1.2.6.1) >>>>>> rejecting: yesod-core-1.4.9.1, 1.4.9, 1.4.8.3, 1.4.8.2, 1.4.8.1, >>>>>> 1.4.8, >>>>>> 1.4.7.3, 1.4.7.2, 1.4.7.1, 1.4.7, 1.4.6.2, 1.4.6.1, 1.4.6, 1.4.5, >>>>>> 1.4.4.5, >>>>>> 1.4.4.4, 1.4.4.3, 1.4.4.2, 1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2, >>>>>> 1.4.1.1, >>>>>> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => yesod-core>=1.2.2 >>>>>> && <1.3) >>>>>> rejecting: yesod-core-1.2.20.1, 1.2.20, 1.2.19.2, 1.2.19.1, 1.2.19, >>>>>> 1.2.18, >>>>>> 1.2.17, 1.2.16.1, 1.2.16, 1.2.15.2, 1.2.15.1, 1.2.15, 1.2.14, >>>>>> 1.2.13.1, >>>>>> 1.2.13, 1.2.12, 1.2.11.1, 1.2.11, 1.2.10, 1.2.9.2, 1.2.9.1, 1.2.9, >>>>>> 1.2.8, >>>>>> 1.2.7, 1.2.6.7, 1.2.6.6, 1.2.6.5, 1.2.6.4, 1.2.6.3, 1.2.6.2, 1.2.6.1 >>>>>> (conflict: path-pieces==0.2.0/installed-533..., yesod-core => >>>>>> path-pieces>=0.1.2 && <0.2) >>>>>> rejecting: yesod-core-1.2.6 (conflict: streaming-commons => >>>>>> text==1.1.0.0/installed-9bd..., yesod-core => text>=0.7 && <0.12) >>>>>> rejecting: yesod-core-1.2.5, 1.2.4.5, 1.2.4.4, 1.2.4.3, 1.2.4.2, >>>>>> 1.2.4.1, >>>>>> 1.2.4, 1.2.3, 1.2.2 (conflict: warp => wai==3.0.2.3/installed-39c..., >>>>>> yesod-core => wai>=1.4 && <1.5) >>>>>> rejecting: yesod-core-1.2.1, 1.2.0.4, 1.2.0.3, 1.2.0.2, 1.2.0.1, >>>>>> 1.2.0, >>>>>> 1.1.8.3, 1.1.8.2, 1.1.8.1, 1.1.8, 1.1.7.2, 1.1.7.1, 1.1.7, 1.1.6.1, >>>>>> 1.1.6, >>>>>> 1.1.5, 1.1.4.2, 1.1.4.1, 1.1.4, 1.1.3.1, 1.1.3, 1.1.2.2, 1.1.2.1, >>>>>> 1.1.2, >>>>>> 1.1.1.2, 1.1.1.1, 1.1.1, 1.1.0.1, 1.1.0, 1.0.1.3, 1.0.1.2, 1.0.1.1, >>>>>> 1.0.1, >>>>>> 1.0.0.2, 1.0.0.1, 1.0.0, 0.10.3, 0.10.2.2, 0.10.2.1, 0.10.2, 0.10.1, >>>>>> 0.9.4.1, >>>>>> 0.9.4, 0.9.3.6, 0.9.3.5, 0.9.3.4, 0.9.3.3, 0.9.3.2, 0.9.3.1, 0.9.3, >>>>>> 0.9.2, >>>>>> 0.9.1.1, 0.9.1, 0.8.3.2, 0.8.3.1, 0.8.3, 0.8.2, 0.8.1, 0.8.0.1, 0.8.0, >>>>>> 0.7.0.2, 0.7.0.1, 0.7.0 (conflict: yesod => yesod-core>=1.2.2 && <1.3) >>>>>> Backjump limit reached (change with --max-backjumps). >>>>>> >>>>>> -- >>>>>> Public key ID: E8FE60D7 >>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>> >>>>>> On Thu, Jun 18, 2015 at 3:32 PM, Christopher Allen >>>>> > wrote: >>>>>> >>>>>>> Ah that's frustrating, that's my mistake ? I'm sorry. I thought you >>>>>>> were talking about GHC for Mac OS X not being available for your OS version >>>>>>> either. >>>>>>> >>>>>>> Your best bet on HP is to specify an older version of Yesod that >>>>>>> will work with the dependencies that your version of HP comes with. >>>>>>> >>>>>>> On Thu, Jun 18, 2015 at 2:08 PM, Miguel A. Santos < >>>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>>> >>>>>>>> Indeed I saw that. That's what I meant with the bindist not being >>>>>>>> available for OSX 10.6.8; only for 10.7+ >>>>>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#macosx_x86_64 >>>>>>>> My bad, I should have said it before. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Public key ID: E8FE60D7 >>>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>>>> >>>>>>>> On Thu, Jun 18, 2015 at 2:36 PM, Christopher Allen < >>>>>>>> cma at bitemyapp.com> wrote: >>>>>>>> >>>>>>>>> Did you see that the Mac instructions said to follow the "other >>>>>>>>> *nix" instructions if you were using an older version of Mac OS X? >>>>>>>>> >>>>>>>>> Those link here: >>>>>>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#binaries >>>>>>>>> >>>>>>>>> Get rid of all that (GHC, HP, Cabal), then install GHC using the >>>>>>>>> bindist for Mac OS X linked above. >>>>>>>>> >>>>>>>>> On Thu, Jun 18, 2015 at 1:14 PM, Miguel A. Santos < >>>>>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>>>>> >>>>>>>>>> That is obviously a typo: I meant I *did* do a fresh install of >>>>>>>>>> the Haskell Platform and cabal before >>>>>>>>>> trying -and failing- to install yesod. >>>>>>>>>> >>>>>>>>>> On Thu, Jun 18, 2015 at 1:38 PM, Miguel A. Santos < >>>>>>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> This corresponds to a fresh install of the HP, ghc, and cabal I >>>>>>>>>>> didn't before trying to install yesod. >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Public key ID: E8FE60D7 >>>>>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Haskell-Cafe mailing list >>>>>>>>>> Haskell-Cafe at haskell.org >>>>>>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Chris Allen >>>>>>>>> Currently working on http://haskellbook.com >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Chris Allen >>>>>>> Currently working on http://haskellbook.com >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Chris Allen >>>>> Currently working on http://haskellbook.com >>>>> >>>> >>>> >>> >>> >>> -- >>> Chris Allen >>> Currently working on http://haskellbook.com >>> >> >> > > > -- > Chris Allen > Currently working on http://haskellbook.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From miguel.a.santos.l at gmail.com Thu Jun 18 22:22:23 2015 From: miguel.a.santos.l at gmail.com (Miguel A. Santos) Date: Thu, 18 Jun 2015 18:22:23 -0400 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: One more detail about my try with rm ~/.ghc: I find it curious that I didn't get that directory rebuild again when trying to install yesod. Did I miss something? -- Public key ID: E8FE60D7 Public key server: see, e.g., hkp://keys.gnupg.net On Thu, Jun 18, 2015 at 6:18 PM, Miguel A. Santos < miguel.a.santos.l at gmail.com> wrote: > Ok, removing ~/.ghc (actually just moving it to ~/.ghc-org) didn't work > either. The detailed output is below > but from a cursory view it seems not much better than within the sandbox > try before. > > I understand I'm staying in the "past" and with that comes problems like > this one, but upgrading to Yellowstone > is not an option for me. > > I have some questions about your other options. In particular, I'm not > sure what you mean by (capitals) GHC. > I thought that's just the compiler. I don't understand your first sentence > after "vanilla". What is what I got > with HP if not GHC for MacOSX!? > > About point 2., I'm building (already for hours, that's the 'other' > process I'd running) ghc from the tarball ghc-7.8.4-src.tar.bz2 available > at the bottom of that same link we mentioned before, namely, > https://www.haskell.org/ghc/download_ghc_7_8_4#binaries Is this the same > as what you mean by this 2nd option? Mind you I'm already using version > 7.8.3. How will a new version of the compiler change what looks like a > compatibility problem with a package? or you mean it is not that simple? > > Option 3: It seems to me I may as well just remove everything, install HP > again (already downloaded) and after > that step finishes, trying installing right away yesod, before I try with > any other packages. Seems a path based > mostly on blind hope than logic to me :-p as the only big thing I > installed between my fresh install of HP and my initial try of yesod was > pandoc, which had some large dependencies to deal with. But it's a simple > one, so I may check it definitely out > of the equation. > > Option 4: I guess this is something I can try right away without much > effort. To be concrete you mean then > cabal install --allow-newer yesod ? > > Btw, thanks so much for your prompt help! > > -------------------------------------------- > msantos at MBP-2[17:09]:~/System/YESOD$mv ~/.ghc/ ~/.ghc-org > msantos at MBP-2[17:30]:~$cabal install yesod==1.2.6.1 > Warning: The package list for 'hackage.haskell.org' is 15.0 days old. > Run 'cabal update' to get the latest list of available packages. > Resolving dependencies... > cabal: Could not resolve dependencies: > next goal: yesod (user goal) > rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, 1.4.0 > (global constraint requires ==1.2.6.1) > trying: yesod-1.2.6.1 > trying: streaming-commons-0.1.12.1 (dependency of yesod-1.2.6.1) > trying: network-2.4.2.3/installed-575... (dependency of > streaming-commons-0.1.12.1) > trying: parsec-3.1.5/installed-04a... (dependency of > network-2.4.2.3/installed-575...) > trying: mtl-2.1.3.1/installed-8bc... (dependency of > parsec-3.1.5/installed-04a...) > trying: shakespeare-2.0.5 (dependency of yesod-1.2.6.1) > trying: exceptions-0.8.0.2 (dependency of shakespeare-2.0.5) > trying: transformers-compat-0.4.0.4 (dependency of exceptions-0.8.0.2) > trying: transformers-compat-0.4.0.4:-two > rejecting: transformers-compat-0.4.0.4:-three (conflict: mtl => > transformers==0.3.0.0/installed-16a..., transformers-compat-0.4.0.4:three > => > transformers>=0.4.1 && <0.5) > rejecting: transformers-compat-0.4.0.4:+three (manual flag can only be > changed > explicitly) > Backjump limit reached (change with --max-backjumps). > > -- > Public key ID: E8FE60D7 > Public key server: see, e.g., hkp://keys.gnupg.net > > On Thu, Jun 18, 2015 at 5:15 PM, Christopher Allen > wrote: > >> You don't need to rm -rf ~/.ghc if you're using a sandbox. The sandbox >> (usually) occludes the user package-db. >> >> Well, the sandbox may not have fixed the incompatibility of HP and that >> particular version of Yesod, but we're better information from the >> dependency solver. >> >> That said, this is going to simply require a lot of trial and error if >> you want to try this approach and me telling you increment/decrement >> versions isn't going to be any faster. >> >> I'd say your best options are: >> >> 1. Upgrade your installation of Mac OS X so you can use the vanilla GHC >> bindist, or even better, GHC for Mac OS X >> >> 2. Use your copy of Haskell Platform to build GHC from source and use >> that instead of GHC (possibly a quagmire, might work out okay. Will take a >> long time to build.) >> >> 3. Unregister all the unnecessary packages from your global package-db. >> Listing here: https://www.haskell.org/platform/changelog.html >> (Additional Platform Libraries, do *not* uninstall any of the core >> libraries) >> If you make a mistake you may need to reinstall Platform. >> >> 4. Give passing --allow-newer to cabal install a shot. >> >> This is rough. Not that many people on <10.7 OS X versions so there >> aren't enough squeaky wheels for this sort of thing. >> >> Sorry I couldn't do more. >> >> >> >> On Thu, Jun 18, 2015 at 3:54 PM, Miguel A. Santos < >> miguel.a.santos.l at gmail.com> wrote: >> >>> Hmm.. wouldn't that mean, I later have to reinstall all my packages? :-/ >>> >>> Meanwhile, I did try the sandbox way. It didn't work either. Briefly I >>> issued >>> cabal sandbox init >>> and then >>> cabal install yesod-1.2.6.1 >>> Details below. >>> >>> The initial complain about not being able to resolve dependencies makes >>> me think >>> I may be missing more things about working with sandboxes. Just checked >>> >>> https://www.haskell.org/cabal/users-guide/installing-packages.html#developing-with-sandboxes >>> and guessed the init would be enough. >>> >>> -------------------------------------------------------- >>> msantos at MBP-2[16:38]:~/System/YESOD/Sandbox$cabal sandbox init >>> Writing a default package environment file to >>> /Users/msantos/System/YESOD/Sandbox/cabal.sandbox.config >>> Creating a new sandbox at >>> /Users/msantos/System/YESOD/Sandbox/.cabal-sandbox >>> msantos at MBP-2[16:41]:~/System/YESOD/Sandbox$cabal install yesod-1.2.6.1 >>> Resolving dependencies... >>> cabal: Could not resolve dependencies: >>> next goal: yesod (user goal) >>> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, >>> 1.4.0 >>> (global constraint requires ==1.2.6.1) >>> trying: yesod-1.2.6.1 >>> trying: streaming-commons-0.1.12.1 (dependency of yesod-1.2.6.1) >>> trying: network-2.4.2.3/installed-575... (dependency of >>> streaming-commons-0.1.12.1) >>> trying: parsec-3.1.5/installed-04a... (dependency of >>> network-2.4.2.3/installed-575...) >>> trying: mtl-2.1.3.1/installed-8bc... (dependency of >>> parsec-3.1.5/installed-04a...) >>> trying: shakespeare-2.0.5 (dependency of yesod-1.2.6.1) >>> trying: exceptions-0.8.0.2 (dependency of shakespeare-2.0.5) >>> trying: transformers-compat-0.4.0.4 (dependency of exceptions-0.8.0.2) >>> trying: transformers-compat-0.4.0.4:-two >>> rejecting: transformers-compat-0.4.0.4:-three (conflict: mtl => >>> transformers==0.3.0.0/installed-16a..., >>> transformers-compat-0.4.0.4:three => >>> transformers>=0.4.1 && <0.5) >>> rejecting: transformers-compat-0.4.0.4:+three (manual flag can only be >>> changed >>> explicitly) >>> Backjump limit reached (change with --max-backjumps). >>> >>> Note: when using a sandbox, all packages are required to have consistent >>> dependencies. Try reinstalling/unregistering the offending packages or >>> recreating the sandbox. >>> >>> -- >>> Public key ID: E8FE60D7 >>> Public key server: see, e.g., hkp://keys.gnupg.net >>> >>> On Thu, Jun 18, 2015 at 4:46 PM, Christopher Allen >>> wrote: >>> >>>> If you won't use a sandbox, then lets nuke your user package-db and >>>> start from scratch: >>>> >>>> rm -rf ~/.ghc >>>> cabal install yesod==1.2.6.1 >>>> >>>> On Thu, Jun 18, 2015 at 3:28 PM, Miguel A. Santos < >>>> miguel.a.santos.l at gmail.com> wrote: >>>> >>>>> I haven't yet read how to use sandboxes, so, no, that I tried just >>>>> like that cabal install... >>>>> I did check first that cabal info yesod was saying I didn't have it >>>>> install. But now that you mention it, I did >>>>> may have had other packages lingering around from my last attempt of >>>>> installing yesod. >>>>> >>>>> Meanwhile I did run forcing the install of 1.4.0... >>>>> Ah, it finished with cabal install --force-reinstalls yesod-1.4.0 >>>>> and... >>>>> it complains about the shakespeare. >>>>> >>>>> "shakespeare-2.0.5 failed during the building phase. The exception was: >>>>> ExitFailure 1" >>>>> >>>>> Below the full output. >>>>> >>>>> I'll give a try to the sandbox solution. >>>>> >>>>> ------------------------------------------------ >>>>> msantos at MBP-2[16:09]:~/System/YESOD$cabal install --force-reinstalls >>>>> yesod-1.4.0 >>>>> Resolving dependencies... >>>>> Warning: The following packages are likely to be broken by the >>>>> reinstalls: >>>>> pandoc-citeproc-0.7.1.1 >>>>> pandoc-1.14.0.4 >>>>> project-template-0.2.0 >>>>> http-reverse-proxy-0.4.2 >>>>> Continuing even though the plan contains dangerous reinstalls. >>>>> Downloading monad-control-0.3.3.1... >>>>> Configuring shakespeare-2.0.5... >>>>> Configuring monad-control-0.3.3.1... >>>>> Building monad-control-0.3.3.1... >>>>> Building shakespeare-2.0.5... >>>>> Installed monad-control-0.3.3.1 >>>>> Configuring lifted-base-0.2.3.6... >>>>> Building lifted-base-0.2.3.6... >>>>> Configuring resource-pool-0.2.3.2... >>>>> Installed lifted-base-0.2.3.6 >>>>> Building resource-pool-0.2.3.2... >>>>> Installed resource-pool-0.2.3.2 >>>>> Configuring enclosed-exceptions-1.0.1.1... >>>>> Building enclosed-exceptions-1.0.1.1... >>>>> Configuring resourcet-1.1.5... >>>>> Installed enclosed-exceptions-1.0.1.1 >>>>> Building resourcet-1.1.5... >>>>> Failed to install shakespeare-2.0.5 >>>>> Build log ( /Users/msantos/.cabal/logs/shakespeare-2.0.5.log ): >>>>> Configuring shakespeare-2.0.5... >>>>> Building shakespeare-2.0.5... >>>>> Preprocessing library shakespeare-2.0.5... >>>>> [ 1 of 17] Compiling Text.MkSizeType ( Text/MkSizeType.hs, >>>>> dist/build/Text/MkSizeType.o ) >>>>> [ 2 of 17] Compiling Text.IndentToBrace ( Text/IndentToBrace.hs, >>>>> dist/build/Text/IndentToBrace.o ) >>>>> [ 3 of 17] Compiling Text.Shakespeare.Base ( Text/Shakespeare/Base.hs, >>>>> dist/build/Text/Shakespeare/Base.o ) >>>>> [ 4 of 17] Compiling Text.Hamlet.Parse ( Text/Hamlet/Parse.hs, >>>>> dist/build/Text/Hamlet/Parse.o ) >>>>> [ 5 of 17] Compiling Text.Hamlet ( Text/Hamlet.hs, >>>>> dist/build/Text/Hamlet.o ) >>>>> >>>>> Text/Hamlet.hs:402:1: Warning: Defined but not used: ?varName? >>>>> >>>>> Text/Hamlet.hs:406:1: Warning: Defined but not used: ?strToExp? >>>>> >>>>> Text/Hamlet.hs:439:16: Warning: Defined but not used: ?html? >>>>> >>>>> Text/Hamlet.hs:440:14: Warning: Defined but not used: ?url? >>>>> >>>>> Text/Hamlet.hs:441:19: Warning: Defined but not used: ?url? >>>>> >>>>> Text/Hamlet.hs:442:16: Warning: Defined but not used: ?url? >>>>> >>>>> Text/Hamlet.hs:443:20: Warning: Defined but not used: ?msg_url? >>>>> >>>>> Text/Hamlet.hs:444:14: Warning: Defined but not used: ?msg? >>>>> >>>>> Text/Hamlet.hs:488:43: Warning: >>>>> This binding for ?c? shadows the existing binding >>>>> bound at Text/Hamlet.hs:484:13 >>>>> [ 6 of 17] Compiling Text.Hamlet.RT ( Text/Hamlet/RT.hs, >>>>> dist/build/Text/Hamlet/RT.o ) >>>>> >>>>> Text/Hamlet/RT.hs:78:13: Warning: Defined but not used: ?x? >>>>> >>>>> Text/Hamlet/RT.hs:78:26: Warning: Defined but not used: ?deref? >>>>> >>>>> Text/Hamlet/RT.hs:78:45: Warning: Defined but not used: ?docs? >>>>> >>>>> Text/Hamlet/RT.hs:85:13: Warning: Defined but not used: ?x? >>>>> >>>>> Text/Hamlet/RT.hs:85:25: Warning: Defined but not used: ?deref? >>>>> >>>>> Text/Hamlet/RT.hs:85:44: Warning: Defined but not used: ?jdocs? >>>>> >>>>> Text/Hamlet/RT.hs:85:50: Warning: Defined but not used: ?ndocs? >>>>> >>>>> Text/Hamlet/RT.hs:115:37: Warning: >>>>> This binding for ?x? shadows the existing binding >>>>> bound at Text/Hamlet/RT.hs:108:13 >>>>> [ 7 of 17] Compiling Text.Shakespeare ( Text/Shakespeare.hs, >>>>> dist/build/Text/Shakespeare.o ) >>>>> [ 8 of 17] Compiling Text.Shakespeare.Text ( Text/Shakespeare/Text.hs, >>>>> dist/build/Text/Shakespeare/Text.o ) >>>>> [ 9 of 17] Compiling Text.Julius ( Text/Julius.hs, >>>>> dist/build/Text/Julius.o ) >>>>> >>>>> Text/Julius.hs:90:63: Warning: >>>>> In the use of ?fromValue? (imported from Data.Aeson.Encode): >>>>> Deprecated: "Use 'encodeToTextBuilder' instead" >>>>> [10 of 17] Compiling Text.Roy ( Text/Roy.hs, >>>>> dist/build/Text/Roy.o ) >>>>> [11 of 17] Compiling Text.Coffee ( Text/Coffee.hs, >>>>> dist/build/Text/Coffee.o ) >>>>> [12 of 17] Compiling Text.Css ( Text/Css.hs, >>>>> dist/build/Text/Css.o ) >>>>> >>>>> Text/Css.hs:349:40: Warning: Defined but not used: ?subblocks? >>>>> >>>>> Text/Css.hs:367:5: Warning: Defined but not used: ?subGo? >>>>> [13 of 17] Compiling Text.CssCommon ( Text/CssCommon.hs, >>>>> dist/build/Text/CssCommon.o ) >>>>> Loading package ghc-prim ... linking ... done. >>>>> Loading package integer-gmp ... linking ... done. >>>>> Loading package base ... linking ... done. >>>>> Loading package array-0.5.0.0 ... linking ... done. >>>>> Loading package deepseq-1.3.0.2 ... linking ... done. >>>>> Loading package filepath-1.3.0.2 ... linking ... done. >>>>> Loading package old-locale-1.0.0.6 ... linking ... done. >>>>> Loading package time-1.4.2 ... linking ... done. >>>>> Loading package bytestring-0.10.4.0 ... linking ... done. >>>>> Loading package unix-2.7.0.1 ... linking ... done. >>>>> Loading package directory-1.2.1.0 ... linking ... done. >>>>> Loading package process-1.2.0.0 ... linking ... done. >>>>> Loading package transformers-0.3.0.0 ... linking ... done. >>>>> Loading package mtl-2.1.3.1 ... linking ... done. >>>>> Loading package text-1.1.0.0 ... linking ... done. >>>>> Loading package parsec-3.1.5 ... : can't load .so/.DLL >>>>> for: >>>>> /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib >>>>> (dlopen(/Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib, >>>>> 9): Library not loaded: @rpath/libHStext-1.1.0.0-ghc7.8.3.dylib >>>>> Referenced from: >>>>> /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib >>>>> Reason: image not found) >>>>> Installed resourcet-1.1.5 >>>>> Configuring wai-extra-3.0.7.1... >>>>> Configuring conduit-1.2.4.2... >>>>> Building conduit-1.2.4.2... >>>>> Building wai-extra-3.0.7.1... >>>>> Installed conduit-1.2.4.2 >>>>> Configuring conduit-extra-1.1.9... >>>>> Building conduit-extra-1.1.9... >>>>> Configuring http-conduit-2.1.5... >>>>> Installed wai-extra-3.0.7.1 >>>>> Building http-conduit-2.1.5... >>>>> Configuring yaml-0.8.11... >>>>> Installed http-conduit-2.1.5 >>>>> Building yaml-0.8.11... >>>>> Installed conduit-extra-1.1.9 >>>>> Configuring monad-logger-0.3.13.1... >>>>> Building monad-logger-0.3.13.1... >>>>> Configuring xml-conduit-1.3.0... >>>>> Installed monad-logger-0.3.13.1 >>>>> Building xml-conduit-1.3.0... >>>>> Installed yaml-0.8.11 >>>>> Configuring persistent-2.1.6... >>>>> Building persistent-2.1.6... >>>>> Installed xml-conduit-1.3.0 >>>>> Configuring tagstream-conduit-0.5.5.3... >>>>> Building tagstream-conduit-0.5.5.3... >>>>> Installed tagstream-conduit-0.5.5.3 >>>>> Configuring authenticate-1.3.2.11... >>>>> Building authenticate-1.3.2.11... >>>>> Installed authenticate-1.3.2.11 >>>>> Installed persistent-2.1.6 >>>>> Configuring persistent-template-2.1.3.3... >>>>> Building persistent-template-2.1.3.3... >>>>> Installed persistent-template-2.1.3.3 >>>>> Updating documentation index >>>>> >>>>> /Users/msantos/Library/Haskell/share/doc/x86_64-osx-ghc-7.8.3/index.html >>>>> cabal: Error: some packages failed to install: >>>>> shakespeare-2.0.5 failed during the building phase. The exception was: >>>>> ExitFailure 1 >>>>> yesod-1.4.0 depends on shakespeare-2.0.5 which failed to install. >>>>> yesod-auth-1.4.5 depends on shakespeare-2.0.5 which failed to install. >>>>> yesod-core-1.4.9.1 depends on shakespeare-2.0.5 which failed to >>>>> install. >>>>> yesod-form-1.4.4.1 depends on shakespeare-2.0.5 which failed to >>>>> install. >>>>> yesod-persistent-1.4.0.2 depends on shakespeare-2.0.5 which failed to >>>>> install. >>>>> >>>>> >>>>> -- >>>>> Public key ID: E8FE60D7 >>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>> >>>>> On Thu, Jun 18, 2015 at 4:16 PM, Christopher Allen >>>>> wrote: >>>>> >>>>>> Some of that looks like churn from trying to install an older version >>>>>> of Yesod over a newer one. Are you using a sandbox? if so, did you wipe it >>>>>> out before attempting Yesod 1.2.6.1? What we'd be looking for is a package >>>>>> conflict that tells you which package of what version that is globally >>>>>> installed is causing the conflict. >>>>>> >>>>>> Insta-Yesodian conflict implies you're reinstalling into a not-fresh >>>>>> packgage-db which means you either need to wipe your user package-db or use >>>>>> a sandbox. (I recommend the latter). >>>>>> >>>>>> If you haven't done so, do that, then re-attempt that version of >>>>>> Yesod (1.2.6.1). >>>>>> >>>>>> >>>>>> >>>>>> On Thu, Jun 18, 2015 at 2:57 PM, Miguel A. Santos < >>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>> >>>>>>> Thanks! No problem. I gave a try to your suggestion. It doesn't look >>>>>>> I'll get yesod installed without "paying" >>>>>>> a bigger price than just "downgrading". :-/ >>>>>>> >>>>>>> Yesod 1.4.0 warns that forcing installing it will likely break >>>>>>> pandoc, among other things. >>>>>>> I can give it a try though, but I really use pandoc regularly. Plus, >>>>>>> it's still not clear that the building process >>>>>>> will not fail. And installing pandoc took me surprisingly a lot of >>>>>>> time last time. >>>>>>> >>>>>>> Forcing Yesod-1.2.6.1 won't allow cabal to satisfy the dependencies. >>>>>>> >>>>>>> I guess I could keep trying other versions and see. But I think I'll >>>>>>> try the 1.4.0 first. Will post here >>>>>>> the results so that at least others may hopefully benefit from this. >>>>>>> >>>>>>> >>>>>>> ----------------------------------------------------------------------------------------- >>>>>>> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.4.0 >>>>>>> Resolving dependencies... >>>>>>> In order, the following would be installed: >>>>>>> monad-control-0.3.3.1 (latest: 1.0.0.4) (via: yesod-1.4.0 >>>>>>> yesod-core-1.4.9.1 authenticate-1.3.2.11 xml-conduit-1.3.0 >>>>>>> persistent-template-2.1.3.3 persistent-2.1.6 monad-logger-0.3.13.1 >>>>>>> http-conduit-2.1.5 conduit-extra-1.1.9 resourcet-1.1.5 >>>>>>> resource-pool-0.2.3.2 enclosed-exceptions-1.0.1.1 lifted-base-0.2.3.6) (new >>>>>>> version) >>>>>>> lifted-base-0.2.3.6 (via: yesod-auth-1.4.5 yesod-core-1.4.9.1 >>>>>>> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 >>>>>>> conduit-1.2.4.2 resourcet-1.1.5 enclosed-exceptions-1.0.1.1) (reinstall) >>>>>>> (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>> enclosed-exceptions-1.0.1.1 (via: yaml-0.8.11) (reinstall) (changes: >>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>> resource-pool-0.2.3.2 (via: yesod-persistent-1.4.0.2 >>>>>>> persistent-2.1.6) (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>> resourcet-1.1.5 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 >>>>>>> yesod-persistent-1.4.0.2 yesod-core-1.4.9.1 yaml-0.8.11 >>>>>>> authenticate-1.3.2.11 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 >>>>>>> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 >>>>>>> conduit-extra-1.1.9 conduit-1.2.4.2) (reinstall) (changes: >>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>> conduit-1.2.4.2 (via: yesod-auth-1.4.5 yesod-persistent-1.4.0.2 >>>>>>> yesod-core-1.4.9.1 yaml-0.8.11 authenticate-1.3.2.11 >>>>>>> tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 persistent-2.1.6 >>>>>>> monad-logger-0.3.13.1 http-conduit-2.1.5 conduit-extra-1.1.9) (reinstall) >>>>>>> conduit-extra-1.1.9 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>>>> yesod-core-1.4.9.1 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 >>>>>>> monad-logger-0.3.13.1) (reinstall) (changes: monad-control-1.0.0.4 -> >>>>>>> 0.3.3.1) >>>>>>> http-conduit-2.1.5 (via: yesod-auth-1.4.5 authenticate-1.3.2.11) >>>>>>> (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>> monad-logger-0.3.13.1 (via: yesod-1.4.0 yesod-core-1.4.9.1 >>>>>>> persistent-template-2.1.3.3 persistent-2.1.6) (reinstall) (changes: >>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>> persistent-2.1.6 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 >>>>>>> yesod-persistent-1.4.0.2 persistent-template-2.1.3.3) (reinstall) (changes: >>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>> persistent-template-2.1.3.3 (via: yesod-auth-1.4.5 >>>>>>> yesod-persistent-1.4.0.2) (reinstall) (changes: monad-control-1.0.0.4 -> >>>>>>> 0.3.3.1) >>>>>>> shakespeare-2.0.5 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>>>> yesod-form-1.4.4.1 yesod-core-1.4.9.1) (new package) >>>>>>> wai-extra-3.0.7.1 (via: yesod-1.4.0 yesod-core-1.4.9.1) (reinstall) >>>>>>> xml-conduit-1.3.0 (via: authenticate-1.3.2.11 >>>>>>> tagstream-conduit-0.5.5.3) (reinstall) (changes: monad-control-1.0.0.4 -> >>>>>>> 0.3.3.1) >>>>>>> tagstream-conduit-0.5.5.3 (via: authenticate-1.3.2.11) (reinstall) >>>>>>> authenticate-1.3.2.11 (via: yesod-auth-1.4.5) (reinstall) (changes: >>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>> yaml-0.8.11 (via: yesod-1.4.0) (reinstall) >>>>>>> yesod-core-1.4.9.1 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>>>> yesod-form-1.4.4.1 yesod-persistent-1.4.0.2) (new package) >>>>>>> yesod-persistent-1.4.0.2 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>>>> yesod-form-1.4.4.1) (new package) >>>>>>> yesod-form-1.4.4.1 (via: yesod-1.4.0 yesod-auth-1.4.5) (new package) >>>>>>> yesod-auth-1.4.5 (via: yesod-1.4.0) (new package) >>>>>>> yesod-1.4.0 (latest: 1.4.1.5) (new package) >>>>>>> cabal: The following packages are likely to be broken by the >>>>>>> reinstalls: >>>>>>> pandoc-citeproc-0.7.1.1 >>>>>>> pandoc-1.14.0.4 >>>>>>> project-template-0.2.0 >>>>>>> http-reverse-proxy-0.4.2 >>>>>>> Use --force-reinstalls if you want to install anyway. >>>>>>> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.2.6.1 >>>>>>> Resolving dependencies... >>>>>>> cabal: Could not resolve dependencies: >>>>>>> next goal: yesod (user goal) >>>>>>> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, >>>>>>> 1.4.0 >>>>>>> (global constraint requires ==1.2.6.1) >>>>>>> trying: yesod-1.2.6.1 >>>>>>> trying: streaming-commons-0.1.12.1/installed-200... (dependency of >>>>>>> yesod-1.2.6.1) >>>>>>> trying: warp-3.0.13.1/installed-150... (dependency of yesod-1.2.6.1) >>>>>>> next goal: yesod-form (dependency of yesod-1.2.6.1) >>>>>>> rejecting: yesod-form-1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2.1, >>>>>>> 1.4.2, 1.4.1.1, >>>>>>> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => yesod-form>=1.3 >>>>>>> && <1.4) >>>>>>> trying: yesod-form-1.3.16 >>>>>>> next goal: persistent (dependency of yesod-form-1.3.16) >>>>>>> rejecting: persistent-2.1.6/installed-4f9..., 2.1.6, 2.1.5, 2.1.4, >>>>>>> 2.1.3, >>>>>>> 2.1.2, 2.1.1.7, 2.1.1.6, 2.1.1.5, 2.1.1.4, 2.1.1.3, 2.1.1.2, >>>>>>> 2.1.1.1, 2.1.1, >>>>>>> 2.1.0.2, 2.1.0.1, 2.1 (conflict: yesod-form => persistent>=1.2 && >>>>>>> <2.1) >>>>>>> trying: persistent-1.3.3 >>>>>>> trying: path-pieces-0.2.0/installed-533... (dependency of >>>>>>> persistent-1.3.3) >>>>>>> next goal: yesod-core (dependency of yesod-1.2.6.1) >>>>>>> rejecting: yesod-core-1.4.9.1, 1.4.9, 1.4.8.3, 1.4.8.2, 1.4.8.1, >>>>>>> 1.4.8, >>>>>>> 1.4.7.3, 1.4.7.2, 1.4.7.1, 1.4.7, 1.4.6.2, 1.4.6.1, 1.4.6, 1.4.5, >>>>>>> 1.4.4.5, >>>>>>> 1.4.4.4, 1.4.4.3, 1.4.4.2, 1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2, >>>>>>> 1.4.1.1, >>>>>>> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => yesod-core>=1.2.2 >>>>>>> && <1.3) >>>>>>> rejecting: yesod-core-1.2.20.1, 1.2.20, 1.2.19.2, 1.2.19.1, 1.2.19, >>>>>>> 1.2.18, >>>>>>> 1.2.17, 1.2.16.1, 1.2.16, 1.2.15.2, 1.2.15.1, 1.2.15, 1.2.14, >>>>>>> 1.2.13.1, >>>>>>> 1.2.13, 1.2.12, 1.2.11.1, 1.2.11, 1.2.10, 1.2.9.2, 1.2.9.1, 1.2.9, >>>>>>> 1.2.8, >>>>>>> 1.2.7, 1.2.6.7, 1.2.6.6, 1.2.6.5, 1.2.6.4, 1.2.6.3, 1.2.6.2, 1.2.6.1 >>>>>>> (conflict: path-pieces==0.2.0/installed-533..., yesod-core => >>>>>>> path-pieces>=0.1.2 && <0.2) >>>>>>> rejecting: yesod-core-1.2.6 (conflict: streaming-commons => >>>>>>> text==1.1.0.0/installed-9bd..., yesod-core => text>=0.7 && <0.12) >>>>>>> rejecting: yesod-core-1.2.5, 1.2.4.5, 1.2.4.4, 1.2.4.3, 1.2.4.2, >>>>>>> 1.2.4.1, >>>>>>> 1.2.4, 1.2.3, 1.2.2 (conflict: warp => wai==3.0.2.3/installed-39c.. >>>>>>> ., >>>>>>> yesod-core => wai>=1.4 && <1.5) >>>>>>> rejecting: yesod-core-1.2.1, 1.2.0.4, 1.2.0.3, 1.2.0.2, 1.2.0.1, >>>>>>> 1.2.0, >>>>>>> 1.1.8.3, 1.1.8.2, 1.1.8.1, 1.1.8, 1.1.7.2, 1.1.7.1, 1.1.7, 1.1.6.1, >>>>>>> 1.1.6, >>>>>>> 1.1.5, 1.1.4.2, 1.1.4.1, 1.1.4, 1.1.3.1, 1.1.3, 1.1.2.2, 1.1.2.1, >>>>>>> 1.1.2, >>>>>>> 1.1.1.2, 1.1.1.1, 1.1.1, 1.1.0.1, 1.1.0, 1.0.1.3, 1.0.1.2, 1.0.1.1, >>>>>>> 1.0.1, >>>>>>> 1.0.0.2, 1.0.0.1, 1.0.0, 0.10.3, 0.10.2.2, 0.10.2.1, 0.10.2, 0.10.1, >>>>>>> 0.9.4.1, >>>>>>> 0.9.4, 0.9.3.6, 0.9.3.5, 0.9.3.4, 0.9.3.3, 0.9.3.2, 0.9.3.1, 0.9.3, >>>>>>> 0.9.2, >>>>>>> 0.9.1.1, 0.9.1, 0.8.3.2, 0.8.3.1, 0.8.3, 0.8.2, 0.8.1, 0.8.0.1, >>>>>>> 0.8.0, >>>>>>> 0.7.0.2, 0.7.0.1, 0.7.0 (conflict: yesod => yesod-core>=1.2.2 && >>>>>>> <1.3) >>>>>>> Backjump limit reached (change with --max-backjumps). >>>>>>> >>>>>>> -- >>>>>>> Public key ID: E8FE60D7 >>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>>> >>>>>>> On Thu, Jun 18, 2015 at 3:32 PM, Christopher Allen < >>>>>>> cma at bitemyapp.com> wrote: >>>>>>> >>>>>>>> Ah that's frustrating, that's my mistake ? I'm sorry. I thought you >>>>>>>> were talking about GHC for Mac OS X not being available for your OS version >>>>>>>> either. >>>>>>>> >>>>>>>> Your best bet on HP is to specify an older version of Yesod that >>>>>>>> will work with the dependencies that your version of HP comes with. >>>>>>>> >>>>>>>> On Thu, Jun 18, 2015 at 2:08 PM, Miguel A. Santos < >>>>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>>>> >>>>>>>>> Indeed I saw that. That's what I meant with the bindist not being >>>>>>>>> available for OSX 10.6.8; only for 10.7+ >>>>>>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#macosx_x86_64 >>>>>>>>> My bad, I should have said it before. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Public key ID: E8FE60D7 >>>>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>>>>> >>>>>>>>> On Thu, Jun 18, 2015 at 2:36 PM, Christopher Allen < >>>>>>>>> cma at bitemyapp.com> wrote: >>>>>>>>> >>>>>>>>>> Did you see that the Mac instructions said to follow the "other >>>>>>>>>> *nix" instructions if you were using an older version of Mac OS X? >>>>>>>>>> >>>>>>>>>> Those link here: >>>>>>>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#binaries >>>>>>>>>> >>>>>>>>>> Get rid of all that (GHC, HP, Cabal), then install GHC using the >>>>>>>>>> bindist for Mac OS X linked above. >>>>>>>>>> >>>>>>>>>> On Thu, Jun 18, 2015 at 1:14 PM, Miguel A. Santos < >>>>>>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> That is obviously a typo: I meant I *did* do a fresh install of >>>>>>>>>>> the Haskell Platform and cabal before >>>>>>>>>>> trying -and failing- to install yesod. >>>>>>>>>>> >>>>>>>>>>> On Thu, Jun 18, 2015 at 1:38 PM, Miguel A. Santos < >>>>>>>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> This corresponds to a fresh install of the HP, ghc, and cabal I >>>>>>>>>>>> didn't before trying to install yesod. >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Public key ID: E8FE60D7 >>>>>>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Haskell-Cafe mailing list >>>>>>>>>>> Haskell-Cafe at haskell.org >>>>>>>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Chris Allen >>>>>>>>>> Currently working on http://haskellbook.com >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Chris Allen >>>>>>>> Currently working on http://haskellbook.com >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Chris Allen >>>>>> Currently working on http://haskellbook.com >>>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> Chris Allen >>>> Currently working on http://haskellbook.com >>>> >>> >>> >> >> >> -- >> Chris Allen >> Currently working on http://haskellbook.com >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From leza.ml at fecrd.cujae.edu.cu Fri Jun 19 05:16:50 2015 From: leza.ml at fecrd.cujae.edu.cu (Leza Morais Lutonda) Date: Fri, 19 Jun 2015 01:16:50 -0400 Subject: [Haskell-cafe] "SameConstraints?" type constraints Message-ID: <5583A5C2.8070606@fecrd.cujae.edu.cu> Hi All, I have the following data type: data S e where SC :: d -> e -> S e And I want to declare a Show instance for it in the following way: instance Show e => Show (S e) where show (SC x y) = show x ++ show y But, of course it don't typechecks because: could not deduce `Show d` arising from a use of `show`. Is there a way to constraint the `d` type in the `SC` constructor definition to have the same constraints of the `e` type? Something like: SC :: SameConstraints d e => d -> e -> S e ??? Thanks! -- Leza Morais Lutonda, Lemol-C http://lemol.github.io 50 Aniversario de la Cujae. Inaugurada por Fidel el 2 de diciembre de 1964 http://cujae.edu.cu From djohnson.m at gmail.com Fri Jun 19 05:23:27 2015 From: djohnson.m at gmail.com (David Johnson) Date: Fri, 19 Jun 2015 00:23:27 -0500 Subject: [Haskell-cafe] "SameConstraints?" type constraints In-Reply-To: <5583A5C2.8070606@fecrd.cujae.edu.cu> References: <5583A5C2.8070606@fecrd.cujae.edu.cu> Message-ID: You could constrain d in the type signature of SC. {-# LANGUAGE GADTs #-} data S e where SC :: Show d => d -> e -> S e instance Show e => Show (S e) where show (SC x y) = show x ++ show y On Fri, Jun 19, 2015 at 12:16 AM, Leza Morais Lutonda < leza.ml at fecrd.cujae.edu.cu> wrote: > > Hi All, > > I have the following data type: > > data S e where > > SC :: d -> e -> S e > > And I want to declare a Show instance for it in the following way: > > instance Show e => Show (S e) where > > show (SC x y) = show x ++ show y > > But, of course it don't typechecks because: could not deduce `Show d` > arising from a use of `show`. > Is there a way to constraint the `d` type in the `SC` constructor > definition to have the same constraints of the `e` type? Something like: > > SC :: SameConstraints d e => d -> e -> S e ??? > > > Thanks! > > > -- > Leza Morais Lutonda, Lemol-C > http://lemol.github.io > > > > 50 Aniversario de la Cujae. Inaugurada por Fidel el 2 de diciembre de > 1964 http://cujae.edu.cu > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -- Cell: 1.630.740.8204 -------------- next part -------------- An HTML attachment was scrubbed... URL: From miguelimo38 at yandex.ru Fri Jun 19 05:37:20 2015 From: miguelimo38 at yandex.ru (MigMit) Date: Fri, 19 Jun 2015 07:37:20 +0200 Subject: [Haskell-cafe] "SameConstraints?" type constraints In-Reply-To: <5583A5C2.8070606@fecrd.cujae.edu.cu> References: <5583A5C2.8070606@fecrd.cujae.edu.cu> Message-ID: <25A7119A-F9F8-483C-8FD9-0C85909E4BD2@yandex.ru> No, constraints aren't a part of type e. But you can specify the constraint in SC itself: data SC c e where SC :: c d => d -> e -> S e (or SC :: (c d, c e) => d -> e -> S e, if you like it better). Of course, you would need ConstraintKind for that. ?????????? ? iPad > 19 ???? 2015 ?., ? 7:16, Leza Morais Lutonda ???????(?): > > > Hi All, > > I have the following data type: > > data S e where > > SC :: d -> e -> S e > > And I want to declare a Show instance for it in the following way: > > instance Show e => Show (S e) where > > show (SC x y) = show x ++ show y > > But, of course it don't typechecks because: could not deduce `Show d` arising from a use of `show`. > Is there a way to constraint the `d` type in the `SC` constructor definition to have the same constraints of the `e` type? Something like: > > SC :: SameConstraints d e => d -> e -> S e ??? > > > Thanks! > > > -- > Leza Morais Lutonda, Lemol-C > http://lemol.github.io > > > > 50 Aniversario de la Cujae. Inaugurada por Fidel el 2 de diciembre de 1964 http://cujae.edu.cu > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe From leza.ml at fecrd.cujae.edu.cu Fri Jun 19 05:38:01 2015 From: leza.ml at fecrd.cujae.edu.cu (Leza Morais Lutonda) Date: Fri, 19 Jun 2015 01:38:01 -0400 Subject: [Haskell-cafe] "SameConstraints?" type constraints In-Reply-To: References: <5583A5C2.8070606@fecrd.cujae.edu.cu> Message-ID: <5583AAB9.6080503@fecrd.cujae.edu.cu> On 06/19/2015 01:23 AM, David Johnson wrote: > You could constrain d in the type signature of SC. > > {-# LANGUAGE GADTs #-}dataS e whereSC::Show d => d -> e ->S e > > instanceShow e =>Show (S e) whereshow (SC x y) = show x ++ show y > Hi David, thanks for the rapid answer. But, I also want an instance for Num like: instance Num e => Show (S e) where (SC x1 y1) + (SC x2 y2) = SC (x1+x2) (y1+y2) And in the future I will want another instance that constraints to the `e` type. And the client of the library will implement his own instances or functions. So I think it wont be nice to constraint `Show d` in the type signature of the `SC` constructor. -- Leza Morais Lutonda, Lemol-C Electronic and Telecommunication Engineer Software Development and Architecture Enthusiast http://lemol.github.io 50 Aniversario de la Cujae. Inaugurada por Fidel el 2 de diciembre de 1964 http://cujae.edu.cu From leza.ml at fecrd.cujae.edu.cu Fri Jun 19 06:33:19 2015 From: leza.ml at fecrd.cujae.edu.cu (Leza Morais Lutonda) Date: Fri, 19 Jun 2015 02:33:19 -0400 Subject: [Haskell-cafe] "SameConstraints?" type constraints In-Reply-To: <25A7119A-F9F8-483C-8FD9-0C85909E4BD2@yandex.ru> References: <5583A5C2.8070606@fecrd.cujae.edu.cu> <25A7119A-F9F8-483C-8FD9-0C85909E4BD2@yandex.ru> Message-ID: <5583B7AF.7080703@fecrd.cujae.edu.cu> On 06/19/2015 01:37 AM, MigMit wrote: > data SC c e where SC :: c d => d -> e -> S e > > (or SC :: (c d, c e) => d -> e -> S e, if you like it better). Of course, you would need ConstraintKind for that. Hi MigMit, This don't typechecks for me. -- Leza Morais Lutonda, Lemol-C http://lemol.github.io 50 Aniversario de la Cujae. Inaugurada por Fidel el 2 de diciembre de 1964 http://cujae.edu.cu From miguelimo38 at yandex.ru Fri Jun 19 07:02:09 2015 From: miguelimo38 at yandex.ru (MigMit) Date: Fri, 19 Jun 2015 09:02:09 +0200 Subject: [Haskell-cafe] "SameConstraints?" type constraints In-Reply-To: <5583B7AF.7080703@fecrd.cujae.edu.cu> References: <5583A5C2.8070606@fecrd.cujae.edu.cu> <25A7119A-F9F8-483C-8FD9-0C85909E4BD2@yandex.ru> <5583B7AF.7080703@fecrd.cujae.edu.cu> Message-ID: <7D13873D-60B5-4FFB-A002-19E52A43DE1B@yandex.ru> Typo. {-# LANGUAGE ConstraintKinds, GADTs #-} data SC c e where SC :: c d => d -> e -> SC c e > On 19 Jun 2015, at 08:33, Leza Morais Lutonda wrote: > > On 06/19/2015 01:37 AM, MigMit wrote: >> data SC c e where SC :: c d => d -> e -> S e >> >> (or SC :: (c d, c e) => d -> e -> S e, if you like it better). Of course, you would need ConstraintKind for that. > Hi MigMit, > This don't typechecks for me. > > -- > Leza Morais Lutonda, Lemol-C > http://lemol.github.io > > > > 50 Aniversario de la Cujae. Inaugurada por Fidel el 2 de diciembre de 1964 http://cujae.edu.cu > > From heraldhoi at gmail.com Fri Jun 19 07:37:53 2015 From: heraldhoi at gmail.com (Geraldus) Date: Fri, 19 Jun 2015 07:37:53 +0000 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: Hi, Miguel. Haskell Platform includes GHC itself and some set of packages, such as text, network, and etc. If I recall correctly thete was issues with Yesod and HP because some package versions and the best way to install Yesod were sandboxes, because sandbox have its own package database. Removing or just moving .ghc folder helped me in past several times, usually it was needed when different projects depends on different package versions, now I put every project inside sandbox to prevent this. As for pandoc, if you use only binary you can install it having no GHC at all (download package installer from website). If I were you I'll install GHC 7.8.* alone rather than Platform, caball-install 1.22.* and try to build everything againg using sandboxes. Also there is a Stackage and its tools (stackage-cli and recently released stack), they are very helpful in caball-hell issues. Also there is Halcyon but I have not tried it myself. Apologize for missing links, I'm mobile now. 3:23 ?? ???????, ??, 19.06.2015, Miguel A. Santos < miguel.a.santos.l at gmail.com>: > One more detail about my try with rm ~/.ghc: > I find it curious that I didn't get that directory rebuild again when > trying to install yesod. > Did I miss something? > > -- > Public key ID: E8FE60D7 > Public key server: see, e.g., hkp://keys.gnupg.net > > On Thu, Jun 18, 2015 at 6:18 PM, Miguel A. Santos < > miguel.a.santos.l at gmail.com> wrote: > >> Ok, removing ~/.ghc (actually just moving it to ~/.ghc-org) didn't work >> either. The detailed output is below >> but from a cursory view it seems not much better than within the sandbox >> try before. >> >> I understand I'm staying in the "past" and with that comes problems like >> this one, but upgrading to Yellowstone >> is not an option for me. >> >> I have some questions about your other options. In particular, I'm not >> sure what you mean by (capitals) GHC. >> I thought that's just the compiler. I don't understand your first >> sentence after "vanilla". What is what I got >> with HP if not GHC for MacOSX!? >> >> About point 2., I'm building (already for hours, that's the 'other' >> process I'd running) ghc from the tarball ghc-7.8.4-src.tar.bz2 available >> at the bottom of that same link we mentioned before, namely, >> https://www.haskell.org/ghc/download_ghc_7_8_4#binaries Is this the same >> as what you mean by this 2nd option? Mind you I'm already using version >> 7.8.3. How will a new version of the compiler change what looks like a >> compatibility problem with a package? or you mean it is not that simple? >> >> Option 3: It seems to me I may as well just remove everything, install HP >> again (already downloaded) and after >> that step finishes, trying installing right away yesod, before I try with >> any other packages. Seems a path based >> mostly on blind hope than logic to me :-p as the only big thing I >> installed between my fresh install of HP and my initial try of yesod was >> pandoc, which had some large dependencies to deal with. But it's a simple >> one, so I may check it definitely out >> of the equation. >> >> Option 4: I guess this is something I can try right away without much >> effort. To be concrete you mean then >> cabal install --allow-newer yesod ? >> >> Btw, thanks so much for your prompt help! >> >> -------------------------------------------- >> msantos at MBP-2[17:09]:~/System/YESOD$mv ~/.ghc/ ~/.ghc-org >> msantos at MBP-2[17:30]:~$cabal install yesod==1.2.6.1 >> Warning: The package list for 'hackage.haskell.org' is 15.0 days old. >> Run 'cabal update' to get the latest list of available packages. >> Resolving dependencies... >> cabal: Could not resolve dependencies: >> next goal: yesod (user goal) >> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, 1.4.0 >> (global constraint requires ==1.2.6.1) >> trying: yesod-1.2.6.1 >> trying: streaming-commons-0.1.12.1 (dependency of yesod-1.2.6.1) >> trying: network-2.4.2.3/installed-575... (dependency of >> streaming-commons-0.1.12.1) >> trying: parsec-3.1.5/installed-04a... (dependency of >> network-2.4.2.3/installed-575...) >> trying: mtl-2.1.3.1/installed-8bc... (dependency of >> parsec-3.1.5/installed-04a...) >> trying: shakespeare-2.0.5 (dependency of yesod-1.2.6.1) >> trying: exceptions-0.8.0.2 (dependency of shakespeare-2.0.5) >> trying: transformers-compat-0.4.0.4 (dependency of exceptions-0.8.0.2) >> trying: transformers-compat-0.4.0.4:-two >> rejecting: transformers-compat-0.4.0.4:-three (conflict: mtl => >> transformers==0.3.0.0/installed-16a..., >> transformers-compat-0.4.0.4:three => >> transformers>=0.4.1 && <0.5) >> rejecting: transformers-compat-0.4.0.4:+three (manual flag can only be >> changed >> explicitly) >> Backjump limit reached (change with --max-backjumps). >> >> -- >> Public key ID: E8FE60D7 >> Public key server: see, e.g., hkp://keys.gnupg.net >> >> On Thu, Jun 18, 2015 at 5:15 PM, Christopher Allen >> wrote: >> >>> You don't need to rm -rf ~/.ghc if you're using a sandbox. The sandbox >>> (usually) occludes the user package-db. >>> >>> Well, the sandbox may not have fixed the incompatibility of HP and that >>> particular version of Yesod, but we're better information from the >>> dependency solver. >>> >>> That said, this is going to simply require a lot of trial and error if >>> you want to try this approach and me telling you increment/decrement >>> versions isn't going to be any faster. >>> >>> I'd say your best options are: >>> >>> 1. Upgrade your installation of Mac OS X so you can use the vanilla GHC >>> bindist, or even better, GHC for Mac OS X >>> >>> 2. Use your copy of Haskell Platform to build GHC from source and use >>> that instead of GHC (possibly a quagmire, might work out okay. Will take a >>> long time to build.) >>> >>> 3. Unregister all the unnecessary packages from your global package-db. >>> Listing here: https://www.haskell.org/platform/changelog.html >>> (Additional Platform Libraries, do *not* uninstall any of the core >>> libraries) >>> If you make a mistake you may need to reinstall Platform. >>> >>> 4. Give passing --allow-newer to cabal install a shot. >>> >>> This is rough. Not that many people on <10.7 OS X versions so there >>> aren't enough squeaky wheels for this sort of thing. >>> >>> Sorry I couldn't do more. >>> >>> >>> >>> On Thu, Jun 18, 2015 at 3:54 PM, Miguel A. Santos < >>> miguel.a.santos.l at gmail.com> wrote: >>> >>>> Hmm.. wouldn't that mean, I later have to reinstall all my packages? :-/ >>>> >>>> Meanwhile, I did try the sandbox way. It didn't work either. Briefly I >>>> issued >>>> cabal sandbox init >>>> and then >>>> cabal install yesod-1.2.6.1 >>>> Details below. >>>> >>>> The initial complain about not being able to resolve dependencies makes >>>> me think >>>> I may be missing more things about working with sandboxes. Just checked >>>> >>>> https://www.haskell.org/cabal/users-guide/installing-packages.html#developing-with-sandboxes >>>> and guessed the init would be enough. >>>> >>>> -------------------------------------------------------- >>>> msantos at MBP-2[16:38]:~/System/YESOD/Sandbox$cabal sandbox init >>>> Writing a default package environment file to >>>> /Users/msantos/System/YESOD/Sandbox/cabal.sandbox.config >>>> Creating a new sandbox at >>>> /Users/msantos/System/YESOD/Sandbox/.cabal-sandbox >>>> msantos at MBP-2[16:41]:~/System/YESOD/Sandbox$cabal install yesod-1.2.6.1 >>>> Resolving dependencies... >>>> cabal: Could not resolve dependencies: >>>> next goal: yesod (user goal) >>>> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, >>>> 1.4.0 >>>> (global constraint requires ==1.2.6.1) >>>> trying: yesod-1.2.6.1 >>>> trying: streaming-commons-0.1.12.1 (dependency of yesod-1.2.6.1) >>>> trying: network-2.4.2.3/installed-575... (dependency of >>>> streaming-commons-0.1.12.1) >>>> trying: parsec-3.1.5/installed-04a... (dependency of >>>> network-2.4.2.3/installed-575...) >>>> trying: mtl-2.1.3.1/installed-8bc... (dependency of >>>> parsec-3.1.5/installed-04a...) >>>> trying: shakespeare-2.0.5 (dependency of yesod-1.2.6.1) >>>> trying: exceptions-0.8.0.2 (dependency of shakespeare-2.0.5) >>>> trying: transformers-compat-0.4.0.4 (dependency of exceptions-0.8.0.2) >>>> trying: transformers-compat-0.4.0.4:-two >>>> rejecting: transformers-compat-0.4.0.4:-three (conflict: mtl => >>>> transformers==0.3.0.0/installed-16a..., >>>> transformers-compat-0.4.0.4:three => >>>> transformers>=0.4.1 && <0.5) >>>> rejecting: transformers-compat-0.4.0.4:+three (manual flag can only be >>>> changed >>>> explicitly) >>>> Backjump limit reached (change with --max-backjumps). >>>> >>>> Note: when using a sandbox, all packages are required to have consistent >>>> dependencies. Try reinstalling/unregistering the offending packages or >>>> recreating the sandbox. >>>> >>>> -- >>>> Public key ID: E8FE60D7 >>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>> >>>> On Thu, Jun 18, 2015 at 4:46 PM, Christopher Allen >>>> wrote: >>>> >>>>> If you won't use a sandbox, then lets nuke your user package-db and >>>>> start from scratch: >>>>> >>>>> rm -rf ~/.ghc >>>>> cabal install yesod==1.2.6.1 >>>>> >>>>> On Thu, Jun 18, 2015 at 3:28 PM, Miguel A. Santos < >>>>> miguel.a.santos.l at gmail.com> wrote: >>>>> >>>>>> I haven't yet read how to use sandboxes, so, no, that I tried just >>>>>> like that cabal install... >>>>>> I did check first that cabal info yesod was saying I didn't have it >>>>>> install. But now that you mention it, I did >>>>>> may have had other packages lingering around from my last attempt of >>>>>> installing yesod. >>>>>> >>>>>> Meanwhile I did run forcing the install of 1.4.0... >>>>>> Ah, it finished with cabal install --force-reinstalls yesod-1.4.0 >>>>>> and... >>>>>> it complains about the shakespeare. >>>>>> >>>>>> "shakespeare-2.0.5 failed during the building phase. The exception >>>>>> was: >>>>>> ExitFailure 1" >>>>>> >>>>>> Below the full output. >>>>>> >>>>>> I'll give a try to the sandbox solution. >>>>>> >>>>>> ------------------------------------------------ >>>>>> msantos at MBP-2[16:09]:~/System/YESOD$cabal install --force-reinstalls >>>>>> yesod-1.4.0 >>>>>> Resolving dependencies... >>>>>> Warning: The following packages are likely to be broken by the >>>>>> reinstalls: >>>>>> pandoc-citeproc-0.7.1.1 >>>>>> pandoc-1.14.0.4 >>>>>> project-template-0.2.0 >>>>>> http-reverse-proxy-0.4.2 >>>>>> Continuing even though the plan contains dangerous reinstalls. >>>>>> Downloading monad-control-0.3.3.1... >>>>>> Configuring shakespeare-2.0.5... >>>>>> Configuring monad-control-0.3.3.1... >>>>>> Building monad-control-0.3.3.1... >>>>>> Building shakespeare-2.0.5... >>>>>> Installed monad-control-0.3.3.1 >>>>>> Configuring lifted-base-0.2.3.6... >>>>>> Building lifted-base-0.2.3.6... >>>>>> Configuring resource-pool-0.2.3.2... >>>>>> Installed lifted-base-0.2.3.6 >>>>>> Building resource-pool-0.2.3.2... >>>>>> Installed resource-pool-0.2.3.2 >>>>>> Configuring enclosed-exceptions-1.0.1.1... >>>>>> Building enclosed-exceptions-1.0.1.1... >>>>>> Configuring resourcet-1.1.5... >>>>>> Installed enclosed-exceptions-1.0.1.1 >>>>>> Building resourcet-1.1.5... >>>>>> Failed to install shakespeare-2.0.5 >>>>>> Build log ( /Users/msantos/.cabal/logs/shakespeare-2.0.5.log ): >>>>>> Configuring shakespeare-2.0.5... >>>>>> Building shakespeare-2.0.5... >>>>>> Preprocessing library shakespeare-2.0.5... >>>>>> [ 1 of 17] Compiling Text.MkSizeType ( Text/MkSizeType.hs, >>>>>> dist/build/Text/MkSizeType.o ) >>>>>> [ 2 of 17] Compiling Text.IndentToBrace ( Text/IndentToBrace.hs, >>>>>> dist/build/Text/IndentToBrace.o ) >>>>>> [ 3 of 17] Compiling Text.Shakespeare.Base ( >>>>>> Text/Shakespeare/Base.hs, dist/build/Text/Shakespeare/Base.o ) >>>>>> [ 4 of 17] Compiling Text.Hamlet.Parse ( Text/Hamlet/Parse.hs, >>>>>> dist/build/Text/Hamlet/Parse.o ) >>>>>> [ 5 of 17] Compiling Text.Hamlet ( Text/Hamlet.hs, >>>>>> dist/build/Text/Hamlet.o ) >>>>>> >>>>>> Text/Hamlet.hs:402:1: Warning: Defined but not used: ?varName? >>>>>> >>>>>> Text/Hamlet.hs:406:1: Warning: Defined but not used: ?strToExp? >>>>>> >>>>>> Text/Hamlet.hs:439:16: Warning: Defined but not used: ?html? >>>>>> >>>>>> Text/Hamlet.hs:440:14: Warning: Defined but not used: ?url? >>>>>> >>>>>> Text/Hamlet.hs:441:19: Warning: Defined but not used: ?url? >>>>>> >>>>>> Text/Hamlet.hs:442:16: Warning: Defined but not used: ?url? >>>>>> >>>>>> Text/Hamlet.hs:443:20: Warning: Defined but not used: ?msg_url? >>>>>> >>>>>> Text/Hamlet.hs:444:14: Warning: Defined but not used: ?msg? >>>>>> >>>>>> Text/Hamlet.hs:488:43: Warning: >>>>>> This binding for ?c? shadows the existing binding >>>>>> bound at Text/Hamlet.hs:484:13 >>>>>> [ 6 of 17] Compiling Text.Hamlet.RT ( Text/Hamlet/RT.hs, >>>>>> dist/build/Text/Hamlet/RT.o ) >>>>>> >>>>>> Text/Hamlet/RT.hs:78:13: Warning: Defined but not used: ?x? >>>>>> >>>>>> Text/Hamlet/RT.hs:78:26: Warning: Defined but not used: ?deref? >>>>>> >>>>>> Text/Hamlet/RT.hs:78:45: Warning: Defined but not used: ?docs? >>>>>> >>>>>> Text/Hamlet/RT.hs:85:13: Warning: Defined but not used: ?x? >>>>>> >>>>>> Text/Hamlet/RT.hs:85:25: Warning: Defined but not used: ?deref? >>>>>> >>>>>> Text/Hamlet/RT.hs:85:44: Warning: Defined but not used: ?jdocs? >>>>>> >>>>>> Text/Hamlet/RT.hs:85:50: Warning: Defined but not used: ?ndocs? >>>>>> >>>>>> Text/Hamlet/RT.hs:115:37: Warning: >>>>>> This binding for ?x? shadows the existing binding >>>>>> bound at Text/Hamlet/RT.hs:108:13 >>>>>> [ 7 of 17] Compiling Text.Shakespeare ( Text/Shakespeare.hs, >>>>>> dist/build/Text/Shakespeare.o ) >>>>>> [ 8 of 17] Compiling Text.Shakespeare.Text ( >>>>>> Text/Shakespeare/Text.hs, dist/build/Text/Shakespeare/Text.o ) >>>>>> [ 9 of 17] Compiling Text.Julius ( Text/Julius.hs, >>>>>> dist/build/Text/Julius.o ) >>>>>> >>>>>> Text/Julius.hs:90:63: Warning: >>>>>> In the use of ?fromValue? (imported from Data.Aeson.Encode): >>>>>> Deprecated: "Use 'encodeToTextBuilder' instead" >>>>>> [10 of 17] Compiling Text.Roy ( Text/Roy.hs, >>>>>> dist/build/Text/Roy.o ) >>>>>> [11 of 17] Compiling Text.Coffee ( Text/Coffee.hs, >>>>>> dist/build/Text/Coffee.o ) >>>>>> [12 of 17] Compiling Text.Css ( Text/Css.hs, >>>>>> dist/build/Text/Css.o ) >>>>>> >>>>>> Text/Css.hs:349:40: Warning: Defined but not used: ?subblocks? >>>>>> >>>>>> Text/Css.hs:367:5: Warning: Defined but not used: ?subGo? >>>>>> [13 of 17] Compiling Text.CssCommon ( Text/CssCommon.hs, >>>>>> dist/build/Text/CssCommon.o ) >>>>>> Loading package ghc-prim ... linking ... done. >>>>>> Loading package integer-gmp ... linking ... done. >>>>>> Loading package base ... linking ... done. >>>>>> Loading package array-0.5.0.0 ... linking ... done. >>>>>> Loading package deepseq-1.3.0.2 ... linking ... done. >>>>>> Loading package filepath-1.3.0.2 ... linking ... done. >>>>>> Loading package old-locale-1.0.0.6 ... linking ... done. >>>>>> Loading package time-1.4.2 ... linking ... done. >>>>>> Loading package bytestring-0.10.4.0 ... linking ... done. >>>>>> Loading package unix-2.7.0.1 ... linking ... done. >>>>>> Loading package directory-1.2.1.0 ... linking ... done. >>>>>> Loading package process-1.2.0.0 ... linking ... done. >>>>>> Loading package transformers-0.3.0.0 ... linking ... done. >>>>>> Loading package mtl-2.1.3.1 ... linking ... done. >>>>>> Loading package text-1.1.0.0 ... linking ... done. >>>>>> Loading package parsec-3.1.5 ... : can't load .so/.DLL >>>>>> for: >>>>>> /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib >>>>>> (dlopen(/Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib, >>>>>> 9): Library not loaded: @rpath/libHStext-1.1.0.0-ghc7.8.3.dylib >>>>>> Referenced from: >>>>>> /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib >>>>>> Reason: image not found) >>>>>> Installed resourcet-1.1.5 >>>>>> Configuring wai-extra-3.0.7.1... >>>>>> Configuring conduit-1.2.4.2... >>>>>> Building conduit-1.2.4.2... >>>>>> Building wai-extra-3.0.7.1... >>>>>> Installed conduit-1.2.4.2 >>>>>> Configuring conduit-extra-1.1.9... >>>>>> Building conduit-extra-1.1.9... >>>>>> Configuring http-conduit-2.1.5... >>>>>> Installed wai-extra-3.0.7.1 >>>>>> Building http-conduit-2.1.5... >>>>>> Configuring yaml-0.8.11... >>>>>> Installed http-conduit-2.1.5 >>>>>> Building yaml-0.8.11... >>>>>> Installed conduit-extra-1.1.9 >>>>>> Configuring monad-logger-0.3.13.1... >>>>>> Building monad-logger-0.3.13.1... >>>>>> Configuring xml-conduit-1.3.0... >>>>>> Installed monad-logger-0.3.13.1 >>>>>> Building xml-conduit-1.3.0... >>>>>> Installed yaml-0.8.11 >>>>>> Configuring persistent-2.1.6... >>>>>> Building persistent-2.1.6... >>>>>> Installed xml-conduit-1.3.0 >>>>>> Configuring tagstream-conduit-0.5.5.3... >>>>>> Building tagstream-conduit-0.5.5.3... >>>>>> Installed tagstream-conduit-0.5.5.3 >>>>>> Configuring authenticate-1.3.2.11... >>>>>> Building authenticate-1.3.2.11... >>>>>> Installed authenticate-1.3.2.11 >>>>>> Installed persistent-2.1.6 >>>>>> Configuring persistent-template-2.1.3.3... >>>>>> Building persistent-template-2.1.3.3... >>>>>> Installed persistent-template-2.1.3.3 >>>>>> Updating documentation index >>>>>> >>>>>> /Users/msantos/Library/Haskell/share/doc/x86_64-osx-ghc-7.8.3/index.html >>>>>> cabal: Error: some packages failed to install: >>>>>> shakespeare-2.0.5 failed during the building phase. The exception was: >>>>>> ExitFailure 1 >>>>>> yesod-1.4.0 depends on shakespeare-2.0.5 which failed to install. >>>>>> yesod-auth-1.4.5 depends on shakespeare-2.0.5 which failed to install. >>>>>> yesod-core-1.4.9.1 depends on shakespeare-2.0.5 which failed to >>>>>> install. >>>>>> yesod-form-1.4.4.1 depends on shakespeare-2.0.5 which failed to >>>>>> install. >>>>>> yesod-persistent-1.4.0.2 depends on shakespeare-2.0.5 which failed to >>>>>> install. >>>>>> >>>>>> >>>>>> -- >>>>>> Public key ID: E8FE60D7 >>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>> >>>>>> On Thu, Jun 18, 2015 at 4:16 PM, Christopher Allen >>>>> > wrote: >>>>>> >>>>>>> Some of that looks like churn from trying to install an older >>>>>>> version of Yesod over a newer one. Are you using a sandbox? if so, did you >>>>>>> wipe it out before attempting Yesod 1.2.6.1? What we'd be looking for is a >>>>>>> package conflict that tells you which package of what version that is >>>>>>> globally installed is causing the conflict. >>>>>>> >>>>>>> Insta-Yesodian conflict implies you're reinstalling into a not-fresh >>>>>>> packgage-db which means you either need to wipe your user package-db or use >>>>>>> a sandbox. (I recommend the latter). >>>>>>> >>>>>>> If you haven't done so, do that, then re-attempt that version of >>>>>>> Yesod (1.2.6.1). >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Thu, Jun 18, 2015 at 2:57 PM, Miguel A. Santos < >>>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>>> >>>>>>>> Thanks! No problem. I gave a try to your suggestion. It doesn't >>>>>>>> look I'll get yesod installed without "paying" >>>>>>>> a bigger price than just "downgrading". :-/ >>>>>>>> >>>>>>>> Yesod 1.4.0 warns that forcing installing it will likely break >>>>>>>> pandoc, among other things. >>>>>>>> I can give it a try though, but I really use pandoc regularly. >>>>>>>> Plus, it's still not clear that the building process >>>>>>>> will not fail. And installing pandoc took me surprisingly a lot of >>>>>>>> time last time. >>>>>>>> >>>>>>>> Forcing Yesod-1.2.6.1 won't allow cabal to satisfy the dependencies. >>>>>>>> >>>>>>>> I guess I could keep trying other versions and see. But I think >>>>>>>> I'll try the 1.4.0 first. Will post here >>>>>>>> the results so that at least others may hopefully benefit from this. >>>>>>>> >>>>>>>> >>>>>>>> ----------------------------------------------------------------------------------------- >>>>>>>> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.4.0 >>>>>>>> Resolving dependencies... >>>>>>>> In order, the following would be installed: >>>>>>>> monad-control-0.3.3.1 (latest: 1.0.0.4) (via: yesod-1.4.0 >>>>>>>> yesod-core-1.4.9.1 authenticate-1.3.2.11 xml-conduit-1.3.0 >>>>>>>> persistent-template-2.1.3.3 persistent-2.1.6 monad-logger-0.3.13.1 >>>>>>>> http-conduit-2.1.5 conduit-extra-1.1.9 resourcet-1.1.5 >>>>>>>> resource-pool-0.2.3.2 enclosed-exceptions-1.0.1.1 lifted-base-0.2.3.6) (new >>>>>>>> version) >>>>>>>> lifted-base-0.2.3.6 (via: yesod-auth-1.4.5 yesod-core-1.4.9.1 >>>>>>>> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 >>>>>>>> conduit-1.2.4.2 resourcet-1.1.5 enclosed-exceptions-1.0.1.1) (reinstall) >>>>>>>> (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>>> enclosed-exceptions-1.0.1.1 (via: yaml-0.8.11) (reinstall) >>>>>>>> (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>>> resource-pool-0.2.3.2 (via: yesod-persistent-1.4.0.2 >>>>>>>> persistent-2.1.6) (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>>> resourcet-1.1.5 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 >>>>>>>> yesod-persistent-1.4.0.2 yesod-core-1.4.9.1 yaml-0.8.11 >>>>>>>> authenticate-1.3.2.11 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 >>>>>>>> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 >>>>>>>> conduit-extra-1.1.9 conduit-1.2.4.2) (reinstall) (changes: >>>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>>> conduit-1.2.4.2 (via: yesod-auth-1.4.5 yesod-persistent-1.4.0.2 >>>>>>>> yesod-core-1.4.9.1 yaml-0.8.11 authenticate-1.3.2.11 >>>>>>>> tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 persistent-2.1.6 >>>>>>>> monad-logger-0.3.13.1 http-conduit-2.1.5 conduit-extra-1.1.9) (reinstall) >>>>>>>> conduit-extra-1.1.9 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>>>>> yesod-core-1.4.9.1 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 >>>>>>>> monad-logger-0.3.13.1) (reinstall) (changes: monad-control-1.0.0.4 -> >>>>>>>> 0.3.3.1) >>>>>>>> http-conduit-2.1.5 (via: yesod-auth-1.4.5 authenticate-1.3.2.11) >>>>>>>> (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>>> monad-logger-0.3.13.1 (via: yesod-1.4.0 yesod-core-1.4.9.1 >>>>>>>> persistent-template-2.1.3.3 persistent-2.1.6) (reinstall) (changes: >>>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>>> persistent-2.1.6 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 >>>>>>>> yesod-persistent-1.4.0.2 persistent-template-2.1.3.3) (reinstall) (changes: >>>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>>> persistent-template-2.1.3.3 (via: yesod-auth-1.4.5 >>>>>>>> yesod-persistent-1.4.0.2) (reinstall) (changes: monad-control-1.0.0.4 -> >>>>>>>> 0.3.3.1) >>>>>>>> shakespeare-2.0.5 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>>>>> yesod-form-1.4.4.1 yesod-core-1.4.9.1) (new package) >>>>>>>> wai-extra-3.0.7.1 (via: yesod-1.4.0 yesod-core-1.4.9.1) (reinstall) >>>>>>>> xml-conduit-1.3.0 (via: authenticate-1.3.2.11 >>>>>>>> tagstream-conduit-0.5.5.3) (reinstall) (changes: monad-control-1.0.0.4 -> >>>>>>>> 0.3.3.1) >>>>>>>> tagstream-conduit-0.5.5.3 (via: authenticate-1.3.2.11) (reinstall) >>>>>>>> authenticate-1.3.2.11 (via: yesod-auth-1.4.5) (reinstall) (changes: >>>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>>> yaml-0.8.11 (via: yesod-1.4.0) (reinstall) >>>>>>>> yesod-core-1.4.9.1 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>>>>> yesod-form-1.4.4.1 yesod-persistent-1.4.0.2) (new package) >>>>>>>> yesod-persistent-1.4.0.2 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>>>>> yesod-form-1.4.4.1) (new package) >>>>>>>> yesod-form-1.4.4.1 (via: yesod-1.4.0 yesod-auth-1.4.5) (new package) >>>>>>>> yesod-auth-1.4.5 (via: yesod-1.4.0) (new package) >>>>>>>> yesod-1.4.0 (latest: 1.4.1.5) (new package) >>>>>>>> cabal: The following packages are likely to be broken by the >>>>>>>> reinstalls: >>>>>>>> pandoc-citeproc-0.7.1.1 >>>>>>>> pandoc-1.14.0.4 >>>>>>>> project-template-0.2.0 >>>>>>>> http-reverse-proxy-0.4.2 >>>>>>>> Use --force-reinstalls if you want to install anyway. >>>>>>>> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.2.6.1 >>>>>>>> Resolving dependencies... >>>>>>>> cabal: Could not resolve dependencies: >>>>>>>> next goal: yesod (user goal) >>>>>>>> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, >>>>>>>> 1.4.1, 1.4.0 >>>>>>>> (global constraint requires ==1.2.6.1) >>>>>>>> trying: yesod-1.2.6.1 >>>>>>>> trying: streaming-commons-0.1.12.1/installed-200... (dependency of >>>>>>>> yesod-1.2.6.1) >>>>>>>> trying: warp-3.0.13.1/installed-150... (dependency of yesod-1.2.6.1) >>>>>>>> next goal: yesod-form (dependency of yesod-1.2.6.1) >>>>>>>> rejecting: yesod-form-1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2.1, >>>>>>>> 1.4.2, 1.4.1.1, >>>>>>>> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => yesod-form>=1.3 >>>>>>>> && <1.4) >>>>>>>> trying: yesod-form-1.3.16 >>>>>>>> next goal: persistent (dependency of yesod-form-1.3.16) >>>>>>>> rejecting: persistent-2.1.6/installed-4f9..., 2.1.6, 2.1.5, 2.1.4, >>>>>>>> 2.1.3, >>>>>>>> 2.1.2, 2.1.1.7, 2.1.1.6, 2.1.1.5, 2.1.1.4, 2.1.1.3, 2.1.1.2, >>>>>>>> 2.1.1.1, 2.1.1, >>>>>>>> 2.1.0.2, 2.1.0.1, 2.1 (conflict: yesod-form => persistent>=1.2 && >>>>>>>> <2.1) >>>>>>>> trying: persistent-1.3.3 >>>>>>>> trying: path-pieces-0.2.0/installed-533... (dependency of >>>>>>>> persistent-1.3.3) >>>>>>>> next goal: yesod-core (dependency of yesod-1.2.6.1) >>>>>>>> rejecting: yesod-core-1.4.9.1, 1.4.9, 1.4.8.3, 1.4.8.2, 1.4.8.1, >>>>>>>> 1.4.8, >>>>>>>> 1.4.7.3, 1.4.7.2, 1.4.7.1, 1.4.7, 1.4.6.2, 1.4.6.1, 1.4.6, 1.4.5, >>>>>>>> 1.4.4.5, >>>>>>>> 1.4.4.4, 1.4.4.3, 1.4.4.2, 1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2, >>>>>>>> 1.4.1.1, >>>>>>>> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => >>>>>>>> yesod-core>=1.2.2 && <1.3) >>>>>>>> rejecting: yesod-core-1.2.20.1, 1.2.20, 1.2.19.2, 1.2.19.1, 1.2.19, >>>>>>>> 1.2.18, >>>>>>>> 1.2.17, 1.2.16.1, 1.2.16, 1.2.15.2, 1.2.15.1, 1.2.15, 1.2.14, >>>>>>>> 1.2.13.1, >>>>>>>> 1.2.13, 1.2.12, 1.2.11.1, 1.2.11, 1.2.10, 1.2.9.2, 1.2.9.1, 1.2.9, >>>>>>>> 1.2.8, >>>>>>>> 1.2.7, 1.2.6.7, 1.2.6.6, 1.2.6.5, 1.2.6.4, 1.2.6.3, 1.2.6.2, 1.2.6.1 >>>>>>>> (conflict: path-pieces==0.2.0/installed-533..., yesod-core => >>>>>>>> path-pieces>=0.1.2 && <0.2) >>>>>>>> rejecting: yesod-core-1.2.6 (conflict: streaming-commons => >>>>>>>> text==1.1.0.0/installed-9bd..., yesod-core => text>=0.7 && <0.12) >>>>>>>> rejecting: yesod-core-1.2.5, 1.2.4.5, 1.2.4.4, 1.2.4.3, 1.2.4.2, >>>>>>>> 1.2.4.1, >>>>>>>> 1.2.4, 1.2.3, 1.2.2 (conflict: warp => wai==3.0.2.3/installed-39c.. >>>>>>>> ., >>>>>>>> yesod-core => wai>=1.4 && <1.5) >>>>>>>> rejecting: yesod-core-1.2.1, 1.2.0.4, 1.2.0.3, 1.2.0.2, 1.2.0.1, >>>>>>>> 1.2.0, >>>>>>>> 1.1.8.3, 1.1.8.2, 1.1.8.1, 1.1.8, 1.1.7.2, 1.1.7.1, 1.1.7, 1.1.6.1, >>>>>>>> 1.1.6, >>>>>>>> 1.1.5, 1.1.4.2, 1.1.4.1, 1.1.4, 1.1.3.1, 1.1.3, 1.1.2.2, 1.1.2.1, >>>>>>>> 1.1.2, >>>>>>>> 1.1.1.2, 1.1.1.1, 1.1.1, 1.1.0.1, 1.1.0, 1.0.1.3, 1.0.1.2, 1.0.1.1, >>>>>>>> 1.0.1, >>>>>>>> 1.0.0.2, 1.0.0.1, 1.0.0, 0.10.3, 0.10.2.2, 0.10.2.1, 0.10.2, >>>>>>>> 0.10.1, 0.9.4.1, >>>>>>>> 0.9.4, 0.9.3.6, 0.9.3.5, 0.9.3.4, 0.9.3.3, 0.9.3.2, 0.9.3.1, 0.9.3, >>>>>>>> 0.9.2, >>>>>>>> 0.9.1.1, 0.9.1, 0.8.3.2, 0.8.3.1, 0.8.3, 0.8.2, 0.8.1, 0.8.0.1, >>>>>>>> 0.8.0, >>>>>>>> 0.7.0.2, 0.7.0.1, 0.7.0 (conflict: yesod => yesod-core>=1.2.2 && >>>>>>>> <1.3) >>>>>>>> Backjump limit reached (change with --max-backjumps). >>>>>>>> >>>>>>>> -- >>>>>>>> Public key ID: E8FE60D7 >>>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>>>> >>>>>>>> On Thu, Jun 18, 2015 at 3:32 PM, Christopher Allen < >>>>>>>> cma at bitemyapp.com> wrote: >>>>>>>> >>>>>>>>> Ah that's frustrating, that's my mistake ? I'm sorry. I thought >>>>>>>>> you were talking about GHC for Mac OS X not being available for your OS >>>>>>>>> version either. >>>>>>>>> >>>>>>>>> Your best bet on HP is to specify an older version of Yesod that >>>>>>>>> will work with the dependencies that your version of HP comes with. >>>>>>>>> >>>>>>>>> On Thu, Jun 18, 2015 at 2:08 PM, Miguel A. Santos < >>>>>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>>>>> >>>>>>>>>> Indeed I saw that. That's what I meant with the bindist not being >>>>>>>>>> available for OSX 10.6.8; only for 10.7+ >>>>>>>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#macosx_x86_64 >>>>>>>>>> My bad, I should have said it before. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Public key ID: E8FE60D7 >>>>>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>>>>>> >>>>>>>>>> On Thu, Jun 18, 2015 at 2:36 PM, Christopher Allen < >>>>>>>>>> cma at bitemyapp.com> wrote: >>>>>>>>>> >>>>>>>>>>> Did you see that the Mac instructions said to follow the "other >>>>>>>>>>> *nix" instructions if you were using an older version of Mac OS X? >>>>>>>>>>> >>>>>>>>>>> Those link here: >>>>>>>>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#binaries >>>>>>>>>>> >>>>>>>>>>> Get rid of all that (GHC, HP, Cabal), then install GHC using the >>>>>>>>>>> bindist for Mac OS X linked above. >>>>>>>>>>> >>>>>>>>>>> On Thu, Jun 18, 2015 at 1:14 PM, Miguel A. Santos < >>>>>>>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> That is obviously a typo: I meant I *did* do a fresh install of >>>>>>>>>>>> the Haskell Platform and cabal before >>>>>>>>>>>> trying -and failing- to install yesod. >>>>>>>>>>>> >>>>>>>>>>>> On Thu, Jun 18, 2015 at 1:38 PM, Miguel A. Santos < >>>>>>>>>>>> miguel.a.santos.l at gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> This corresponds to a fresh install of the HP, ghc, and cabal >>>>>>>>>>>>> I didn't before trying to install yesod. >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Public key ID: E8FE60D7 >>>>>>>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>>>>>>>> >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> Haskell-Cafe mailing list >>>>>>>>>>>> Haskell-Cafe at haskell.org >>>>>>>>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Chris Allen >>>>>>>>>>> Currently working on http://haskellbook.com >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Chris Allen >>>>>>>>> Currently working on http://haskellbook.com >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Chris Allen >>>>>>> Currently working on http://haskellbook.com >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Chris Allen >>>>> Currently working on http://haskellbook.com >>>>> >>>> >>>> >>> >>> >>> -- >>> Chris Allen >>> Currently working on http://haskellbook.com >>> >> >> > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dct25-561bs at mythic-beasts.com Fri Jun 19 07:52:11 2015 From: dct25-561bs at mythic-beasts.com (David Turner) Date: Fri, 19 Jun 2015 08:52:11 +0100 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: Hi, I think Stackage will solve these issues - indeed, I believe that Stackage grew out of the difficulty of installing Yesod and its dependencies straight from Hackage using cabal. If you download https://www.stackage.org/lts/cabal.config next to your own .cabal file then it will constrain cabal to only use a set of packages which are known to be mutually compatible. Hope that helps, David On 19 June 2015 at 08:37, Geraldus wrote: > Hi, Miguel. Haskell Platform includes GHC itself and some set of packages, > such as text, network, and etc. If I recall correctly thete was issues with > Yesod and HP because some package versions and the best way to install Yesod > were sandboxes, because sandbox have its own package database. > Removing or just moving .ghc folder helped me in past several times, usually > it was needed when different projects depends on different package versions, > now I put every project inside sandbox to prevent this. > As for pandoc, if you use only binary you can install it having no GHC at > all (download package installer from website). > If I were you I'll install GHC 7.8.* alone rather than Platform, > caball-install 1.22.* and try to build everything againg using sandboxes. > Also there is a Stackage and its tools (stackage-cli and recently released > stack), they are very helpful in caball-hell issues. Also there is Halcyon > but I have not tried it myself. Apologize for missing links, I'm mobile now. > > > 3:23 ?? ???????, ??, 19.06.2015, Miguel A. Santos > : >> >> One more detail about my try with rm ~/.ghc: >> I find it curious that I didn't get that directory rebuild again when >> trying to install yesod. >> Did I miss something? >> >> -- >> Public key ID: E8FE60D7 >> Public key server: see, e.g., hkp://keys.gnupg.net >> >> On Thu, Jun 18, 2015 at 6:18 PM, Miguel A. Santos >> wrote: >>> >>> Ok, removing ~/.ghc (actually just moving it to ~/.ghc-org) didn't work >>> either. The detailed output is below >>> but from a cursory view it seems not much better than within the sandbox >>> try before. >>> >>> I understand I'm staying in the "past" and with that comes problems like >>> this one, but upgrading to Yellowstone >>> is not an option for me. >>> >>> I have some questions about your other options. In particular, I'm not >>> sure what you mean by (capitals) GHC. >>> I thought that's just the compiler. I don't understand your first >>> sentence after "vanilla". What is what I got >>> with HP if not GHC for MacOSX!? >>> >>> About point 2., I'm building (already for hours, that's the 'other' >>> process I'd running) ghc from the tarball ghc-7.8.4-src.tar.bz2 available at >>> the bottom of that same link we mentioned before, namely, >>> https://www.haskell.org/ghc/download_ghc_7_8_4#binaries Is this the same as >>> what you mean by this 2nd option? Mind you I'm already using version 7.8.3. >>> How will a new version of the compiler change what looks like a >>> compatibility problem with a package? or you mean it is not that simple? >>> >>> Option 3: It seems to me I may as well just remove everything, install HP >>> again (already downloaded) and after >>> that step finishes, trying installing right away yesod, before I try with >>> any other packages. Seems a path based >>> mostly on blind hope than logic to me :-p as the only big thing I >>> installed between my fresh install of HP and my initial try of yesod was >>> pandoc, which had some large dependencies to deal with. But it's a simple >>> one, so I may check it definitely out >>> of the equation. >>> >>> Option 4: I guess this is something I can try right away without much >>> effort. To be concrete you mean then >>> cabal install --allow-newer yesod ? >>> >>> Btw, thanks so much for your prompt help! >>> >>> -------------------------------------------- >>> msantos at MBP-2[17:09]:~/System/YESOD$mv ~/.ghc/ ~/.ghc-org >>> msantos at MBP-2[17:30]:~$cabal install yesod==1.2.6.1 >>> Warning: The package list for 'hackage.haskell.org' is 15.0 days old. >>> Run 'cabal update' to get the latest list of available packages. >>> Resolving dependencies... >>> cabal: Could not resolve dependencies: >>> next goal: yesod (user goal) >>> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, >>> 1.4.0 >>> (global constraint requires ==1.2.6.1) >>> trying: yesod-1.2.6.1 >>> trying: streaming-commons-0.1.12.1 (dependency of yesod-1.2.6.1) >>> trying: network-2.4.2.3/installed-575... (dependency of >>> streaming-commons-0.1.12.1) >>> trying: parsec-3.1.5/installed-04a... (dependency of >>> network-2.4.2.3/installed-575...) >>> trying: mtl-2.1.3.1/installed-8bc... (dependency of >>> parsec-3.1.5/installed-04a...) >>> trying: shakespeare-2.0.5 (dependency of yesod-1.2.6.1) >>> trying: exceptions-0.8.0.2 (dependency of shakespeare-2.0.5) >>> trying: transformers-compat-0.4.0.4 (dependency of exceptions-0.8.0.2) >>> trying: transformers-compat-0.4.0.4:-two >>> rejecting: transformers-compat-0.4.0.4:-three (conflict: mtl => >>> transformers==0.3.0.0/installed-16a..., transformers-compat-0.4.0.4:three >>> => >>> transformers>=0.4.1 && <0.5) >>> rejecting: transformers-compat-0.4.0.4:+three (manual flag can only be >>> changed >>> explicitly) >>> Backjump limit reached (change with --max-backjumps). >>> >>> -- >>> Public key ID: E8FE60D7 >>> Public key server: see, e.g., hkp://keys.gnupg.net >>> >>> On Thu, Jun 18, 2015 at 5:15 PM, Christopher Allen >>> wrote: >>>> >>>> You don't need to rm -rf ~/.ghc if you're using a sandbox. The sandbox >>>> (usually) occludes the user package-db. >>>> >>>> Well, the sandbox may not have fixed the incompatibility of HP and that >>>> particular version of Yesod, but we're better information from the >>>> dependency solver. >>>> >>>> That said, this is going to simply require a lot of trial and error if >>>> you want to try this approach and me telling you increment/decrement >>>> versions isn't going to be any faster. >>>> >>>> I'd say your best options are: >>>> >>>> 1. Upgrade your installation of Mac OS X so you can use the vanilla GHC >>>> bindist, or even better, GHC for Mac OS X >>>> >>>> 2. Use your copy of Haskell Platform to build GHC from source and use >>>> that instead of GHC (possibly a quagmire, might work out okay. Will take a >>>> long time to build.) >>>> >>>> 3. Unregister all the unnecessary packages from your global package-db. >>>> Listing here: https://www.haskell.org/platform/changelog.html >>>> (Additional Platform Libraries, do *not* uninstall any of the core >>>> libraries) >>>> If you make a mistake you may need to reinstall Platform. >>>> >>>> 4. Give passing --allow-newer to cabal install a shot. >>>> >>>> This is rough. Not that many people on <10.7 OS X versions so there >>>> aren't enough squeaky wheels for this sort of thing. >>>> >>>> Sorry I couldn't do more. >>>> >>>> >>>> >>>> On Thu, Jun 18, 2015 at 3:54 PM, Miguel A. Santos >>>> wrote: >>>>> >>>>> Hmm.. wouldn't that mean, I later have to reinstall all my packages? >>>>> :-/ >>>>> >>>>> Meanwhile, I did try the sandbox way. It didn't work either. Briefly I >>>>> issued >>>>> cabal sandbox init >>>>> and then >>>>> cabal install yesod-1.2.6.1 >>>>> Details below. >>>>> >>>>> The initial complain about not being able to resolve dependencies makes >>>>> me think >>>>> I may be missing more things about working with sandboxes. Just checked >>>>> >>>>> https://www.haskell.org/cabal/users-guide/installing-packages.html#developing-with-sandboxes >>>>> and guessed the init would be enough. >>>>> >>>>> -------------------------------------------------------- >>>>> msantos at MBP-2[16:38]:~/System/YESOD/Sandbox$cabal sandbox init >>>>> Writing a default package environment file to >>>>> /Users/msantos/System/YESOD/Sandbox/cabal.sandbox.config >>>>> Creating a new sandbox at >>>>> /Users/msantos/System/YESOD/Sandbox/.cabal-sandbox >>>>> msantos at MBP-2[16:41]:~/System/YESOD/Sandbox$cabal install yesod-1.2.6.1 >>>>> Resolving dependencies... >>>>> cabal: Could not resolve dependencies: >>>>> next goal: yesod (user goal) >>>>> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, >>>>> 1.4.0 >>>>> (global constraint requires ==1.2.6.1) >>>>> trying: yesod-1.2.6.1 >>>>> trying: streaming-commons-0.1.12.1 (dependency of yesod-1.2.6.1) >>>>> trying: network-2.4.2.3/installed-575... (dependency of >>>>> streaming-commons-0.1.12.1) >>>>> trying: parsec-3.1.5/installed-04a... (dependency of >>>>> network-2.4.2.3/installed-575...) >>>>> trying: mtl-2.1.3.1/installed-8bc... (dependency of >>>>> parsec-3.1.5/installed-04a...) >>>>> trying: shakespeare-2.0.5 (dependency of yesod-1.2.6.1) >>>>> trying: exceptions-0.8.0.2 (dependency of shakespeare-2.0.5) >>>>> trying: transformers-compat-0.4.0.4 (dependency of exceptions-0.8.0.2) >>>>> trying: transformers-compat-0.4.0.4:-two >>>>> rejecting: transformers-compat-0.4.0.4:-three (conflict: mtl => >>>>> transformers==0.3.0.0/installed-16a..., >>>>> transformers-compat-0.4.0.4:three => >>>>> transformers>=0.4.1 && <0.5) >>>>> rejecting: transformers-compat-0.4.0.4:+three (manual flag can only be >>>>> changed >>>>> explicitly) >>>>> Backjump limit reached (change with --max-backjumps). >>>>> >>>>> Note: when using a sandbox, all packages are required to have >>>>> consistent >>>>> dependencies. Try reinstalling/unregistering the offending packages or >>>>> recreating the sandbox. >>>>> >>>>> -- >>>>> Public key ID: E8FE60D7 >>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>> >>>>> On Thu, Jun 18, 2015 at 4:46 PM, Christopher Allen >>>>> wrote: >>>>>> >>>>>> If you won't use a sandbox, then lets nuke your user package-db and >>>>>> start from scratch: >>>>>> >>>>>> rm -rf ~/.ghc >>>>>> cabal install yesod==1.2.6.1 >>>>>> >>>>>> On Thu, Jun 18, 2015 at 3:28 PM, Miguel A. Santos >>>>>> wrote: >>>>>>> >>>>>>> I haven't yet read how to use sandboxes, so, no, that I tried just >>>>>>> like that cabal install... >>>>>>> I did check first that cabal info yesod was saying I didn't have it >>>>>>> install. But now that you mention it, I did >>>>>>> may have had other packages lingering around from my last attempt of >>>>>>> installing yesod. >>>>>>> >>>>>>> Meanwhile I did run forcing the install of 1.4.0... >>>>>>> Ah, it finished with cabal install --force-reinstalls yesod-1.4.0 >>>>>>> and... >>>>>>> it complains about the shakespeare. >>>>>>> >>>>>>> "shakespeare-2.0.5 failed during the building phase. The exception >>>>>>> was: >>>>>>> ExitFailure 1" >>>>>>> >>>>>>> Below the full output. >>>>>>> >>>>>>> I'll give a try to the sandbox solution. >>>>>>> >>>>>>> ------------------------------------------------ >>>>>>> msantos at MBP-2[16:09]:~/System/YESOD$cabal install --force-reinstalls >>>>>>> yesod-1.4.0 >>>>>>> Resolving dependencies... >>>>>>> Warning: The following packages are likely to be broken by the >>>>>>> reinstalls: >>>>>>> pandoc-citeproc-0.7.1.1 >>>>>>> pandoc-1.14.0.4 >>>>>>> project-template-0.2.0 >>>>>>> http-reverse-proxy-0.4.2 >>>>>>> Continuing even though the plan contains dangerous reinstalls. >>>>>>> Downloading monad-control-0.3.3.1... >>>>>>> Configuring shakespeare-2.0.5... >>>>>>> Configuring monad-control-0.3.3.1... >>>>>>> Building monad-control-0.3.3.1... >>>>>>> Building shakespeare-2.0.5... >>>>>>> Installed monad-control-0.3.3.1 >>>>>>> Configuring lifted-base-0.2.3.6... >>>>>>> Building lifted-base-0.2.3.6... >>>>>>> Configuring resource-pool-0.2.3.2... >>>>>>> Installed lifted-base-0.2.3.6 >>>>>>> Building resource-pool-0.2.3.2... >>>>>>> Installed resource-pool-0.2.3.2 >>>>>>> Configuring enclosed-exceptions-1.0.1.1... >>>>>>> Building enclosed-exceptions-1.0.1.1... >>>>>>> Configuring resourcet-1.1.5... >>>>>>> Installed enclosed-exceptions-1.0.1.1 >>>>>>> Building resourcet-1.1.5... >>>>>>> Failed to install shakespeare-2.0.5 >>>>>>> Build log ( /Users/msantos/.cabal/logs/shakespeare-2.0.5.log ): >>>>>>> Configuring shakespeare-2.0.5... >>>>>>> Building shakespeare-2.0.5... >>>>>>> Preprocessing library shakespeare-2.0.5... >>>>>>> [ 1 of 17] Compiling Text.MkSizeType ( Text/MkSizeType.hs, >>>>>>> dist/build/Text/MkSizeType.o ) >>>>>>> [ 2 of 17] Compiling Text.IndentToBrace ( Text/IndentToBrace.hs, >>>>>>> dist/build/Text/IndentToBrace.o ) >>>>>>> [ 3 of 17] Compiling Text.Shakespeare.Base ( >>>>>>> Text/Shakespeare/Base.hs, dist/build/Text/Shakespeare/Base.o ) >>>>>>> [ 4 of 17] Compiling Text.Hamlet.Parse ( Text/Hamlet/Parse.hs, >>>>>>> dist/build/Text/Hamlet/Parse.o ) >>>>>>> [ 5 of 17] Compiling Text.Hamlet ( Text/Hamlet.hs, >>>>>>> dist/build/Text/Hamlet.o ) >>>>>>> >>>>>>> Text/Hamlet.hs:402:1: Warning: Defined but not used: ?varName? >>>>>>> >>>>>>> Text/Hamlet.hs:406:1: Warning: Defined but not used: ?strToExp? >>>>>>> >>>>>>> Text/Hamlet.hs:439:16: Warning: Defined but not used: ?html? >>>>>>> >>>>>>> Text/Hamlet.hs:440:14: Warning: Defined but not used: ?url? >>>>>>> >>>>>>> Text/Hamlet.hs:441:19: Warning: Defined but not used: ?url? >>>>>>> >>>>>>> Text/Hamlet.hs:442:16: Warning: Defined but not used: ?url? >>>>>>> >>>>>>> Text/Hamlet.hs:443:20: Warning: Defined but not used: ?msg_url? >>>>>>> >>>>>>> Text/Hamlet.hs:444:14: Warning: Defined but not used: ?msg? >>>>>>> >>>>>>> Text/Hamlet.hs:488:43: Warning: >>>>>>> This binding for ?c? shadows the existing binding >>>>>>> bound at Text/Hamlet.hs:484:13 >>>>>>> [ 6 of 17] Compiling Text.Hamlet.RT ( Text/Hamlet/RT.hs, >>>>>>> dist/build/Text/Hamlet/RT.o ) >>>>>>> >>>>>>> Text/Hamlet/RT.hs:78:13: Warning: Defined but not used: ?x? >>>>>>> >>>>>>> Text/Hamlet/RT.hs:78:26: Warning: Defined but not used: ?deref? >>>>>>> >>>>>>> Text/Hamlet/RT.hs:78:45: Warning: Defined but not used: ?docs? >>>>>>> >>>>>>> Text/Hamlet/RT.hs:85:13: Warning: Defined but not used: ?x? >>>>>>> >>>>>>> Text/Hamlet/RT.hs:85:25: Warning: Defined but not used: ?deref? >>>>>>> >>>>>>> Text/Hamlet/RT.hs:85:44: Warning: Defined but not used: ?jdocs? >>>>>>> >>>>>>> Text/Hamlet/RT.hs:85:50: Warning: Defined but not used: ?ndocs? >>>>>>> >>>>>>> Text/Hamlet/RT.hs:115:37: Warning: >>>>>>> This binding for ?x? shadows the existing binding >>>>>>> bound at Text/Hamlet/RT.hs:108:13 >>>>>>> [ 7 of 17] Compiling Text.Shakespeare ( Text/Shakespeare.hs, >>>>>>> dist/build/Text/Shakespeare.o ) >>>>>>> [ 8 of 17] Compiling Text.Shakespeare.Text ( >>>>>>> Text/Shakespeare/Text.hs, dist/build/Text/Shakespeare/Text.o ) >>>>>>> [ 9 of 17] Compiling Text.Julius ( Text/Julius.hs, >>>>>>> dist/build/Text/Julius.o ) >>>>>>> >>>>>>> Text/Julius.hs:90:63: Warning: >>>>>>> In the use of ?fromValue? (imported from Data.Aeson.Encode): >>>>>>> Deprecated: "Use 'encodeToTextBuilder' instead" >>>>>>> [10 of 17] Compiling Text.Roy ( Text/Roy.hs, >>>>>>> dist/build/Text/Roy.o ) >>>>>>> [11 of 17] Compiling Text.Coffee ( Text/Coffee.hs, >>>>>>> dist/build/Text/Coffee.o ) >>>>>>> [12 of 17] Compiling Text.Css ( Text/Css.hs, >>>>>>> dist/build/Text/Css.o ) >>>>>>> >>>>>>> Text/Css.hs:349:40: Warning: Defined but not used: ?subblocks? >>>>>>> >>>>>>> Text/Css.hs:367:5: Warning: Defined but not used: ?subGo? >>>>>>> [13 of 17] Compiling Text.CssCommon ( Text/CssCommon.hs, >>>>>>> dist/build/Text/CssCommon.o ) >>>>>>> Loading package ghc-prim ... linking ... done. >>>>>>> Loading package integer-gmp ... linking ... done. >>>>>>> Loading package base ... linking ... done. >>>>>>> Loading package array-0.5.0.0 ... linking ... done. >>>>>>> Loading package deepseq-1.3.0.2 ... linking ... done. >>>>>>> Loading package filepath-1.3.0.2 ... linking ... done. >>>>>>> Loading package old-locale-1.0.0.6 ... linking ... done. >>>>>>> Loading package time-1.4.2 ... linking ... done. >>>>>>> Loading package bytestring-0.10.4.0 ... linking ... done. >>>>>>> Loading package unix-2.7.0.1 ... linking ... done. >>>>>>> Loading package directory-1.2.1.0 ... linking ... done. >>>>>>> Loading package process-1.2.0.0 ... linking ... done. >>>>>>> Loading package transformers-0.3.0.0 ... linking ... done. >>>>>>> Loading package mtl-2.1.3.1 ... linking ... done. >>>>>>> Loading package text-1.1.0.0 ... linking ... done. >>>>>>> Loading package parsec-3.1.5 ... : can't load .so/.DLL >>>>>>> for: >>>>>>> /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib >>>>>>> (dlopen(/Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib, >>>>>>> 9): Library not loaded: @rpath/libHStext-1.1.0.0-ghc7.8.3.dylib >>>>>>> Referenced from: >>>>>>> /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib >>>>>>> Reason: image not found) >>>>>>> Installed resourcet-1.1.5 >>>>>>> Configuring wai-extra-3.0.7.1... >>>>>>> Configuring conduit-1.2.4.2... >>>>>>> Building conduit-1.2.4.2... >>>>>>> Building wai-extra-3.0.7.1... >>>>>>> Installed conduit-1.2.4.2 >>>>>>> Configuring conduit-extra-1.1.9... >>>>>>> Building conduit-extra-1.1.9... >>>>>>> Configuring http-conduit-2.1.5... >>>>>>> Installed wai-extra-3.0.7.1 >>>>>>> Building http-conduit-2.1.5... >>>>>>> Configuring yaml-0.8.11... >>>>>>> Installed http-conduit-2.1.5 >>>>>>> Building yaml-0.8.11... >>>>>>> Installed conduit-extra-1.1.9 >>>>>>> Configuring monad-logger-0.3.13.1... >>>>>>> Building monad-logger-0.3.13.1... >>>>>>> Configuring xml-conduit-1.3.0... >>>>>>> Installed monad-logger-0.3.13.1 >>>>>>> Building xml-conduit-1.3.0... >>>>>>> Installed yaml-0.8.11 >>>>>>> Configuring persistent-2.1.6... >>>>>>> Building persistent-2.1.6... >>>>>>> Installed xml-conduit-1.3.0 >>>>>>> Configuring tagstream-conduit-0.5.5.3... >>>>>>> Building tagstream-conduit-0.5.5.3... >>>>>>> Installed tagstream-conduit-0.5.5.3 >>>>>>> Configuring authenticate-1.3.2.11... >>>>>>> Building authenticate-1.3.2.11... >>>>>>> Installed authenticate-1.3.2.11 >>>>>>> Installed persistent-2.1.6 >>>>>>> Configuring persistent-template-2.1.3.3... >>>>>>> Building persistent-template-2.1.3.3... >>>>>>> Installed persistent-template-2.1.3.3 >>>>>>> Updating documentation index >>>>>>> >>>>>>> /Users/msantos/Library/Haskell/share/doc/x86_64-osx-ghc-7.8.3/index.html >>>>>>> cabal: Error: some packages failed to install: >>>>>>> shakespeare-2.0.5 failed during the building phase. The exception >>>>>>> was: >>>>>>> ExitFailure 1 >>>>>>> yesod-1.4.0 depends on shakespeare-2.0.5 which failed to install. >>>>>>> yesod-auth-1.4.5 depends on shakespeare-2.0.5 which failed to >>>>>>> install. >>>>>>> yesod-core-1.4.9.1 depends on shakespeare-2.0.5 which failed to >>>>>>> install. >>>>>>> yesod-form-1.4.4.1 depends on shakespeare-2.0.5 which failed to >>>>>>> install. >>>>>>> yesod-persistent-1.4.0.2 depends on shakespeare-2.0.5 which failed to >>>>>>> install. >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Public key ID: E8FE60D7 >>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>>> >>>>>>> On Thu, Jun 18, 2015 at 4:16 PM, Christopher Allen >>>>>>> wrote: >>>>>>>> >>>>>>>> Some of that looks like churn from trying to install an older >>>>>>>> version of Yesod over a newer one. Are you using a sandbox? if so, did you >>>>>>>> wipe it out before attempting Yesod 1.2.6.1? What we'd be looking for is a >>>>>>>> package conflict that tells you which package of what version that is >>>>>>>> globally installed is causing the conflict. >>>>>>>> >>>>>>>> Insta-Yesodian conflict implies you're reinstalling into a not-fresh >>>>>>>> packgage-db which means you either need to wipe your user package-db or use >>>>>>>> a sandbox. (I recommend the latter). >>>>>>>> >>>>>>>> If you haven't done so, do that, then re-attempt that version of >>>>>>>> Yesod (1.2.6.1). >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Thu, Jun 18, 2015 at 2:57 PM, Miguel A. Santos >>>>>>>> wrote: >>>>>>>>> >>>>>>>>> Thanks! No problem. I gave a try to your suggestion. It doesn't >>>>>>>>> look I'll get yesod installed without "paying" >>>>>>>>> a bigger price than just "downgrading". :-/ >>>>>>>>> >>>>>>>>> Yesod 1.4.0 warns that forcing installing it will likely break >>>>>>>>> pandoc, among other things. >>>>>>>>> I can give it a try though, but I really use pandoc regularly. >>>>>>>>> Plus, it's still not clear that the building process >>>>>>>>> will not fail. And installing pandoc took me surprisingly a lot of >>>>>>>>> time last time. >>>>>>>>> >>>>>>>>> Forcing Yesod-1.2.6.1 won't allow cabal to satisfy the >>>>>>>>> dependencies. >>>>>>>>> >>>>>>>>> I guess I could keep trying other versions and see. But I think >>>>>>>>> I'll try the 1.4.0 first. Will post here >>>>>>>>> the results so that at least others may hopefully benefit from >>>>>>>>> this. >>>>>>>>> >>>>>>>>> >>>>>>>>> ----------------------------------------------------------------------------------------- >>>>>>>>> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.4.0 >>>>>>>>> Resolving dependencies... >>>>>>>>> In order, the following would be installed: >>>>>>>>> monad-control-0.3.3.1 (latest: 1.0.0.4) (via: yesod-1.4.0 >>>>>>>>> yesod-core-1.4.9.1 authenticate-1.3.2.11 xml-conduit-1.3.0 >>>>>>>>> persistent-template-2.1.3.3 persistent-2.1.6 monad-logger-0.3.13.1 >>>>>>>>> http-conduit-2.1.5 conduit-extra-1.1.9 resourcet-1.1.5 resource-pool-0.2.3.2 >>>>>>>>> enclosed-exceptions-1.0.1.1 lifted-base-0.2.3.6) (new version) >>>>>>>>> lifted-base-0.2.3.6 (via: yesod-auth-1.4.5 yesod-core-1.4.9.1 >>>>>>>>> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 >>>>>>>>> conduit-1.2.4.2 resourcet-1.1.5 enclosed-exceptions-1.0.1.1) (reinstall) >>>>>>>>> (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>>>> enclosed-exceptions-1.0.1.1 (via: yaml-0.8.11) (reinstall) >>>>>>>>> (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>>>> resource-pool-0.2.3.2 (via: yesod-persistent-1.4.0.2 >>>>>>>>> persistent-2.1.6) (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>>>> resourcet-1.1.5 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 >>>>>>>>> yesod-persistent-1.4.0.2 yesod-core-1.4.9.1 yaml-0.8.11 >>>>>>>>> authenticate-1.3.2.11 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 >>>>>>>>> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 http-conduit-2.1.5 >>>>>>>>> conduit-extra-1.1.9 conduit-1.2.4.2) (reinstall) (changes: >>>>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>>>> conduit-1.2.4.2 (via: yesod-auth-1.4.5 yesod-persistent-1.4.0.2 >>>>>>>>> yesod-core-1.4.9.1 yaml-0.8.11 authenticate-1.3.2.11 >>>>>>>>> tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 persistent-2.1.6 >>>>>>>>> monad-logger-0.3.13.1 http-conduit-2.1.5 conduit-extra-1.1.9) (reinstall) >>>>>>>>> conduit-extra-1.1.9 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>>>>>> yesod-core-1.4.9.1 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 >>>>>>>>> monad-logger-0.3.13.1) (reinstall) (changes: monad-control-1.0.0.4 -> >>>>>>>>> 0.3.3.1) >>>>>>>>> http-conduit-2.1.5 (via: yesod-auth-1.4.5 authenticate-1.3.2.11) >>>>>>>>> (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>>>> monad-logger-0.3.13.1 (via: yesod-1.4.0 yesod-core-1.4.9.1 >>>>>>>>> persistent-template-2.1.3.3 persistent-2.1.6) (reinstall) (changes: >>>>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>>>> persistent-2.1.6 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 >>>>>>>>> yesod-persistent-1.4.0.2 persistent-template-2.1.3.3) (reinstall) (changes: >>>>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>>>> persistent-template-2.1.3.3 (via: yesod-auth-1.4.5 >>>>>>>>> yesod-persistent-1.4.0.2) (reinstall) (changes: monad-control-1.0.0.4 -> >>>>>>>>> 0.3.3.1) >>>>>>>>> shakespeare-2.0.5 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>>>>>> yesod-form-1.4.4.1 yesod-core-1.4.9.1) (new package) >>>>>>>>> wai-extra-3.0.7.1 (via: yesod-1.4.0 yesod-core-1.4.9.1) (reinstall) >>>>>>>>> xml-conduit-1.3.0 (via: authenticate-1.3.2.11 >>>>>>>>> tagstream-conduit-0.5.5.3) (reinstall) (changes: monad-control-1.0.0.4 -> >>>>>>>>> 0.3.3.1) >>>>>>>>> tagstream-conduit-0.5.5.3 (via: authenticate-1.3.2.11) (reinstall) >>>>>>>>> authenticate-1.3.2.11 (via: yesod-auth-1.4.5) (reinstall) (changes: >>>>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >>>>>>>>> yaml-0.8.11 (via: yesod-1.4.0) (reinstall) >>>>>>>>> yesod-core-1.4.9.1 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>>>>>> yesod-form-1.4.4.1 yesod-persistent-1.4.0.2) (new package) >>>>>>>>> yesod-persistent-1.4.0.2 (via: yesod-1.4.0 yesod-auth-1.4.5 >>>>>>>>> yesod-form-1.4.4.1) (new package) >>>>>>>>> yesod-form-1.4.4.1 (via: yesod-1.4.0 yesod-auth-1.4.5) (new >>>>>>>>> package) >>>>>>>>> yesod-auth-1.4.5 (via: yesod-1.4.0) (new package) >>>>>>>>> yesod-1.4.0 (latest: 1.4.1.5) (new package) >>>>>>>>> cabal: The following packages are likely to be broken by the >>>>>>>>> reinstalls: >>>>>>>>> pandoc-citeproc-0.7.1.1 >>>>>>>>> pandoc-1.14.0.4 >>>>>>>>> project-template-0.2.0 >>>>>>>>> http-reverse-proxy-0.4.2 >>>>>>>>> Use --force-reinstalls if you want to install anyway. >>>>>>>>> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.2.6.1 >>>>>>>>> Resolving dependencies... >>>>>>>>> cabal: Could not resolve dependencies: >>>>>>>>> next goal: yesod (user goal) >>>>>>>>> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, >>>>>>>>> 1.4.1, 1.4.0 >>>>>>>>> (global constraint requires ==1.2.6.1) >>>>>>>>> trying: yesod-1.2.6.1 >>>>>>>>> trying: streaming-commons-0.1.12.1/installed-200... (dependency of >>>>>>>>> yesod-1.2.6.1) >>>>>>>>> trying: warp-3.0.13.1/installed-150... (dependency of >>>>>>>>> yesod-1.2.6.1) >>>>>>>>> next goal: yesod-form (dependency of yesod-1.2.6.1) >>>>>>>>> rejecting: yesod-form-1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2.1, >>>>>>>>> 1.4.2, 1.4.1.1, >>>>>>>>> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => yesod-form>=1.3 >>>>>>>>> && <1.4) >>>>>>>>> trying: yesod-form-1.3.16 >>>>>>>>> next goal: persistent (dependency of yesod-form-1.3.16) >>>>>>>>> rejecting: persistent-2.1.6/installed-4f9..., 2.1.6, 2.1.5, 2.1.4, >>>>>>>>> 2.1.3, >>>>>>>>> 2.1.2, 2.1.1.7, 2.1.1.6, 2.1.1.5, 2.1.1.4, 2.1.1.3, 2.1.1.2, >>>>>>>>> 2.1.1.1, 2.1.1, >>>>>>>>> 2.1.0.2, 2.1.0.1, 2.1 (conflict: yesod-form => persistent>=1.2 && >>>>>>>>> <2.1) >>>>>>>>> trying: persistent-1.3.3 >>>>>>>>> trying: path-pieces-0.2.0/installed-533... (dependency of >>>>>>>>> persistent-1.3.3) >>>>>>>>> next goal: yesod-core (dependency of yesod-1.2.6.1) >>>>>>>>> rejecting: yesod-core-1.4.9.1, 1.4.9, 1.4.8.3, 1.4.8.2, 1.4.8.1, >>>>>>>>> 1.4.8, >>>>>>>>> 1.4.7.3, 1.4.7.2, 1.4.7.1, 1.4.7, 1.4.6.2, 1.4.6.1, 1.4.6, 1.4.5, >>>>>>>>> 1.4.4.5, >>>>>>>>> 1.4.4.4, 1.4.4.3, 1.4.4.2, 1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2, >>>>>>>>> 1.4.1.1, >>>>>>>>> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => >>>>>>>>> yesod-core>=1.2.2 && <1.3) >>>>>>>>> rejecting: yesod-core-1.2.20.1, 1.2.20, 1.2.19.2, 1.2.19.1, 1.2.19, >>>>>>>>> 1.2.18, >>>>>>>>> 1.2.17, 1.2.16.1, 1.2.16, 1.2.15.2, 1.2.15.1, 1.2.15, 1.2.14, >>>>>>>>> 1.2.13.1, >>>>>>>>> 1.2.13, 1.2.12, 1.2.11.1, 1.2.11, 1.2.10, 1.2.9.2, 1.2.9.1, 1.2.9, >>>>>>>>> 1.2.8, >>>>>>>>> 1.2.7, 1.2.6.7, 1.2.6.6, 1.2.6.5, 1.2.6.4, 1.2.6.3, 1.2.6.2, >>>>>>>>> 1.2.6.1 >>>>>>>>> (conflict: path-pieces==0.2.0/installed-533..., yesod-core => >>>>>>>>> path-pieces>=0.1.2 && <0.2) >>>>>>>>> rejecting: yesod-core-1.2.6 (conflict: streaming-commons => >>>>>>>>> text==1.1.0.0/installed-9bd..., yesod-core => text>=0.7 && <0.12) >>>>>>>>> rejecting: yesod-core-1.2.5, 1.2.4.5, 1.2.4.4, 1.2.4.3, 1.2.4.2, >>>>>>>>> 1.2.4.1, >>>>>>>>> 1.2.4, 1.2.3, 1.2.2 (conflict: warp => >>>>>>>>> wai==3.0.2.3/installed-39c..., >>>>>>>>> yesod-core => wai>=1.4 && <1.5) >>>>>>>>> rejecting: yesod-core-1.2.1, 1.2.0.4, 1.2.0.3, 1.2.0.2, 1.2.0.1, >>>>>>>>> 1.2.0, >>>>>>>>> 1.1.8.3, 1.1.8.2, 1.1.8.1, 1.1.8, 1.1.7.2, 1.1.7.1, 1.1.7, 1.1.6.1, >>>>>>>>> 1.1.6, >>>>>>>>> 1.1.5, 1.1.4.2, 1.1.4.1, 1.1.4, 1.1.3.1, 1.1.3, 1.1.2.2, 1.1.2.1, >>>>>>>>> 1.1.2, >>>>>>>>> 1.1.1.2, 1.1.1.1, 1.1.1, 1.1.0.1, 1.1.0, 1.0.1.3, 1.0.1.2, 1.0.1.1, >>>>>>>>> 1.0.1, >>>>>>>>> 1.0.0.2, 1.0.0.1, 1.0.0, 0.10.3, 0.10.2.2, 0.10.2.1, 0.10.2, >>>>>>>>> 0.10.1, 0.9.4.1, >>>>>>>>> 0.9.4, 0.9.3.6, 0.9.3.5, 0.9.3.4, 0.9.3.3, 0.9.3.2, 0.9.3.1, 0.9.3, >>>>>>>>> 0.9.2, >>>>>>>>> 0.9.1.1, 0.9.1, 0.8.3.2, 0.8.3.1, 0.8.3, 0.8.2, 0.8.1, 0.8.0.1, >>>>>>>>> 0.8.0, >>>>>>>>> 0.7.0.2, 0.7.0.1, 0.7.0 (conflict: yesod => yesod-core>=1.2.2 && >>>>>>>>> <1.3) >>>>>>>>> Backjump limit reached (change with --max-backjumps). >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Public key ID: E8FE60D7 >>>>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>>>>> >>>>>>>>> On Thu, Jun 18, 2015 at 3:32 PM, Christopher Allen >>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>> Ah that's frustrating, that's my mistake ? I'm sorry. I thought >>>>>>>>>> you were talking about GHC for Mac OS X not being available for your OS >>>>>>>>>> version either. >>>>>>>>>> >>>>>>>>>> Your best bet on HP is to specify an older version of Yesod that >>>>>>>>>> will work with the dependencies that your version of HP comes with. >>>>>>>>>> >>>>>>>>>> On Thu, Jun 18, 2015 at 2:08 PM, Miguel A. Santos >>>>>>>>>> wrote: >>>>>>>>>>> >>>>>>>>>>> Indeed I saw that. That's what I meant with the bindist not being >>>>>>>>>>> available for OSX 10.6.8; only for 10.7+ >>>>>>>>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#macosx_x86_64 >>>>>>>>>>> My bad, I should have said it before. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Public key ID: E8FE60D7 >>>>>>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>>>>>>> >>>>>>>>>>> On Thu, Jun 18, 2015 at 2:36 PM, Christopher Allen >>>>>>>>>>> wrote: >>>>>>>>>>>> >>>>>>>>>>>> Did you see that the Mac instructions said to follow the "other >>>>>>>>>>>> *nix" instructions if you were using an older version of Mac OS X? >>>>>>>>>>>> >>>>>>>>>>>> Those link here: >>>>>>>>>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#binaries >>>>>>>>>>>> >>>>>>>>>>>> Get rid of all that (GHC, HP, Cabal), then install GHC using the >>>>>>>>>>>> bindist for Mac OS X linked above. >>>>>>>>>>>> >>>>>>>>>>>> On Thu, Jun 18, 2015 at 1:14 PM, Miguel A. Santos >>>>>>>>>>>> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>> That is obviously a typo: I meant I *did* do a fresh install of >>>>>>>>>>>>> the Haskell Platform and cabal before >>>>>>>>>>>>> trying -and failing- to install yesod. >>>>>>>>>>>>> >>>>>>>>>>>>> On Thu, Jun 18, 2015 at 1:38 PM, Miguel A. Santos >>>>>>>>>>>>> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>> This corresponds to a fresh install of the HP, ghc, and cabal >>>>>>>>>>>>>> I didn't before trying to install yesod. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> Public key ID: E8FE60D7 >>>>>>>>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Haskell-Cafe mailing list >>>>>>>>>>>>> Haskell-Cafe at haskell.org >>>>>>>>>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Chris Allen >>>>>>>>>>>> Currently working on http://haskellbook.com >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Chris Allen >>>>>>>>>> Currently working on http://haskellbook.com >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Chris Allen >>>>>>>> Currently working on http://haskellbook.com >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Chris Allen >>>>>> Currently working on http://haskellbook.com >>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> Chris Allen >>>> Currently working on http://haskellbook.com >>> >>> >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > From heraldhoi at gmail.com Fri Jun 19 08:10:55 2015 From: heraldhoi at gmail.com (Geraldus) Date: Fri, 19 Jun 2015 08:10:55 +0000 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: Try stack first https://www.fpcomplete.com/blog/2015/06/announcing-first-public-beta-stack ??, 19 ???? 2015 ?. ? 12:52, David Turner : > Hi, > > I think Stackage will solve these issues - indeed, I believe that > Stackage grew out of the difficulty of installing Yesod and its > dependencies straight from Hackage using cabal. > > If you download https://www.stackage.org/lts/cabal.config next to your > own .cabal file then it will constrain cabal to only use a set of > packages which are known to be mutually compatible. > > Hope that helps, > > David > > > > > On 19 June 2015 at 08:37, Geraldus wrote: > > Hi, Miguel. Haskell Platform includes GHC itself and some set of > packages, > > such as text, network, and etc. If I recall correctly thete was issues > with > > Yesod and HP because some package versions and the best way to install > Yesod > > were sandboxes, because sandbox have its own package database. > > Removing or just moving .ghc folder helped me in past several times, > usually > > it was needed when different projects depends on different package > versions, > > now I put every project inside sandbox to prevent this. > > As for pandoc, if you use only binary you can install it having no GHC at > > all (download package installer from website). > > If I were you I'll install GHC 7.8.* alone rather than Platform, > > caball-install 1.22.* and try to build everything againg using sandboxes. > > Also there is a Stackage and its tools (stackage-cli and recently > released > > stack), they are very helpful in caball-hell issues. Also there is > Halcyon > > but I have not tried it myself. Apologize for missing links, I'm mobile > now. > > > > > > 3:23 ?? ???????, ??, 19.06.2015, Miguel A. Santos > > : > >> > >> One more detail about my try with rm ~/.ghc: > >> I find it curious that I didn't get that directory rebuild again when > >> trying to install yesod. > >> Did I miss something? > >> > >> -- > >> Public key ID: E8FE60D7 > >> Public key server: see, e.g., hkp://keys.gnupg.net > >> > >> On Thu, Jun 18, 2015 at 6:18 PM, Miguel A. Santos > >> wrote: > >>> > >>> Ok, removing ~/.ghc (actually just moving it to ~/.ghc-org) didn't work > >>> either. The detailed output is below > >>> but from a cursory view it seems not much better than within the > sandbox > >>> try before. > >>> > >>> I understand I'm staying in the "past" and with that comes problems > like > >>> this one, but upgrading to Yellowstone > >>> is not an option for me. > >>> > >>> I have some questions about your other options. In particular, I'm not > >>> sure what you mean by (capitals) GHC. > >>> I thought that's just the compiler. I don't understand your first > >>> sentence after "vanilla". What is what I got > >>> with HP if not GHC for MacOSX!? > >>> > >>> About point 2., I'm building (already for hours, that's the 'other' > >>> process I'd running) ghc from the tarball ghc-7.8.4-src.tar.bz2 > available at > >>> the bottom of that same link we mentioned before, namely, > >>> https://www.haskell.org/ghc/download_ghc_7_8_4#binaries Is this the > same as > >>> what you mean by this 2nd option? Mind you I'm already using version > 7.8.3. > >>> How will a new version of the compiler change what looks like a > >>> compatibility problem with a package? or you mean it is not that > simple? > >>> > >>> Option 3: It seems to me I may as well just remove everything, install > HP > >>> again (already downloaded) and after > >>> that step finishes, trying installing right away yesod, before I try > with > >>> any other packages. Seems a path based > >>> mostly on blind hope than logic to me :-p as the only big thing I > >>> installed between my fresh install of HP and my initial try of yesod > was > >>> pandoc, which had some large dependencies to deal with. But it's a > simple > >>> one, so I may check it definitely out > >>> of the equation. > >>> > >>> Option 4: I guess this is something I can try right away without much > >>> effort. To be concrete you mean then > >>> cabal install --allow-newer yesod ? > >>> > >>> Btw, thanks so much for your prompt help! > >>> > >>> -------------------------------------------- > >>> msantos at MBP-2[17:09]:~/System/YESOD$mv ~/.ghc/ ~/.ghc-org > >>> msantos at MBP-2[17:30]:~$cabal install yesod==1.2.6.1 > >>> Warning: The package list for 'hackage.haskell.org' is 15.0 days old. > >>> Run 'cabal update' to get the latest list of available packages. > >>> Resolving dependencies... > >>> cabal: Could not resolve dependencies: > >>> next goal: yesod (user goal) > >>> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, > >>> 1.4.0 > >>> (global constraint requires ==1.2.6.1) > >>> trying: yesod-1.2.6.1 > >>> trying: streaming-commons-0.1.12.1 (dependency of yesod-1.2.6.1) > >>> trying: network-2.4.2.3/installed-575... (dependency of > >>> streaming-commons-0.1.12.1) > >>> trying: parsec-3.1.5/installed-04a... (dependency of > >>> network-2.4.2.3/installed-575...) > >>> trying: mtl-2.1.3.1/installed-8bc... (dependency of > >>> parsec-3.1.5/installed-04a...) > >>> trying: shakespeare-2.0.5 (dependency of yesod-1.2.6.1) > >>> trying: exceptions-0.8.0.2 (dependency of shakespeare-2.0.5) > >>> trying: transformers-compat-0.4.0.4 (dependency of exceptions-0.8.0.2) > >>> trying: transformers-compat-0.4.0.4:-two > >>> rejecting: transformers-compat-0.4.0.4:-three (conflict: mtl => > >>> transformers==0.3.0.0/installed-16a..., > transformers-compat-0.4.0.4:three > >>> => > >>> transformers>=0.4.1 && <0.5) > >>> rejecting: transformers-compat-0.4.0.4:+three (manual flag can only be > >>> changed > >>> explicitly) > >>> Backjump limit reached (change with --max-backjumps). > >>> > >>> -- > >>> Public key ID: E8FE60D7 > >>> Public key server: see, e.g., hkp://keys.gnupg.net > >>> > >>> On Thu, Jun 18, 2015 at 5:15 PM, Christopher Allen > >>> wrote: > >>>> > >>>> You don't need to rm -rf ~/.ghc if you're using a sandbox. The sandbox > >>>> (usually) occludes the user package-db. > >>>> > >>>> Well, the sandbox may not have fixed the incompatibility of HP and > that > >>>> particular version of Yesod, but we're better information from the > >>>> dependency solver. > >>>> > >>>> That said, this is going to simply require a lot of trial and error if > >>>> you want to try this approach and me telling you increment/decrement > >>>> versions isn't going to be any faster. > >>>> > >>>> I'd say your best options are: > >>>> > >>>> 1. Upgrade your installation of Mac OS X so you can use the vanilla > GHC > >>>> bindist, or even better, GHC for Mac OS X > >>>> > >>>> 2. Use your copy of Haskell Platform to build GHC from source and use > >>>> that instead of GHC (possibly a quagmire, might work out okay. Will > take a > >>>> long time to build.) > >>>> > >>>> 3. Unregister all the unnecessary packages from your global > package-db. > >>>> Listing here: https://www.haskell.org/platform/changelog.html > >>>> (Additional Platform Libraries, do *not* uninstall any of the core > >>>> libraries) > >>>> If you make a mistake you may need to reinstall Platform. > >>>> > >>>> 4. Give passing --allow-newer to cabal install a shot. > >>>> > >>>> This is rough. Not that many people on <10.7 OS X versions so there > >>>> aren't enough squeaky wheels for this sort of thing. > >>>> > >>>> Sorry I couldn't do more. > >>>> > >>>> > >>>> > >>>> On Thu, Jun 18, 2015 at 3:54 PM, Miguel A. Santos > >>>> wrote: > >>>>> > >>>>> Hmm.. wouldn't that mean, I later have to reinstall all my packages? > >>>>> :-/ > >>>>> > >>>>> Meanwhile, I did try the sandbox way. It didn't work either. Briefly > I > >>>>> issued > >>>>> cabal sandbox init > >>>>> and then > >>>>> cabal install yesod-1.2.6.1 > >>>>> Details below. > >>>>> > >>>>> The initial complain about not being able to resolve dependencies > makes > >>>>> me think > >>>>> I may be missing more things about working with sandboxes. Just > checked > >>>>> > >>>>> > https://www.haskell.org/cabal/users-guide/installing-packages.html#developing-with-sandboxes > >>>>> and guessed the init would be enough. > >>>>> > >>>>> -------------------------------------------------------- > >>>>> msantos at MBP-2[16:38]:~/System/YESOD/Sandbox$cabal sandbox init > >>>>> Writing a default package environment file to > >>>>> /Users/msantos/System/YESOD/Sandbox/cabal.sandbox.config > >>>>> Creating a new sandbox at > >>>>> /Users/msantos/System/YESOD/Sandbox/.cabal-sandbox > >>>>> msantos at MBP-2[16:41]:~/System/YESOD/Sandbox$cabal install > yesod-1.2.6.1 > >>>>> Resolving dependencies... > >>>>> cabal: Could not resolve dependencies: > >>>>> next goal: yesod (user goal) > >>>>> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, > >>>>> 1.4.0 > >>>>> (global constraint requires ==1.2.6.1) > >>>>> trying: yesod-1.2.6.1 > >>>>> trying: streaming-commons-0.1.12.1 (dependency of yesod-1.2.6.1) > >>>>> trying: network-2.4.2.3/installed-575... (dependency of > >>>>> streaming-commons-0.1.12.1) > >>>>> trying: parsec-3.1.5/installed-04a... (dependency of > >>>>> network-2.4.2.3/installed-575...) > >>>>> trying: mtl-2.1.3.1/installed-8bc... (dependency of > >>>>> parsec-3.1.5/installed-04a...) > >>>>> trying: shakespeare-2.0.5 (dependency of yesod-1.2.6.1) > >>>>> trying: exceptions-0.8.0.2 (dependency of shakespeare-2.0.5) > >>>>> trying: transformers-compat-0.4.0.4 (dependency of > exceptions-0.8.0.2) > >>>>> trying: transformers-compat-0.4.0.4:-two > >>>>> rejecting: transformers-compat-0.4.0.4:-three (conflict: mtl => > >>>>> transformers==0.3.0.0/installed-16a..., > >>>>> transformers-compat-0.4.0.4:three => > >>>>> transformers>=0.4.1 && <0.5) > >>>>> rejecting: transformers-compat-0.4.0.4:+three (manual flag can only > be > >>>>> changed > >>>>> explicitly) > >>>>> Backjump limit reached (change with --max-backjumps). > >>>>> > >>>>> Note: when using a sandbox, all packages are required to have > >>>>> consistent > >>>>> dependencies. Try reinstalling/unregistering the offending packages > or > >>>>> recreating the sandbox. > >>>>> > >>>>> -- > >>>>> Public key ID: E8FE60D7 > >>>>> Public key server: see, e.g., hkp://keys.gnupg.net > >>>>> > >>>>> On Thu, Jun 18, 2015 at 4:46 PM, Christopher Allen < > cma at bitemyapp.com> > >>>>> wrote: > >>>>>> > >>>>>> If you won't use a sandbox, then lets nuke your user package-db and > >>>>>> start from scratch: > >>>>>> > >>>>>> rm -rf ~/.ghc > >>>>>> cabal install yesod==1.2.6.1 > >>>>>> > >>>>>> On Thu, Jun 18, 2015 at 3:28 PM, Miguel A. Santos > >>>>>> wrote: > >>>>>>> > >>>>>>> I haven't yet read how to use sandboxes, so, no, that I tried just > >>>>>>> like that cabal install... > >>>>>>> I did check first that cabal info yesod was saying I didn't have it > >>>>>>> install. But now that you mention it, I did > >>>>>>> may have had other packages lingering around from my last attempt > of > >>>>>>> installing yesod. > >>>>>>> > >>>>>>> Meanwhile I did run forcing the install of 1.4.0... > >>>>>>> Ah, it finished with cabal install --force-reinstalls yesod-1.4.0 > >>>>>>> and... > >>>>>>> it complains about the shakespeare. > >>>>>>> > >>>>>>> "shakespeare-2.0.5 failed during the building phase. The exception > >>>>>>> was: > >>>>>>> ExitFailure 1" > >>>>>>> > >>>>>>> Below the full output. > >>>>>>> > >>>>>>> I'll give a try to the sandbox solution. > >>>>>>> > >>>>>>> ------------------------------------------------ > >>>>>>> msantos at MBP-2[16:09]:~/System/YESOD$cabal install > --force-reinstalls > >>>>>>> yesod-1.4.0 > >>>>>>> Resolving dependencies... > >>>>>>> Warning: The following packages are likely to be broken by the > >>>>>>> reinstalls: > >>>>>>> pandoc-citeproc-0.7.1.1 > >>>>>>> pandoc-1.14.0.4 > >>>>>>> project-template-0.2.0 > >>>>>>> http-reverse-proxy-0.4.2 > >>>>>>> Continuing even though the plan contains dangerous reinstalls. > >>>>>>> Downloading monad-control-0.3.3.1... > >>>>>>> Configuring shakespeare-2.0.5... > >>>>>>> Configuring monad-control-0.3.3.1... > >>>>>>> Building monad-control-0.3.3.1... > >>>>>>> Building shakespeare-2.0.5... > >>>>>>> Installed monad-control-0.3.3.1 > >>>>>>> Configuring lifted-base-0.2.3.6... > >>>>>>> Building lifted-base-0.2.3.6... > >>>>>>> Configuring resource-pool-0.2.3.2... > >>>>>>> Installed lifted-base-0.2.3.6 > >>>>>>> Building resource-pool-0.2.3.2... > >>>>>>> Installed resource-pool-0.2.3.2 > >>>>>>> Configuring enclosed-exceptions-1.0.1.1... > >>>>>>> Building enclosed-exceptions-1.0.1.1... > >>>>>>> Configuring resourcet-1.1.5... > >>>>>>> Installed enclosed-exceptions-1.0.1.1 > >>>>>>> Building resourcet-1.1.5... > >>>>>>> Failed to install shakespeare-2.0.5 > >>>>>>> Build log ( /Users/msantos/.cabal/logs/shakespeare-2.0.5.log ): > >>>>>>> Configuring shakespeare-2.0.5... > >>>>>>> Building shakespeare-2.0.5... > >>>>>>> Preprocessing library shakespeare-2.0.5... > >>>>>>> [ 1 of 17] Compiling Text.MkSizeType ( Text/MkSizeType.hs, > >>>>>>> dist/build/Text/MkSizeType.o ) > >>>>>>> [ 2 of 17] Compiling Text.IndentToBrace ( Text/IndentToBrace.hs, > >>>>>>> dist/build/Text/IndentToBrace.o ) > >>>>>>> [ 3 of 17] Compiling Text.Shakespeare.Base ( > >>>>>>> Text/Shakespeare/Base.hs, dist/build/Text/Shakespeare/Base.o ) > >>>>>>> [ 4 of 17] Compiling Text.Hamlet.Parse ( Text/Hamlet/Parse.hs, > >>>>>>> dist/build/Text/Hamlet/Parse.o ) > >>>>>>> [ 5 of 17] Compiling Text.Hamlet ( Text/Hamlet.hs, > >>>>>>> dist/build/Text/Hamlet.o ) > >>>>>>> > >>>>>>> Text/Hamlet.hs:402:1: Warning: Defined but not used: ?varName? > >>>>>>> > >>>>>>> Text/Hamlet.hs:406:1: Warning: Defined but not used: ?strToExp? > >>>>>>> > >>>>>>> Text/Hamlet.hs:439:16: Warning: Defined but not used: ?html? > >>>>>>> > >>>>>>> Text/Hamlet.hs:440:14: Warning: Defined but not used: ?url? > >>>>>>> > >>>>>>> Text/Hamlet.hs:441:19: Warning: Defined but not used: ?url? > >>>>>>> > >>>>>>> Text/Hamlet.hs:442:16: Warning: Defined but not used: ?url? > >>>>>>> > >>>>>>> Text/Hamlet.hs:443:20: Warning: Defined but not used: ?msg_url? > >>>>>>> > >>>>>>> Text/Hamlet.hs:444:14: Warning: Defined but not used: ?msg? > >>>>>>> > >>>>>>> Text/Hamlet.hs:488:43: Warning: > >>>>>>> This binding for ?c? shadows the existing binding > >>>>>>> bound at Text/Hamlet.hs:484:13 > >>>>>>> [ 6 of 17] Compiling Text.Hamlet.RT ( Text/Hamlet/RT.hs, > >>>>>>> dist/build/Text/Hamlet/RT.o ) > >>>>>>> > >>>>>>> Text/Hamlet/RT.hs:78:13: Warning: Defined but not used: ?x? > >>>>>>> > >>>>>>> Text/Hamlet/RT.hs:78:26: Warning: Defined but not used: ?deref? > >>>>>>> > >>>>>>> Text/Hamlet/RT.hs:78:45: Warning: Defined but not used: ?docs? > >>>>>>> > >>>>>>> Text/Hamlet/RT.hs:85:13: Warning: Defined but not used: ?x? > >>>>>>> > >>>>>>> Text/Hamlet/RT.hs:85:25: Warning: Defined but not used: ?deref? > >>>>>>> > >>>>>>> Text/Hamlet/RT.hs:85:44: Warning: Defined but not used: ?jdocs? > >>>>>>> > >>>>>>> Text/Hamlet/RT.hs:85:50: Warning: Defined but not used: ?ndocs? > >>>>>>> > >>>>>>> Text/Hamlet/RT.hs:115:37: Warning: > >>>>>>> This binding for ?x? shadows the existing binding > >>>>>>> bound at Text/Hamlet/RT.hs:108:13 > >>>>>>> [ 7 of 17] Compiling Text.Shakespeare ( Text/Shakespeare.hs, > >>>>>>> dist/build/Text/Shakespeare.o ) > >>>>>>> [ 8 of 17] Compiling Text.Shakespeare.Text ( > >>>>>>> Text/Shakespeare/Text.hs, dist/build/Text/Shakespeare/Text.o ) > >>>>>>> [ 9 of 17] Compiling Text.Julius ( Text/Julius.hs, > >>>>>>> dist/build/Text/Julius.o ) > >>>>>>> > >>>>>>> Text/Julius.hs:90:63: Warning: > >>>>>>> In the use of ?fromValue? (imported from Data.Aeson.Encode): > >>>>>>> Deprecated: "Use 'encodeToTextBuilder' instead" > >>>>>>> [10 of 17] Compiling Text.Roy ( Text/Roy.hs, > >>>>>>> dist/build/Text/Roy.o ) > >>>>>>> [11 of 17] Compiling Text.Coffee ( Text/Coffee.hs, > >>>>>>> dist/build/Text/Coffee.o ) > >>>>>>> [12 of 17] Compiling Text.Css ( Text/Css.hs, > >>>>>>> dist/build/Text/Css.o ) > >>>>>>> > >>>>>>> Text/Css.hs:349:40: Warning: Defined but not used: ?subblocks? > >>>>>>> > >>>>>>> Text/Css.hs:367:5: Warning: Defined but not used: ?subGo? > >>>>>>> [13 of 17] Compiling Text.CssCommon ( Text/CssCommon.hs, > >>>>>>> dist/build/Text/CssCommon.o ) > >>>>>>> Loading package ghc-prim ... linking ... done. > >>>>>>> Loading package integer-gmp ... linking ... done. > >>>>>>> Loading package base ... linking ... done. > >>>>>>> Loading package array-0.5.0.0 ... linking ... done. > >>>>>>> Loading package deepseq-1.3.0.2 ... linking ... done. > >>>>>>> Loading package filepath-1.3.0.2 ... linking ... done. > >>>>>>> Loading package old-locale-1.0.0.6 ... linking ... done. > >>>>>>> Loading package time-1.4.2 ... linking ... done. > >>>>>>> Loading package bytestring-0.10.4.0 ... linking ... done. > >>>>>>> Loading package unix-2.7.0.1 ... linking ... done. > >>>>>>> Loading package directory-1.2.1.0 ... linking ... done. > >>>>>>> Loading package process-1.2.0.0 ... linking ... done. > >>>>>>> Loading package transformers-0.3.0.0 ... linking ... done. > >>>>>>> Loading package mtl-2.1.3.1 ... linking ... done. > >>>>>>> Loading package text-1.1.0.0 ... linking ... done. > >>>>>>> Loading package parsec-3.1.5 ... : can't load > .so/.DLL > >>>>>>> for: > >>>>>>> > /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib > >>>>>>> > (dlopen(/Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib, > >>>>>>> 9): Library not loaded: @rpath/libHStext-1.1.0.0-ghc7.8.3.dylib > >>>>>>> Referenced from: > >>>>>>> > /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib > >>>>>>> Reason: image not found) > >>>>>>> Installed resourcet-1.1.5 > >>>>>>> Configuring wai-extra-3.0.7.1... > >>>>>>> Configuring conduit-1.2.4.2... > >>>>>>> Building conduit-1.2.4.2... > >>>>>>> Building wai-extra-3.0.7.1... > >>>>>>> Installed conduit-1.2.4.2 > >>>>>>> Configuring conduit-extra-1.1.9... > >>>>>>> Building conduit-extra-1.1.9... > >>>>>>> Configuring http-conduit-2.1.5... > >>>>>>> Installed wai-extra-3.0.7.1 > >>>>>>> Building http-conduit-2.1.5... > >>>>>>> Configuring yaml-0.8.11... > >>>>>>> Installed http-conduit-2.1.5 > >>>>>>> Building yaml-0.8.11... > >>>>>>> Installed conduit-extra-1.1.9 > >>>>>>> Configuring monad-logger-0.3.13.1... > >>>>>>> Building monad-logger-0.3.13.1... > >>>>>>> Configuring xml-conduit-1.3.0... > >>>>>>> Installed monad-logger-0.3.13.1 > >>>>>>> Building xml-conduit-1.3.0... > >>>>>>> Installed yaml-0.8.11 > >>>>>>> Configuring persistent-2.1.6... > >>>>>>> Building persistent-2.1.6... > >>>>>>> Installed xml-conduit-1.3.0 > >>>>>>> Configuring tagstream-conduit-0.5.5.3... > >>>>>>> Building tagstream-conduit-0.5.5.3... > >>>>>>> Installed tagstream-conduit-0.5.5.3 > >>>>>>> Configuring authenticate-1.3.2.11... > >>>>>>> Building authenticate-1.3.2.11... > >>>>>>> Installed authenticate-1.3.2.11 > >>>>>>> Installed persistent-2.1.6 > >>>>>>> Configuring persistent-template-2.1.3.3... > >>>>>>> Building persistent-template-2.1.3.3... > >>>>>>> Installed persistent-template-2.1.3.3 > >>>>>>> Updating documentation index > >>>>>>> > >>>>>>> > /Users/msantos/Library/Haskell/share/doc/x86_64-osx-ghc-7.8.3/index.html > >>>>>>> cabal: Error: some packages failed to install: > >>>>>>> shakespeare-2.0.5 failed during the building phase. The exception > >>>>>>> was: > >>>>>>> ExitFailure 1 > >>>>>>> yesod-1.4.0 depends on shakespeare-2.0.5 which failed to install. > >>>>>>> yesod-auth-1.4.5 depends on shakespeare-2.0.5 which failed to > >>>>>>> install. > >>>>>>> yesod-core-1.4.9.1 depends on shakespeare-2.0.5 which failed to > >>>>>>> install. > >>>>>>> yesod-form-1.4.4.1 depends on shakespeare-2.0.5 which failed to > >>>>>>> install. > >>>>>>> yesod-persistent-1.4.0.2 depends on shakespeare-2.0.5 which failed > to > >>>>>>> install. > >>>>>>> > >>>>>>> > >>>>>>> -- > >>>>>>> Public key ID: E8FE60D7 > >>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net > >>>>>>> > >>>>>>> On Thu, Jun 18, 2015 at 4:16 PM, Christopher Allen > >>>>>>> wrote: > >>>>>>>> > >>>>>>>> Some of that looks like churn from trying to install an older > >>>>>>>> version of Yesod over a newer one. Are you using a sandbox? if > so, did you > >>>>>>>> wipe it out before attempting Yesod 1.2.6.1? What we'd be looking > for is a > >>>>>>>> package conflict that tells you which package of what version > that is > >>>>>>>> globally installed is causing the conflict. > >>>>>>>> > >>>>>>>> Insta-Yesodian conflict implies you're reinstalling into a > not-fresh > >>>>>>>> packgage-db which means you either need to wipe your user > package-db or use > >>>>>>>> a sandbox. (I recommend the latter). > >>>>>>>> > >>>>>>>> If you haven't done so, do that, then re-attempt that version of > >>>>>>>> Yesod (1.2.6.1). > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> On Thu, Jun 18, 2015 at 2:57 PM, Miguel A. Santos > >>>>>>>> wrote: > >>>>>>>>> > >>>>>>>>> Thanks! No problem. I gave a try to your suggestion. It doesn't > >>>>>>>>> look I'll get yesod installed without "paying" > >>>>>>>>> a bigger price than just "downgrading". :-/ > >>>>>>>>> > >>>>>>>>> Yesod 1.4.0 warns that forcing installing it will likely break > >>>>>>>>> pandoc, among other things. > >>>>>>>>> I can give it a try though, but I really use pandoc regularly. > >>>>>>>>> Plus, it's still not clear that the building process > >>>>>>>>> will not fail. And installing pandoc took me surprisingly a lot > of > >>>>>>>>> time last time. > >>>>>>>>> > >>>>>>>>> Forcing Yesod-1.2.6.1 won't allow cabal to satisfy the > >>>>>>>>> dependencies. > >>>>>>>>> > >>>>>>>>> I guess I could keep trying other versions and see. But I think > >>>>>>>>> I'll try the 1.4.0 first. Will post here > >>>>>>>>> the results so that at least others may hopefully benefit from > >>>>>>>>> this. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > ----------------------------------------------------------------------------------------- > >>>>>>>>> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.4.0 > >>>>>>>>> Resolving dependencies... > >>>>>>>>> In order, the following would be installed: > >>>>>>>>> monad-control-0.3.3.1 (latest: 1.0.0.4) (via: yesod-1.4.0 > >>>>>>>>> yesod-core-1.4.9.1 authenticate-1.3.2.11 xml-conduit-1.3.0 > >>>>>>>>> persistent-template-2.1.3.3 persistent-2.1.6 > monad-logger-0.3.13.1 > >>>>>>>>> http-conduit-2.1.5 conduit-extra-1.1.9 resourcet-1.1.5 > resource-pool-0.2.3.2 > >>>>>>>>> enclosed-exceptions-1.0.1.1 lifted-base-0.2.3.6) (new version) > >>>>>>>>> lifted-base-0.2.3.6 (via: yesod-auth-1.4.5 yesod-core-1.4.9.1 > >>>>>>>>> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 > http-conduit-2.1.5 > >>>>>>>>> conduit-1.2.4.2 resourcet-1.1.5 enclosed-exceptions-1.0.1.1) > (reinstall) > >>>>>>>>> (changes: monad-control-1.0.0.4 -> 0.3.3.1) > >>>>>>>>> enclosed-exceptions-1.0.1.1 (via: yaml-0.8.11) (reinstall) > >>>>>>>>> (changes: monad-control-1.0.0.4 -> 0.3.3.1) > >>>>>>>>> resource-pool-0.2.3.2 (via: yesod-persistent-1.4.0.2 > >>>>>>>>> persistent-2.1.6) (reinstall) (changes: monad-control-1.0.0.4 -> > 0.3.3.1) > >>>>>>>>> resourcet-1.1.5 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 > >>>>>>>>> yesod-persistent-1.4.0.2 yesod-core-1.4.9.1 yaml-0.8.11 > >>>>>>>>> authenticate-1.3.2.11 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 > >>>>>>>>> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 > http-conduit-2.1.5 > >>>>>>>>> conduit-extra-1.1.9 conduit-1.2.4.2) (reinstall) (changes: > >>>>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) > >>>>>>>>> conduit-1.2.4.2 (via: yesod-auth-1.4.5 yesod-persistent-1.4.0.2 > >>>>>>>>> yesod-core-1.4.9.1 yaml-0.8.11 authenticate-1.3.2.11 > >>>>>>>>> tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 persistent-2.1.6 > >>>>>>>>> monad-logger-0.3.13.1 http-conduit-2.1.5 conduit-extra-1.1.9) > (reinstall) > >>>>>>>>> conduit-extra-1.1.9 (via: yesod-1.4.0 yesod-auth-1.4.5 > >>>>>>>>> yesod-core-1.4.9.1 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 > >>>>>>>>> monad-logger-0.3.13.1) (reinstall) (changes: > monad-control-1.0.0.4 -> > >>>>>>>>> 0.3.3.1) > >>>>>>>>> http-conduit-2.1.5 (via: yesod-auth-1.4.5 authenticate-1.3.2.11) > >>>>>>>>> (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) > >>>>>>>>> monad-logger-0.3.13.1 (via: yesod-1.4.0 yesod-core-1.4.9.1 > >>>>>>>>> persistent-template-2.1.3.3 persistent-2.1.6) (reinstall) > (changes: > >>>>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) > >>>>>>>>> persistent-2.1.6 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 > >>>>>>>>> yesod-persistent-1.4.0.2 persistent-template-2.1.3.3) > (reinstall) (changes: > >>>>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) > >>>>>>>>> persistent-template-2.1.3.3 (via: yesod-auth-1.4.5 > >>>>>>>>> yesod-persistent-1.4.0.2) (reinstall) (changes: > monad-control-1.0.0.4 -> > >>>>>>>>> 0.3.3.1) > >>>>>>>>> shakespeare-2.0.5 (via: yesod-1.4.0 yesod-auth-1.4.5 > >>>>>>>>> yesod-form-1.4.4.1 yesod-core-1.4.9.1) (new package) > >>>>>>>>> wai-extra-3.0.7.1 (via: yesod-1.4.0 yesod-core-1.4.9.1) > (reinstall) > >>>>>>>>> xml-conduit-1.3.0 (via: authenticate-1.3.2.11 > >>>>>>>>> tagstream-conduit-0.5.5.3) (reinstall) (changes: > monad-control-1.0.0.4 -> > >>>>>>>>> 0.3.3.1) > >>>>>>>>> tagstream-conduit-0.5.5.3 (via: authenticate-1.3.2.11) > (reinstall) > >>>>>>>>> authenticate-1.3.2.11 (via: yesod-auth-1.4.5) (reinstall) > (changes: > >>>>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) > >>>>>>>>> yaml-0.8.11 (via: yesod-1.4.0) (reinstall) > >>>>>>>>> yesod-core-1.4.9.1 (via: yesod-1.4.0 yesod-auth-1.4.5 > >>>>>>>>> yesod-form-1.4.4.1 yesod-persistent-1.4.0.2) (new package) > >>>>>>>>> yesod-persistent-1.4.0.2 (via: yesod-1.4.0 yesod-auth-1.4.5 > >>>>>>>>> yesod-form-1.4.4.1) (new package) > >>>>>>>>> yesod-form-1.4.4.1 (via: yesod-1.4.0 yesod-auth-1.4.5) (new > >>>>>>>>> package) > >>>>>>>>> yesod-auth-1.4.5 (via: yesod-1.4.0) (new package) > >>>>>>>>> yesod-1.4.0 (latest: 1.4.1.5) (new package) > >>>>>>>>> cabal: The following packages are likely to be broken by the > >>>>>>>>> reinstalls: > >>>>>>>>> pandoc-citeproc-0.7.1.1 > >>>>>>>>> pandoc-1.14.0.4 > >>>>>>>>> project-template-0.2.0 > >>>>>>>>> http-reverse-proxy-0.4.2 > >>>>>>>>> Use --force-reinstalls if you want to install anyway. > >>>>>>>>> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.2.6.1 > >>>>>>>>> Resolving dependencies... > >>>>>>>>> cabal: Could not resolve dependencies: > >>>>>>>>> next goal: yesod (user goal) > >>>>>>>>> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, > >>>>>>>>> 1.4.1, 1.4.0 > >>>>>>>>> (global constraint requires ==1.2.6.1) > >>>>>>>>> trying: yesod-1.2.6.1 > >>>>>>>>> trying: streaming-commons-0.1.12.1/installed-200... (dependency > of > >>>>>>>>> yesod-1.2.6.1) > >>>>>>>>> trying: warp-3.0.13.1/installed-150... (dependency of > >>>>>>>>> yesod-1.2.6.1) > >>>>>>>>> next goal: yesod-form (dependency of yesod-1.2.6.1) > >>>>>>>>> rejecting: yesod-form-1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2.1, > >>>>>>>>> 1.4.2, 1.4.1.1, > >>>>>>>>> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => > yesod-form>=1.3 > >>>>>>>>> && <1.4) > >>>>>>>>> trying: yesod-form-1.3.16 > >>>>>>>>> next goal: persistent (dependency of yesod-form-1.3.16) > >>>>>>>>> rejecting: persistent-2.1.6/installed-4f9..., 2.1.6, 2.1.5, > 2.1.4, > >>>>>>>>> 2.1.3, > >>>>>>>>> 2.1.2, 2.1.1.7, 2.1.1.6, 2.1.1.5, 2.1.1.4, 2.1.1.3, 2.1.1.2, > >>>>>>>>> 2.1.1.1, 2.1.1, > >>>>>>>>> 2.1.0.2, 2.1.0.1, 2.1 (conflict: yesod-form => persistent>=1.2 && > >>>>>>>>> <2.1) > >>>>>>>>> trying: persistent-1.3.3 > >>>>>>>>> trying: path-pieces-0.2.0/installed-533... (dependency of > >>>>>>>>> persistent-1.3.3) > >>>>>>>>> next goal: yesod-core (dependency of yesod-1.2.6.1) > >>>>>>>>> rejecting: yesod-core-1.4.9.1, 1.4.9, 1.4.8.3, 1.4.8.2, 1.4.8.1, > >>>>>>>>> 1.4.8, > >>>>>>>>> 1.4.7.3, 1.4.7.2, 1.4.7.1, 1.4.7, 1.4.6.2, 1.4.6.1, 1.4.6, 1.4.5, > >>>>>>>>> 1.4.4.5, > >>>>>>>>> 1.4.4.4, 1.4.4.3, 1.4.4.2, 1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2, > >>>>>>>>> 1.4.1.1, > >>>>>>>>> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => > >>>>>>>>> yesod-core>=1.2.2 && <1.3) > >>>>>>>>> rejecting: yesod-core-1.2.20.1, 1.2.20, 1.2.19.2, 1.2.19.1, > 1.2.19, > >>>>>>>>> 1.2.18, > >>>>>>>>> 1.2.17, 1.2.16.1, 1.2.16, 1.2.15.2, 1.2.15.1, 1.2.15, 1.2.14, > >>>>>>>>> 1.2.13.1, > >>>>>>>>> 1.2.13, 1.2.12, 1.2.11.1, 1.2.11, 1.2.10, 1.2.9.2, 1.2.9.1, > 1.2.9, > >>>>>>>>> 1.2.8, > >>>>>>>>> 1.2.7, 1.2.6.7, 1.2.6.6, 1.2.6.5, 1.2.6.4, 1.2.6.3, 1.2.6.2, > >>>>>>>>> 1.2.6.1 > >>>>>>>>> (conflict: path-pieces==0.2.0/installed-533..., yesod-core => > >>>>>>>>> path-pieces>=0.1.2 && <0.2) > >>>>>>>>> rejecting: yesod-core-1.2.6 (conflict: streaming-commons => > >>>>>>>>> text==1.1.0.0/installed-9bd..., yesod-core => text>=0.7 && > <0.12) > >>>>>>>>> rejecting: yesod-core-1.2.5, 1.2.4.5, 1.2.4.4, 1.2.4.3, 1.2.4.2, > >>>>>>>>> 1.2.4.1, > >>>>>>>>> 1.2.4, 1.2.3, 1.2.2 (conflict: warp => > >>>>>>>>> wai==3.0.2.3/installed-39c..., > >>>>>>>>> yesod-core => wai>=1.4 && <1.5) > >>>>>>>>> rejecting: yesod-core-1.2.1, 1.2.0.4, 1.2.0.3, 1.2.0.2, 1.2.0.1, > >>>>>>>>> 1.2.0, > >>>>>>>>> 1.1.8.3, 1.1.8.2, 1.1.8.1, 1.1.8, 1.1.7.2, 1.1.7.1, 1.1.7, > 1.1.6.1, > >>>>>>>>> 1.1.6, > >>>>>>>>> 1.1.5, 1.1.4.2, 1.1.4.1, 1.1.4, 1.1.3.1, 1.1.3, 1.1.2.2, 1.1.2.1, > >>>>>>>>> 1.1.2, > >>>>>>>>> 1.1.1.2, 1.1.1.1, 1.1.1, 1.1.0.1, 1.1.0, 1.0.1.3, 1.0.1.2, > 1.0.1.1, > >>>>>>>>> 1.0.1, > >>>>>>>>> 1.0.0.2, 1.0.0.1, 1.0.0, 0.10.3, 0.10.2.2, 0.10.2.1, 0.10.2, > >>>>>>>>> 0.10.1, 0.9.4.1, > >>>>>>>>> 0.9.4, 0.9.3.6, 0.9.3.5, 0.9.3.4, 0.9.3.3, 0.9.3.2, 0.9.3.1, > 0.9.3, > >>>>>>>>> 0.9.2, > >>>>>>>>> 0.9.1.1, 0.9.1, 0.8.3.2, 0.8.3.1, 0.8.3, 0.8.2, 0.8.1, 0.8.0.1, > >>>>>>>>> 0.8.0, > >>>>>>>>> 0.7.0.2, 0.7.0.1, 0.7.0 (conflict: yesod => yesod-core>=1.2.2 && > >>>>>>>>> <1.3) > >>>>>>>>> Backjump limit reached (change with --max-backjumps). > >>>>>>>>> > >>>>>>>>> -- > >>>>>>>>> Public key ID: E8FE60D7 > >>>>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net > >>>>>>>>> > >>>>>>>>> On Thu, Jun 18, 2015 at 3:32 PM, Christopher Allen > >>>>>>>>> wrote: > >>>>>>>>>> > >>>>>>>>>> Ah that's frustrating, that's my mistake ? I'm sorry. I thought > >>>>>>>>>> you were talking about GHC for Mac OS X not being available for > your OS > >>>>>>>>>> version either. > >>>>>>>>>> > >>>>>>>>>> Your best bet on HP is to specify an older version of Yesod that > >>>>>>>>>> will work with the dependencies that your version of HP comes > with. > >>>>>>>>>> > >>>>>>>>>> On Thu, Jun 18, 2015 at 2:08 PM, Miguel A. Santos > >>>>>>>>>> wrote: > >>>>>>>>>>> > >>>>>>>>>>> Indeed I saw that. That's what I meant with the bindist not > being > >>>>>>>>>>> available for OSX 10.6.8; only for 10.7+ > >>>>>>>>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#macosx_x86_64 > >>>>>>>>>>> My bad, I should have said it before. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> -- > >>>>>>>>>>> Public key ID: E8FE60D7 > >>>>>>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net > >>>>>>>>>>> > >>>>>>>>>>> On Thu, Jun 18, 2015 at 2:36 PM, Christopher Allen > >>>>>>>>>>> wrote: > >>>>>>>>>>>> > >>>>>>>>>>>> Did you see that the Mac instructions said to follow the > "other > >>>>>>>>>>>> *nix" instructions if you were using an older version of Mac > OS X? > >>>>>>>>>>>> > >>>>>>>>>>>> Those link here: > >>>>>>>>>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#binaries > >>>>>>>>>>>> > >>>>>>>>>>>> Get rid of all that (GHC, HP, Cabal), then install GHC using > the > >>>>>>>>>>>> bindist for Mac OS X linked above. > >>>>>>>>>>>> > >>>>>>>>>>>> On Thu, Jun 18, 2015 at 1:14 PM, Miguel A. Santos > >>>>>>>>>>>> wrote: > >>>>>>>>>>>>> > >>>>>>>>>>>>> That is obviously a typo: I meant I *did* do a fresh install > of > >>>>>>>>>>>>> the Haskell Platform and cabal before > >>>>>>>>>>>>> trying -and failing- to install yesod. > >>>>>>>>>>>>> > >>>>>>>>>>>>> On Thu, Jun 18, 2015 at 1:38 PM, Miguel A. Santos > >>>>>>>>>>>>> wrote: > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> This corresponds to a fresh install of the HP, ghc, and > cabal > >>>>>>>>>>>>>> I didn't before trying to install yesod. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> -- > >>>>>>>>>>>>> Public key ID: E8FE60D7 > >>>>>>>>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Haskell-Cafe mailing list > >>>>>>>>>>>>> Haskell-Cafe at haskell.org > >>>>>>>>>>>>> > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > >>>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> -- > >>>>>>>>>>>> Chris Allen > >>>>>>>>>>>> Currently working on http://haskellbook.com > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> -- > >>>>>>>>>> Chris Allen > >>>>>>>>>> Currently working on http://haskellbook.com > >>>>>>>>> > >>>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> -- > >>>>>>>> Chris Allen > >>>>>>>> Currently working on http://haskellbook.com > >>>>>>> > >>>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> -- > >>>>>> Chris Allen > >>>>>> Currently working on http://haskellbook.com > >>>>> > >>>>> > >>>> > >>>> > >>>> > >>>> -- > >>>> Chris Allen > >>>> Currently working on http://haskellbook.com > >>> > >>> > >> > >> _______________________________________________ > >> Haskell-Cafe mailing list > >> Haskell-Cafe at haskell.org > >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > > > > > _______________________________________________ > > Haskell-Cafe mailing list > > Haskell-Cafe at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From leza.ml at fecrd.cujae.edu.cu Fri Jun 19 12:09:05 2015 From: leza.ml at fecrd.cujae.edu.cu (Leza Morais Lutonda) Date: Fri, 19 Jun 2015 08:09:05 -0400 Subject: [Haskell-cafe] "SameConstraints?" type constraints In-Reply-To: <7D13873D-60B5-4FFB-A002-19E52A43DE1B@yandex.ru> References: <5583A5C2.8070606@fecrd.cujae.edu.cu> <25A7119A-F9F8-483C-8FD9-0C85909E4BD2@yandex.ru> <5583B7AF.7080703@fecrd.cujae.edu.cu> <7D13873D-60B5-4FFB-A002-19E52A43DE1B@yandex.ru> Message-ID: <55840661.1080100@fecrd.cujae.edu.cu> On 06/19/2015 03:02 AM, MigMit wrote: > Typo. > > {-# LANGUAGE ConstraintKinds, GADTs #-} > data SC c e where SC :: c d => d -> e -> SC c e Yes, I have activated the GADTs extension too and the data definition itself typechecks but the Show instance do not: instance Show e => Show (S c e) where show (SC x y) = show x ? show y Because: Could not deduce (Show d) arising from a use of ?show? -- Leza Morais Lutonda, Lemol-C http://lemol.github.io 50 Aniversario de la Cujae. Inaugurada por Fidel el 2 de diciembre de 1964 http://cujae.edu.cu From ivan.miljenovic at gmail.com Fri Jun 19 12:38:09 2015 From: ivan.miljenovic at gmail.com (Ivan Lazar Miljenovic) Date: Fri, 19 Jun 2015 22:38:09 +1000 Subject: [Haskell-cafe] "SameConstraints?" type constraints In-Reply-To: <55840661.1080100@fecrd.cujae.edu.cu> References: <5583A5C2.8070606@fecrd.cujae.edu.cu> <25A7119A-F9F8-483C-8FD9-0C85909E4BD2@yandex.ru> <5583B7AF.7080703@fecrd.cujae.edu.cu> <7D13873D-60B5-4FFB-A002-19E52A43DE1B@yandex.ru> <55840661.1080100@fecrd.cujae.edu.cu> Message-ID: On 19 June 2015 at 22:09, Leza Morais Lutonda wrote: > On 06/19/2015 03:02 AM, MigMit wrote: >> >> Typo. >> >> {-# LANGUAGE ConstraintKinds, GADTs #-} >> data SC c e where SC :: c d => d -> e -> SC c e > > > Yes, I have activated the GADTs extension too and the data definition itself > typechecks but the Show instance do not: > > instance Show e => Show (S c e) where > show (SC x y) = show x ? show y > > Because: Could not deduce (Show d) arising from a use of ?show? This works for me if I also enable FlexibleInstances and restrict it to: instance (Show e) => Show (S Show e) where ... You could probably also use Edward Kmett's constraints package [1] to generalise this to any c which is a sub-class of Show. [1]: http://hackage.haskell.org/package/constraints -- Ivan Lazar Miljenovic Ivan.Miljenovic at gmail.com http://IvanMiljenovic.wordpress.com From sean.leather at gmail.com Fri Jun 19 12:44:41 2015 From: sean.leather at gmail.com (Sean Leather) Date: Fri, 19 Jun 2015 14:44:41 +0200 Subject: [Haskell-cafe] "SameConstraints?" type constraints In-Reply-To: References: <5583A5C2.8070606@fecrd.cujae.edu.cu> <25A7119A-F9F8-483C-8FD9-0C85909E4BD2@yandex.ru> <5583B7AF.7080703@fecrd.cujae.edu.cu> <7D13873D-60B5-4FFB-A002-19E52A43DE1B@yandex.ru> <55840661.1080100@fecrd.cujae.edu.cu> Message-ID: On Fri, Jun 19, 2015 at 2:38 PM, Ivan Lazar Miljenovic wrote: > On 19 June 2015 at 22:09, Leza Morais Lutonda wrote: > > On 06/19/2015 03:02 AM, MigMit wrote: > >> > >> Typo. > >> > >> {-# LANGUAGE ConstraintKinds, GADTs #-} > >> data SC c e where SC :: c d => d -> e -> SC c e > > > > > > Yes, I have activated the GADTs extension too and the data definition > itself > > typechecks but the Show instance do not: > > > > instance Show e => Show (S c e) where > > show (SC x y) = show x ? show y > > > > Because: Could not deduce (Show d) arising from a use of ?show? > > This works for me if I also enable FlexibleInstances and restrict it to: > > instance (Show e) => Show (S Show e) where ... > Note this won't work for a Num instance mentioned earlier because the existentially quantified d types in two SC values are not provably the same type. In other words, you can't write instance Num e => Show (S Num e) where SC x1 y1 + SC x2 y2 = SC (x1 + x2) (y1 + y2) because x1 and x2 can have different types. Regards, Sean -------------- next part -------------- An HTML attachment was scrubbed... URL: From leza.ml at fecrd.cujae.edu.cu Fri Jun 19 12:48:54 2015 From: leza.ml at fecrd.cujae.edu.cu (Leza Morais Lutonda) Date: Fri, 19 Jun 2015 08:48:54 -0400 Subject: [Haskell-cafe] "SameConstraints?" type constraints In-Reply-To: References: <5583A5C2.8070606@fecrd.cujae.edu.cu> <25A7119A-F9F8-483C-8FD9-0C85909E4BD2@yandex.ru> <5583B7AF.7080703@fecrd.cujae.edu.cu> <7D13873D-60B5-4FFB-A002-19E52A43DE1B@yandex.ru> <55840661.1080100@fecrd.cujae.edu.cu> Message-ID: <55840FB6.1070200@fecrd.cujae.edu.cu> On 06/19/2015 08:38 AM, Ivan Lazar Miljenovic wrote: > This works for me if I also enable FlexibleInstances and restrict it to: > > instance (Show e) => Show (S Show e) where ... Thank you Ivan, it works. Now I am analysing the implications of that, after I will post the results. -- Leza Morais Lutonda, Lemol-C Electronic and Telecommunication Engineer Software Development and Architecture Enthusiast http://lemol.github.io 50 Aniversario de la Cujae. Inaugurada por Fidel el 2 de diciembre de 1964 http://cujae.edu.cu From miguel.a.santos.l at gmail.com Fri Jun 19 13:10:49 2015 From: miguel.a.santos.l at gmail.com (Miguel A. Santos) Date: Fri, 19 Jun 2015 09:10:49 -0400 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: Christopher, David, Geraldus, first thanks a lot for your help. Feels easier to dedicate so much time troubleshooting this. I will try then Stack and Stackage then. A few more questions though to make sure I understand things right. Yesterday 1) I did mv ~/.ghc ~/.,ghc-org cabal install yesod It didn't work -that's ok- but it didn't recreate ~/.ghc anew. Is that because nothing new (yesod in this case) got installed? or did I miss something? 2)In order to work with/in a sandbox it's enough to do mkdir ~/mySandboxDir cd ~/mySandboxDir cabal sandbox newPackage right? 3)In order to remove all of my HP stuff last time I manually looked for all Haskell stuff in my system and rm-ed it. If you know of any uninstall script that would be nice! ;-) Finally, a thought to share. The site www.haskell.org seems the canonical place to start playing with Haskell, that is, they explicitly recommend HP as the way to go for older macs. Also, yesod site doesn't mention that HP might be the worse place to start with for installing yesod. I think the community there should get to a consensus and make it clearer. That'd especially help newcomers to Haskell -and we can only benefit from that. Again thanks all. I'll post back my results with stack or stackage so the list has a record of my endeavour with haskell+yesod. MA -- Public key ID: E8FE60D7 Public key server: see, e.g., hkp://keys.gnupg.net On Fri, Jun 19, 2015 at 4:10 AM, Geraldus wrote: > Try stack first > https://www.fpcomplete.com/blog/2015/06/announcing-first-public-beta-stack > > ??, 19 ???? 2015 ?. ? 12:52, David Turner : > >> Hi, >> >> I think Stackage will solve these issues - indeed, I believe that >> Stackage grew out of the difficulty of installing Yesod and its >> dependencies straight from Hackage using cabal. >> >> If you download https://www.stackage.org/lts/cabal.config next to your >> own .cabal file then it will constrain cabal to only use a set of >> packages which are known to be mutually compatible. >> >> Hope that helps, >> >> David >> >> >> >> >> On 19 June 2015 at 08:37, Geraldus wrote: >> > Hi, Miguel. Haskell Platform includes GHC itself and some set of >> packages, >> > such as text, network, and etc. If I recall correctly thete was issues >> with >> > Yesod and HP because some package versions and the best way to install >> Yesod >> > were sandboxes, because sandbox have its own package database. >> > Removing or just moving .ghc folder helped me in past several times, >> usually >> > it was needed when different projects depends on different package >> versions, >> > now I put every project inside sandbox to prevent this. >> > As for pandoc, if you use only binary you can install it having no GHC >> at >> > all (download package installer from website). >> > If I were you I'll install GHC 7.8.* alone rather than Platform, >> > caball-install 1.22.* and try to build everything againg using >> sandboxes. >> > Also there is a Stackage and its tools (stackage-cli and recently >> released >> > stack), they are very helpful in caball-hell issues. Also there is >> Halcyon >> > but I have not tried it myself. Apologize for missing links, I'm mobile >> now. >> > >> > >> > 3:23 ?? ???????, ??, 19.06.2015, Miguel A. Santos >> > : >> >> >> >> One more detail about my try with rm ~/.ghc: >> >> I find it curious that I didn't get that directory rebuild again when >> >> trying to install yesod. >> >> Did I miss something? >> >> >> >> -- >> >> Public key ID: E8FE60D7 >> >> Public key server: see, e.g., hkp://keys.gnupg.net >> >> >> >> On Thu, Jun 18, 2015 at 6:18 PM, Miguel A. Santos >> >> wrote: >> >>> >> >>> Ok, removing ~/.ghc (actually just moving it to ~/.ghc-org) didn't >> work >> >>> either. The detailed output is below >> >>> but from a cursory view it seems not much better than within the >> sandbox >> >>> try before. >> >>> >> >>> I understand I'm staying in the "past" and with that comes problems >> like >> >>> this one, but upgrading to Yellowstone >> >>> is not an option for me. >> >>> >> >>> I have some questions about your other options. In particular, I'm not >> >>> sure what you mean by (capitals) GHC. >> >>> I thought that's just the compiler. I don't understand your first >> >>> sentence after "vanilla". What is what I got >> >>> with HP if not GHC for MacOSX!? >> >>> >> >>> About point 2., I'm building (already for hours, that's the 'other' >> >>> process I'd running) ghc from the tarball ghc-7.8.4-src.tar.bz2 >> available at >> >>> the bottom of that same link we mentioned before, namely, >> >>> https://www.haskell.org/ghc/download_ghc_7_8_4#binaries Is this the >> same as >> >>> what you mean by this 2nd option? Mind you I'm already using version >> 7.8.3. >> >>> How will a new version of the compiler change what looks like a >> >>> compatibility problem with a package? or you mean it is not that >> simple? >> >>> >> >>> Option 3: It seems to me I may as well just remove everything, >> install HP >> >>> again (already downloaded) and after >> >>> that step finishes, trying installing right away yesod, before I try >> with >> >>> any other packages. Seems a path based >> >>> mostly on blind hope than logic to me :-p as the only big thing I >> >>> installed between my fresh install of HP and my initial try of yesod >> was >> >>> pandoc, which had some large dependencies to deal with. But it's a >> simple >> >>> one, so I may check it definitely out >> >>> of the equation. >> >>> >> >>> Option 4: I guess this is something I can try right away without much >> >>> effort. To be concrete you mean then >> >>> cabal install --allow-newer yesod ? >> >>> >> >>> Btw, thanks so much for your prompt help! >> >>> >> >>> -------------------------------------------- >> >>> msantos at MBP-2[17:09]:~/System/YESOD$mv ~/.ghc/ ~/.ghc-org >> >>> msantos at MBP-2[17:30]:~$cabal install yesod==1.2.6.1 >> >>> Warning: The package list for 'hackage.haskell.org' is 15.0 days old. >> >>> Run 'cabal update' to get the latest list of available packages. >> >>> Resolving dependencies... >> >>> cabal: Could not resolve dependencies: >> >>> next goal: yesod (user goal) >> >>> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, >> >>> 1.4.0 >> >>> (global constraint requires ==1.2.6.1) >> >>> trying: yesod-1.2.6.1 >> >>> trying: streaming-commons-0.1.12.1 (dependency of yesod-1.2.6.1) >> >>> trying: network-2.4.2.3/installed-575... (dependency of >> >>> streaming-commons-0.1.12.1) >> >>> trying: parsec-3.1.5/installed-04a... (dependency of >> >>> network-2.4.2.3/installed-575...) >> >>> trying: mtl-2.1.3.1/installed-8bc... (dependency of >> >>> parsec-3.1.5/installed-04a...) >> >>> trying: shakespeare-2.0.5 (dependency of yesod-1.2.6.1) >> >>> trying: exceptions-0.8.0.2 (dependency of shakespeare-2.0.5) >> >>> trying: transformers-compat-0.4.0.4 (dependency of exceptions-0.8.0.2) >> >>> trying: transformers-compat-0.4.0.4:-two >> >>> rejecting: transformers-compat-0.4.0.4:-three (conflict: mtl => >> >>> transformers==0.3.0.0/installed-16a..., >> transformers-compat-0.4.0.4:three >> >>> => >> >>> transformers>=0.4.1 && <0.5) >> >>> rejecting: transformers-compat-0.4.0.4:+three (manual flag can only be >> >>> changed >> >>> explicitly) >> >>> Backjump limit reached (change with --max-backjumps). >> >>> >> >>> -- >> >>> Public key ID: E8FE60D7 >> >>> Public key server: see, e.g., hkp://keys.gnupg.net >> >>> >> >>> On Thu, Jun 18, 2015 at 5:15 PM, Christopher Allen > > >> >>> wrote: >> >>>> >> >>>> You don't need to rm -rf ~/.ghc if you're using a sandbox. The >> sandbox >> >>>> (usually) occludes the user package-db. >> >>>> >> >>>> Well, the sandbox may not have fixed the incompatibility of HP and >> that >> >>>> particular version of Yesod, but we're better information from the >> >>>> dependency solver. >> >>>> >> >>>> That said, this is going to simply require a lot of trial and error >> if >> >>>> you want to try this approach and me telling you increment/decrement >> >>>> versions isn't going to be any faster. >> >>>> >> >>>> I'd say your best options are: >> >>>> >> >>>> 1. Upgrade your installation of Mac OS X so you can use the vanilla >> GHC >> >>>> bindist, or even better, GHC for Mac OS X >> >>>> >> >>>> 2. Use your copy of Haskell Platform to build GHC from source and use >> >>>> that instead of GHC (possibly a quagmire, might work out okay. Will >> take a >> >>>> long time to build.) >> >>>> >> >>>> 3. Unregister all the unnecessary packages from your global >> package-db. >> >>>> Listing here: https://www.haskell.org/platform/changelog.html >> >>>> (Additional Platform Libraries, do *not* uninstall any of the core >> >>>> libraries) >> >>>> If you make a mistake you may need to reinstall Platform. >> >>>> >> >>>> 4. Give passing --allow-newer to cabal install a shot. >> >>>> >> >>>> This is rough. Not that many people on <10.7 OS X versions so there >> >>>> aren't enough squeaky wheels for this sort of thing. >> >>>> >> >>>> Sorry I couldn't do more. >> >>>> >> >>>> >> >>>> >> >>>> On Thu, Jun 18, 2015 at 3:54 PM, Miguel A. Santos >> >>>> wrote: >> >>>>> >> >>>>> Hmm.. wouldn't that mean, I later have to reinstall all my packages? >> >>>>> :-/ >> >>>>> >> >>>>> Meanwhile, I did try the sandbox way. It didn't work either. >> Briefly I >> >>>>> issued >> >>>>> cabal sandbox init >> >>>>> and then >> >>>>> cabal install yesod-1.2.6.1 >> >>>>> Details below. >> >>>>> >> >>>>> The initial complain about not being able to resolve dependencies >> makes >> >>>>> me think >> >>>>> I may be missing more things about working with sandboxes. Just >> checked >> >>>>> >> >>>>> >> https://www.haskell.org/cabal/users-guide/installing-packages.html#developing-with-sandboxes >> >>>>> and guessed the init would be enough. >> >>>>> >> >>>>> -------------------------------------------------------- >> >>>>> msantos at MBP-2[16:38]:~/System/YESOD/Sandbox$cabal sandbox init >> >>>>> Writing a default package environment file to >> >>>>> /Users/msantos/System/YESOD/Sandbox/cabal.sandbox.config >> >>>>> Creating a new sandbox at >> >>>>> /Users/msantos/System/YESOD/Sandbox/.cabal-sandbox >> >>>>> msantos at MBP-2[16:41]:~/System/YESOD/Sandbox$cabal install >> yesod-1.2.6.1 >> >>>>> Resolving dependencies... >> >>>>> cabal: Could not resolve dependencies: >> >>>>> next goal: yesod (user goal) >> >>>>> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, 1.4.1, >> >>>>> 1.4.0 >> >>>>> (global constraint requires ==1.2.6.1) >> >>>>> trying: yesod-1.2.6.1 >> >>>>> trying: streaming-commons-0.1.12.1 (dependency of yesod-1.2.6.1) >> >>>>> trying: network-2.4.2.3/installed-575... (dependency of >> >>>>> streaming-commons-0.1.12.1) >> >>>>> trying: parsec-3.1.5/installed-04a... (dependency of >> >>>>> network-2.4.2.3/installed-575...) >> >>>>> trying: mtl-2.1.3.1/installed-8bc... (dependency of >> >>>>> parsec-3.1.5/installed-04a...) >> >>>>> trying: shakespeare-2.0.5 (dependency of yesod-1.2.6.1) >> >>>>> trying: exceptions-0.8.0.2 (dependency of shakespeare-2.0.5) >> >>>>> trying: transformers-compat-0.4.0.4 (dependency of >> exceptions-0.8.0.2) >> >>>>> trying: transformers-compat-0.4.0.4:-two >> >>>>> rejecting: transformers-compat-0.4.0.4:-three (conflict: mtl => >> >>>>> transformers==0.3.0.0/installed-16a..., >> >>>>> transformers-compat-0.4.0.4:three => >> >>>>> transformers>=0.4.1 && <0.5) >> >>>>> rejecting: transformers-compat-0.4.0.4:+three (manual flag can only >> be >> >>>>> changed >> >>>>> explicitly) >> >>>>> Backjump limit reached (change with --max-backjumps). >> >>>>> >> >>>>> Note: when using a sandbox, all packages are required to have >> >>>>> consistent >> >>>>> dependencies. Try reinstalling/unregistering the offending packages >> or >> >>>>> recreating the sandbox. >> >>>>> >> >>>>> -- >> >>>>> Public key ID: E8FE60D7 >> >>>>> Public key server: see, e.g., hkp://keys.gnupg.net >> >>>>> >> >>>>> On Thu, Jun 18, 2015 at 4:46 PM, Christopher Allen < >> cma at bitemyapp.com> >> >>>>> wrote: >> >>>>>> >> >>>>>> If you won't use a sandbox, then lets nuke your user package-db and >> >>>>>> start from scratch: >> >>>>>> >> >>>>>> rm -rf ~/.ghc >> >>>>>> cabal install yesod==1.2.6.1 >> >>>>>> >> >>>>>> On Thu, Jun 18, 2015 at 3:28 PM, Miguel A. Santos >> >>>>>> wrote: >> >>>>>>> >> >>>>>>> I haven't yet read how to use sandboxes, so, no, that I tried just >> >>>>>>> like that cabal install... >> >>>>>>> I did check first that cabal info yesod was saying I didn't have >> it >> >>>>>>> install. But now that you mention it, I did >> >>>>>>> may have had other packages lingering around from my last attempt >> of >> >>>>>>> installing yesod. >> >>>>>>> >> >>>>>>> Meanwhile I did run forcing the install of 1.4.0... >> >>>>>>> Ah, it finished with cabal install --force-reinstalls yesod-1.4.0 >> >>>>>>> and... >> >>>>>>> it complains about the shakespeare. >> >>>>>>> >> >>>>>>> "shakespeare-2.0.5 failed during the building phase. The exception >> >>>>>>> was: >> >>>>>>> ExitFailure 1" >> >>>>>>> >> >>>>>>> Below the full output. >> >>>>>>> >> >>>>>>> I'll give a try to the sandbox solution. >> >>>>>>> >> >>>>>>> ------------------------------------------------ >> >>>>>>> msantos at MBP-2[16:09]:~/System/YESOD$cabal install >> --force-reinstalls >> >>>>>>> yesod-1.4.0 >> >>>>>>> Resolving dependencies... >> >>>>>>> Warning: The following packages are likely to be broken by the >> >>>>>>> reinstalls: >> >>>>>>> pandoc-citeproc-0.7.1.1 >> >>>>>>> pandoc-1.14.0.4 >> >>>>>>> project-template-0.2.0 >> >>>>>>> http-reverse-proxy-0.4.2 >> >>>>>>> Continuing even though the plan contains dangerous reinstalls. >> >>>>>>> Downloading monad-control-0.3.3.1... >> >>>>>>> Configuring shakespeare-2.0.5... >> >>>>>>> Configuring monad-control-0.3.3.1... >> >>>>>>> Building monad-control-0.3.3.1... >> >>>>>>> Building shakespeare-2.0.5... >> >>>>>>> Installed monad-control-0.3.3.1 >> >>>>>>> Configuring lifted-base-0.2.3.6... >> >>>>>>> Building lifted-base-0.2.3.6... >> >>>>>>> Configuring resource-pool-0.2.3.2... >> >>>>>>> Installed lifted-base-0.2.3.6 >> >>>>>>> Building resource-pool-0.2.3.2... >> >>>>>>> Installed resource-pool-0.2.3.2 >> >>>>>>> Configuring enclosed-exceptions-1.0.1.1... >> >>>>>>> Building enclosed-exceptions-1.0.1.1... >> >>>>>>> Configuring resourcet-1.1.5... >> >>>>>>> Installed enclosed-exceptions-1.0.1.1 >> >>>>>>> Building resourcet-1.1.5... >> >>>>>>> Failed to install shakespeare-2.0.5 >> >>>>>>> Build log ( /Users/msantos/.cabal/logs/shakespeare-2.0.5.log ): >> >>>>>>> Configuring shakespeare-2.0.5... >> >>>>>>> Building shakespeare-2.0.5... >> >>>>>>> Preprocessing library shakespeare-2.0.5... >> >>>>>>> [ 1 of 17] Compiling Text.MkSizeType ( Text/MkSizeType.hs, >> >>>>>>> dist/build/Text/MkSizeType.o ) >> >>>>>>> [ 2 of 17] Compiling Text.IndentToBrace ( Text/IndentToBrace.hs, >> >>>>>>> dist/build/Text/IndentToBrace.o ) >> >>>>>>> [ 3 of 17] Compiling Text.Shakespeare.Base ( >> >>>>>>> Text/Shakespeare/Base.hs, dist/build/Text/Shakespeare/Base.o ) >> >>>>>>> [ 4 of 17] Compiling Text.Hamlet.Parse ( Text/Hamlet/Parse.hs, >> >>>>>>> dist/build/Text/Hamlet/Parse.o ) >> >>>>>>> [ 5 of 17] Compiling Text.Hamlet ( Text/Hamlet.hs, >> >>>>>>> dist/build/Text/Hamlet.o ) >> >>>>>>> >> >>>>>>> Text/Hamlet.hs:402:1: Warning: Defined but not used: ?varName? >> >>>>>>> >> >>>>>>> Text/Hamlet.hs:406:1: Warning: Defined but not used: ?strToExp? >> >>>>>>> >> >>>>>>> Text/Hamlet.hs:439:16: Warning: Defined but not used: ?html? >> >>>>>>> >> >>>>>>> Text/Hamlet.hs:440:14: Warning: Defined but not used: ?url? >> >>>>>>> >> >>>>>>> Text/Hamlet.hs:441:19: Warning: Defined but not used: ?url? >> >>>>>>> >> >>>>>>> Text/Hamlet.hs:442:16: Warning: Defined but not used: ?url? >> >>>>>>> >> >>>>>>> Text/Hamlet.hs:443:20: Warning: Defined but not used: ?msg_url? >> >>>>>>> >> >>>>>>> Text/Hamlet.hs:444:14: Warning: Defined but not used: ?msg? >> >>>>>>> >> >>>>>>> Text/Hamlet.hs:488:43: Warning: >> >>>>>>> This binding for ?c? shadows the existing binding >> >>>>>>> bound at Text/Hamlet.hs:484:13 >> >>>>>>> [ 6 of 17] Compiling Text.Hamlet.RT ( Text/Hamlet/RT.hs, >> >>>>>>> dist/build/Text/Hamlet/RT.o ) >> >>>>>>> >> >>>>>>> Text/Hamlet/RT.hs:78:13: Warning: Defined but not used: ?x? >> >>>>>>> >> >>>>>>> Text/Hamlet/RT.hs:78:26: Warning: Defined but not used: ?deref? >> >>>>>>> >> >>>>>>> Text/Hamlet/RT.hs:78:45: Warning: Defined but not used: ?docs? >> >>>>>>> >> >>>>>>> Text/Hamlet/RT.hs:85:13: Warning: Defined but not used: ?x? >> >>>>>>> >> >>>>>>> Text/Hamlet/RT.hs:85:25: Warning: Defined but not used: ?deref? >> >>>>>>> >> >>>>>>> Text/Hamlet/RT.hs:85:44: Warning: Defined but not used: ?jdocs? >> >>>>>>> >> >>>>>>> Text/Hamlet/RT.hs:85:50: Warning: Defined but not used: ?ndocs? >> >>>>>>> >> >>>>>>> Text/Hamlet/RT.hs:115:37: Warning: >> >>>>>>> This binding for ?x? shadows the existing binding >> >>>>>>> bound at Text/Hamlet/RT.hs:108:13 >> >>>>>>> [ 7 of 17] Compiling Text.Shakespeare ( Text/Shakespeare.hs, >> >>>>>>> dist/build/Text/Shakespeare.o ) >> >>>>>>> [ 8 of 17] Compiling Text.Shakespeare.Text ( >> >>>>>>> Text/Shakespeare/Text.hs, dist/build/Text/Shakespeare/Text.o ) >> >>>>>>> [ 9 of 17] Compiling Text.Julius ( Text/Julius.hs, >> >>>>>>> dist/build/Text/Julius.o ) >> >>>>>>> >> >>>>>>> Text/Julius.hs:90:63: Warning: >> >>>>>>> In the use of ?fromValue? (imported from Data.Aeson.Encode): >> >>>>>>> Deprecated: "Use 'encodeToTextBuilder' instead" >> >>>>>>> [10 of 17] Compiling Text.Roy ( Text/Roy.hs, >> >>>>>>> dist/build/Text/Roy.o ) >> >>>>>>> [11 of 17] Compiling Text.Coffee ( Text/Coffee.hs, >> >>>>>>> dist/build/Text/Coffee.o ) >> >>>>>>> [12 of 17] Compiling Text.Css ( Text/Css.hs, >> >>>>>>> dist/build/Text/Css.o ) >> >>>>>>> >> >>>>>>> Text/Css.hs:349:40: Warning: Defined but not used: ?subblocks? >> >>>>>>> >> >>>>>>> Text/Css.hs:367:5: Warning: Defined but not used: ?subGo? >> >>>>>>> [13 of 17] Compiling Text.CssCommon ( Text/CssCommon.hs, >> >>>>>>> dist/build/Text/CssCommon.o ) >> >>>>>>> Loading package ghc-prim ... linking ... done. >> >>>>>>> Loading package integer-gmp ... linking ... done. >> >>>>>>> Loading package base ... linking ... done. >> >>>>>>> Loading package array-0.5.0.0 ... linking ... done. >> >>>>>>> Loading package deepseq-1.3.0.2 ... linking ... done. >> >>>>>>> Loading package filepath-1.3.0.2 ... linking ... done. >> >>>>>>> Loading package old-locale-1.0.0.6 ... linking ... done. >> >>>>>>> Loading package time-1.4.2 ... linking ... done. >> >>>>>>> Loading package bytestring-0.10.4.0 ... linking ... done. >> >>>>>>> Loading package unix-2.7.0.1 ... linking ... done. >> >>>>>>> Loading package directory-1.2.1.0 ... linking ... done. >> >>>>>>> Loading package process-1.2.0.0 ... linking ... done. >> >>>>>>> Loading package transformers-0.3.0.0 ... linking ... done. >> >>>>>>> Loading package mtl-2.1.3.1 ... linking ... done. >> >>>>>>> Loading package text-1.1.0.0 ... linking ... done. >> >>>>>>> Loading package parsec-3.1.5 ... : can't load >> .so/.DLL >> >>>>>>> for: >> >>>>>>> >> /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib >> >>>>>>> >> (dlopen(/Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib, >> >>>>>>> 9): Library not loaded: @rpath/libHStext-1.1.0.0-ghc7.8.3.dylib >> >>>>>>> Referenced from: >> >>>>>>> >> /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib >> >>>>>>> Reason: image not found) >> >>>>>>> Installed resourcet-1.1.5 >> >>>>>>> Configuring wai-extra-3.0.7.1... >> >>>>>>> Configuring conduit-1.2.4.2... >> >>>>>>> Building conduit-1.2.4.2... >> >>>>>>> Building wai-extra-3.0.7.1... >> >>>>>>> Installed conduit-1.2.4.2 >> >>>>>>> Configuring conduit-extra-1.1.9... >> >>>>>>> Building conduit-extra-1.1.9... >> >>>>>>> Configuring http-conduit-2.1.5... >> >>>>>>> Installed wai-extra-3.0.7.1 >> >>>>>>> Building http-conduit-2.1.5... >> >>>>>>> Configuring yaml-0.8.11... >> >>>>>>> Installed http-conduit-2.1.5 >> >>>>>>> Building yaml-0.8.11... >> >>>>>>> Installed conduit-extra-1.1.9 >> >>>>>>> Configuring monad-logger-0.3.13.1... >> >>>>>>> Building monad-logger-0.3.13.1... >> >>>>>>> Configuring xml-conduit-1.3.0... >> >>>>>>> Installed monad-logger-0.3.13.1 >> >>>>>>> Building xml-conduit-1.3.0... >> >>>>>>> Installed yaml-0.8.11 >> >>>>>>> Configuring persistent-2.1.6... >> >>>>>>> Building persistent-2.1.6... >> >>>>>>> Installed xml-conduit-1.3.0 >> >>>>>>> Configuring tagstream-conduit-0.5.5.3... >> >>>>>>> Building tagstream-conduit-0.5.5.3... >> >>>>>>> Installed tagstream-conduit-0.5.5.3 >> >>>>>>> Configuring authenticate-1.3.2.11... >> >>>>>>> Building authenticate-1.3.2.11... >> >>>>>>> Installed authenticate-1.3.2.11 >> >>>>>>> Installed persistent-2.1.6 >> >>>>>>> Configuring persistent-template-2.1.3.3... >> >>>>>>> Building persistent-template-2.1.3.3... >> >>>>>>> Installed persistent-template-2.1.3.3 >> >>>>>>> Updating documentation index >> >>>>>>> >> >>>>>>> >> /Users/msantos/Library/Haskell/share/doc/x86_64-osx-ghc-7.8.3/index.html >> >>>>>>> cabal: Error: some packages failed to install: >> >>>>>>> shakespeare-2.0.5 failed during the building phase. The exception >> >>>>>>> was: >> >>>>>>> ExitFailure 1 >> >>>>>>> yesod-1.4.0 depends on shakespeare-2.0.5 which failed to install. >> >>>>>>> yesod-auth-1.4.5 depends on shakespeare-2.0.5 which failed to >> >>>>>>> install. >> >>>>>>> yesod-core-1.4.9.1 depends on shakespeare-2.0.5 which failed to >> >>>>>>> install. >> >>>>>>> yesod-form-1.4.4.1 depends on shakespeare-2.0.5 which failed to >> >>>>>>> install. >> >>>>>>> yesod-persistent-1.4.0.2 depends on shakespeare-2.0.5 which >> failed to >> >>>>>>> install. >> >>>>>>> >> >>>>>>> >> >>>>>>> -- >> >>>>>>> Public key ID: E8FE60D7 >> >>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >> >>>>>>> >> >>>>>>> On Thu, Jun 18, 2015 at 4:16 PM, Christopher Allen >> >>>>>>> wrote: >> >>>>>>>> >> >>>>>>>> Some of that looks like churn from trying to install an older >> >>>>>>>> version of Yesod over a newer one. Are you using a sandbox? if >> so, did you >> >>>>>>>> wipe it out before attempting Yesod 1.2.6.1? What we'd be >> looking for is a >> >>>>>>>> package conflict that tells you which package of what version >> that is >> >>>>>>>> globally installed is causing the conflict. >> >>>>>>>> >> >>>>>>>> Insta-Yesodian conflict implies you're reinstalling into a >> not-fresh >> >>>>>>>> packgage-db which means you either need to wipe your user >> package-db or use >> >>>>>>>> a sandbox. (I recommend the latter). >> >>>>>>>> >> >>>>>>>> If you haven't done so, do that, then re-attempt that version of >> >>>>>>>> Yesod (1.2.6.1). >> >>>>>>>> >> >>>>>>>> >> >>>>>>>> >> >>>>>>>> On Thu, Jun 18, 2015 at 2:57 PM, Miguel A. Santos >> >>>>>>>> wrote: >> >>>>>>>>> >> >>>>>>>>> Thanks! No problem. I gave a try to your suggestion. It doesn't >> >>>>>>>>> look I'll get yesod installed without "paying" >> >>>>>>>>> a bigger price than just "downgrading". :-/ >> >>>>>>>>> >> >>>>>>>>> Yesod 1.4.0 warns that forcing installing it will likely break >> >>>>>>>>> pandoc, among other things. >> >>>>>>>>> I can give it a try though, but I really use pandoc regularly. >> >>>>>>>>> Plus, it's still not clear that the building process >> >>>>>>>>> will not fail. And installing pandoc took me surprisingly a lot >> of >> >>>>>>>>> time last time. >> >>>>>>>>> >> >>>>>>>>> Forcing Yesod-1.2.6.1 won't allow cabal to satisfy the >> >>>>>>>>> dependencies. >> >>>>>>>>> >> >>>>>>>>> I guess I could keep trying other versions and see. But I think >> >>>>>>>>> I'll try the 1.4.0 first. Will post here >> >>>>>>>>> the results so that at least others may hopefully benefit from >> >>>>>>>>> this. >> >>>>>>>>> >> >>>>>>>>> >> >>>>>>>>> >> ----------------------------------------------------------------------------------------- >> >>>>>>>>> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.4.0 >> >>>>>>>>> Resolving dependencies... >> >>>>>>>>> In order, the following would be installed: >> >>>>>>>>> monad-control-0.3.3.1 (latest: 1.0.0.4) (via: yesod-1.4.0 >> >>>>>>>>> yesod-core-1.4.9.1 authenticate-1.3.2.11 xml-conduit-1.3.0 >> >>>>>>>>> persistent-template-2.1.3.3 persistent-2.1.6 >> monad-logger-0.3.13.1 >> >>>>>>>>> http-conduit-2.1.5 conduit-extra-1.1.9 resourcet-1.1.5 >> resource-pool-0.2.3.2 >> >>>>>>>>> enclosed-exceptions-1.0.1.1 lifted-base-0.2.3.6) (new version) >> >>>>>>>>> lifted-base-0.2.3.6 (via: yesod-auth-1.4.5 yesod-core-1.4.9.1 >> >>>>>>>>> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 >> http-conduit-2.1.5 >> >>>>>>>>> conduit-1.2.4.2 resourcet-1.1.5 enclosed-exceptions-1.0.1.1) >> (reinstall) >> >>>>>>>>> (changes: monad-control-1.0.0.4 -> 0.3.3.1) >> >>>>>>>>> enclosed-exceptions-1.0.1.1 (via: yaml-0.8.11) (reinstall) >> >>>>>>>>> (changes: monad-control-1.0.0.4 -> 0.3.3.1) >> >>>>>>>>> resource-pool-0.2.3.2 (via: yesod-persistent-1.4.0.2 >> >>>>>>>>> persistent-2.1.6) (reinstall) (changes: monad-control-1.0.0.4 >> -> 0.3.3.1) >> >>>>>>>>> resourcet-1.1.5 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 >> >>>>>>>>> yesod-persistent-1.4.0.2 yesod-core-1.4.9.1 yaml-0.8.11 >> >>>>>>>>> authenticate-1.3.2.11 tagstream-conduit-0.5.5.3 >> xml-conduit-1.3.0 >> >>>>>>>>> wai-extra-3.0.7.1 persistent-2.1.6 monad-logger-0.3.13.1 >> http-conduit-2.1.5 >> >>>>>>>>> conduit-extra-1.1.9 conduit-1.2.4.2) (reinstall) (changes: >> >>>>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >> >>>>>>>>> conduit-1.2.4.2 (via: yesod-auth-1.4.5 yesod-persistent-1.4.0.2 >> >>>>>>>>> yesod-core-1.4.9.1 yaml-0.8.11 authenticate-1.3.2.11 >> >>>>>>>>> tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 persistent-2.1.6 >> >>>>>>>>> monad-logger-0.3.13.1 http-conduit-2.1.5 conduit-extra-1.1.9) >> (reinstall) >> >>>>>>>>> conduit-extra-1.1.9 (via: yesod-1.4.0 yesod-auth-1.4.5 >> >>>>>>>>> yesod-core-1.4.9.1 tagstream-conduit-0.5.5.3 xml-conduit-1.3.0 >> >>>>>>>>> monad-logger-0.3.13.1) (reinstall) (changes: >> monad-control-1.0.0.4 -> >> >>>>>>>>> 0.3.3.1) >> >>>>>>>>> http-conduit-2.1.5 (via: yesod-auth-1.4.5 authenticate-1.3.2.11) >> >>>>>>>>> (reinstall) (changes: monad-control-1.0.0.4 -> 0.3.3.1) >> >>>>>>>>> monad-logger-0.3.13.1 (via: yesod-1.4.0 yesod-core-1.4.9.1 >> >>>>>>>>> persistent-template-2.1.3.3 persistent-2.1.6) (reinstall) >> (changes: >> >>>>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >> >>>>>>>>> persistent-2.1.6 (via: yesod-auth-1.4.5 yesod-form-1.4.4.1 >> >>>>>>>>> yesod-persistent-1.4.0.2 persistent-template-2.1.3.3) >> (reinstall) (changes: >> >>>>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >> >>>>>>>>> persistent-template-2.1.3.3 (via: yesod-auth-1.4.5 >> >>>>>>>>> yesod-persistent-1.4.0.2) (reinstall) (changes: >> monad-control-1.0.0.4 -> >> >>>>>>>>> 0.3.3.1) >> >>>>>>>>> shakespeare-2.0.5 (via: yesod-1.4.0 yesod-auth-1.4.5 >> >>>>>>>>> yesod-form-1.4.4.1 yesod-core-1.4.9.1) (new package) >> >>>>>>>>> wai-extra-3.0.7.1 (via: yesod-1.4.0 yesod-core-1.4.9.1) >> (reinstall) >> >>>>>>>>> xml-conduit-1.3.0 (via: authenticate-1.3.2.11 >> >>>>>>>>> tagstream-conduit-0.5.5.3) (reinstall) (changes: >> monad-control-1.0.0.4 -> >> >>>>>>>>> 0.3.3.1) >> >>>>>>>>> tagstream-conduit-0.5.5.3 (via: authenticate-1.3.2.11) >> (reinstall) >> >>>>>>>>> authenticate-1.3.2.11 (via: yesod-auth-1.4.5) (reinstall) >> (changes: >> >>>>>>>>> monad-control-1.0.0.4 -> 0.3.3.1) >> >>>>>>>>> yaml-0.8.11 (via: yesod-1.4.0) (reinstall) >> >>>>>>>>> yesod-core-1.4.9.1 (via: yesod-1.4.0 yesod-auth-1.4.5 >> >>>>>>>>> yesod-form-1.4.4.1 yesod-persistent-1.4.0.2) (new package) >> >>>>>>>>> yesod-persistent-1.4.0.2 (via: yesod-1.4.0 yesod-auth-1.4.5 >> >>>>>>>>> yesod-form-1.4.4.1) (new package) >> >>>>>>>>> yesod-form-1.4.4.1 (via: yesod-1.4.0 yesod-auth-1.4.5) (new >> >>>>>>>>> package) >> >>>>>>>>> yesod-auth-1.4.5 (via: yesod-1.4.0) (new package) >> >>>>>>>>> yesod-1.4.0 (latest: 1.4.1.5) (new package) >> >>>>>>>>> cabal: The following packages are likely to be broken by the >> >>>>>>>>> reinstalls: >> >>>>>>>>> pandoc-citeproc-0.7.1.1 >> >>>>>>>>> pandoc-1.14.0.4 >> >>>>>>>>> project-template-0.2.0 >> >>>>>>>>> http-reverse-proxy-0.4.2 >> >>>>>>>>> Use --force-reinstalls if you want to install anyway. >> >>>>>>>>> msantos at MBP-2[15:42]:~/System$cabal install yesod-1.2.6.1 >> >>>>>>>>> Resolving dependencies... >> >>>>>>>>> cabal: Could not resolve dependencies: >> >>>>>>>>> next goal: yesod (user goal) >> >>>>>>>>> rejecting: yesod-1.4.1.5, 1.4.1.4, 1.4.1.3, 1.4.1.2, 1.4.1.1, >> >>>>>>>>> 1.4.1, 1.4.0 >> >>>>>>>>> (global constraint requires ==1.2.6.1) >> >>>>>>>>> trying: yesod-1.2.6.1 >> >>>>>>>>> trying: streaming-commons-0.1.12.1/installed-200... (dependency >> of >> >>>>>>>>> yesod-1.2.6.1) >> >>>>>>>>> trying: warp-3.0.13.1/installed-150... (dependency of >> >>>>>>>>> yesod-1.2.6.1) >> >>>>>>>>> next goal: yesod-form (dependency of yesod-1.2.6.1) >> >>>>>>>>> rejecting: yesod-form-1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, 1.4.2.1, >> >>>>>>>>> 1.4.2, 1.4.1.1, >> >>>>>>>>> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => >> yesod-form>=1.3 >> >>>>>>>>> && <1.4) >> >>>>>>>>> trying: yesod-form-1.3.16 >> >>>>>>>>> next goal: persistent (dependency of yesod-form-1.3.16) >> >>>>>>>>> rejecting: persistent-2.1.6/installed-4f9..., 2.1.6, 2.1.5, >> 2.1.4, >> >>>>>>>>> 2.1.3, >> >>>>>>>>> 2.1.2, 2.1.1.7, 2.1.1.6, 2.1.1.5, 2.1.1.4, 2.1.1.3, 2.1.1.2, >> >>>>>>>>> 2.1.1.1, 2.1.1, >> >>>>>>>>> 2.1.0.2, 2.1.0.1, 2.1 (conflict: yesod-form => persistent>=1.2 >> && >> >>>>>>>>> <2.1) >> >>>>>>>>> trying: persistent-1.3.3 >> >>>>>>>>> trying: path-pieces-0.2.0/installed-533... (dependency of >> >>>>>>>>> persistent-1.3.3) >> >>>>>>>>> next goal: yesod-core (dependency of yesod-1.2.6.1) >> >>>>>>>>> rejecting: yesod-core-1.4.9.1, 1.4.9, 1.4.8.3, 1.4.8.2, 1.4.8.1, >> >>>>>>>>> 1.4.8, >> >>>>>>>>> 1.4.7.3, 1.4.7.2, 1.4.7.1, 1.4.7, 1.4.6.2, 1.4.6.1, 1.4.6, >> 1.4.5, >> >>>>>>>>> 1.4.4.5, >> >>>>>>>>> 1.4.4.4, 1.4.4.3, 1.4.4.2, 1.4.4.1, 1.4.4, 1.4.3.1, 1.4.3, >> 1.4.2, >> >>>>>>>>> 1.4.1.1, >> >>>>>>>>> 1.4.1, 1.4.0.2, 1.4.0.1, 1.4.0 (conflict: yesod => >> >>>>>>>>> yesod-core>=1.2.2 && <1.3) >> >>>>>>>>> rejecting: yesod-core-1.2.20.1, 1.2.20, 1.2.19.2, 1.2.19.1, >> 1.2.19, >> >>>>>>>>> 1.2.18, >> >>>>>>>>> 1.2.17, 1.2.16.1, 1.2.16, 1.2.15.2, 1.2.15.1, 1.2.15, 1.2.14, >> >>>>>>>>> 1.2.13.1, >> >>>>>>>>> 1.2.13, 1.2.12, 1.2.11.1, 1.2.11, 1.2.10, 1.2.9.2, 1.2.9.1, >> 1.2.9, >> >>>>>>>>> 1.2.8, >> >>>>>>>>> 1.2.7, 1.2.6.7, 1.2.6.6, 1.2.6.5, 1.2.6.4, 1.2.6.3, 1.2.6.2, >> >>>>>>>>> 1.2.6.1 >> >>>>>>>>> (conflict: path-pieces==0.2.0/installed-533..., yesod-core => >> >>>>>>>>> path-pieces>=0.1.2 && <0.2) >> >>>>>>>>> rejecting: yesod-core-1.2.6 (conflict: streaming-commons => >> >>>>>>>>> text==1.1.0.0/installed-9bd..., yesod-core => text>=0.7 && >> <0.12) >> >>>>>>>>> rejecting: yesod-core-1.2.5, 1.2.4.5, 1.2.4.4, 1.2.4.3, 1.2.4.2, >> >>>>>>>>> 1.2.4.1, >> >>>>>>>>> 1.2.4, 1.2.3, 1.2.2 (conflict: warp => >> >>>>>>>>> wai==3.0.2.3/installed-39c..., >> >>>>>>>>> yesod-core => wai>=1.4 && <1.5) >> >>>>>>>>> rejecting: yesod-core-1.2.1, 1.2.0.4, 1.2.0.3, 1.2.0.2, 1.2.0.1, >> >>>>>>>>> 1.2.0, >> >>>>>>>>> 1.1.8.3, 1.1.8.2, 1.1.8.1, 1.1.8, 1.1.7.2, 1.1.7.1, 1.1.7, >> 1.1.6.1, >> >>>>>>>>> 1.1.6, >> >>>>>>>>> 1.1.5, 1.1.4.2, 1.1.4.1, 1.1.4, 1.1.3.1, 1.1.3, 1.1.2.2, >> 1.1.2.1, >> >>>>>>>>> 1.1.2, >> >>>>>>>>> 1.1.1.2, 1.1.1.1, 1.1.1, 1.1.0.1, 1.1.0, 1.0.1.3, 1.0.1.2, >> 1.0.1.1, >> >>>>>>>>> 1.0.1, >> >>>>>>>>> 1.0.0.2, 1.0.0.1, 1.0.0, 0.10.3, 0.10.2.2, 0.10.2.1, 0.10.2, >> >>>>>>>>> 0.10.1, 0.9.4.1, >> >>>>>>>>> 0.9.4, 0.9.3.6, 0.9.3.5, 0.9.3.4, 0.9.3.3, 0.9.3.2, 0.9.3.1, >> 0.9.3, >> >>>>>>>>> 0.9.2, >> >>>>>>>>> 0.9.1.1, 0.9.1, 0.8.3.2, 0.8.3.1, 0.8.3, 0.8.2, 0.8.1, 0.8.0.1, >> >>>>>>>>> 0.8.0, >> >>>>>>>>> 0.7.0.2, 0.7.0.1, 0.7.0 (conflict: yesod => yesod-core>=1.2.2 && >> >>>>>>>>> <1.3) >> >>>>>>>>> Backjump limit reached (change with --max-backjumps). >> >>>>>>>>> >> >>>>>>>>> -- >> >>>>>>>>> Public key ID: E8FE60D7 >> >>>>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >> >>>>>>>>> >> >>>>>>>>> On Thu, Jun 18, 2015 at 3:32 PM, Christopher Allen >> >>>>>>>>> wrote: >> >>>>>>>>>> >> >>>>>>>>>> Ah that's frustrating, that's my mistake ? I'm sorry. I thought >> >>>>>>>>>> you were talking about GHC for Mac OS X not being available >> for your OS >> >>>>>>>>>> version either. >> >>>>>>>>>> >> >>>>>>>>>> Your best bet on HP is to specify an older version of Yesod >> that >> >>>>>>>>>> will work with the dependencies that your version of HP comes >> with. >> >>>>>>>>>> >> >>>>>>>>>> On Thu, Jun 18, 2015 at 2:08 PM, Miguel A. Santos >> >>>>>>>>>> wrote: >> >>>>>>>>>>> >> >>>>>>>>>>> Indeed I saw that. That's what I meant with the bindist not >> being >> >>>>>>>>>>> available for OSX 10.6.8; only for 10.7+ >> >>>>>>>>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#macosx_x86_64 >> >>>>>>>>>>> My bad, I should have said it before. >> >>>>>>>>>>> >> >>>>>>>>>>> >> >>>>>>>>>>> >> >>>>>>>>>>> -- >> >>>>>>>>>>> Public key ID: E8FE60D7 >> >>>>>>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >> >>>>>>>>>>> >> >>>>>>>>>>> On Thu, Jun 18, 2015 at 2:36 PM, Christopher Allen >> >>>>>>>>>>> wrote: >> >>>>>>>>>>>> >> >>>>>>>>>>>> Did you see that the Mac instructions said to follow the >> "other >> >>>>>>>>>>>> *nix" instructions if you were using an older version of Mac >> OS X? >> >>>>>>>>>>>> >> >>>>>>>>>>>> Those link here: >> >>>>>>>>>>>> https://www.haskell.org/ghc/download_ghc_7_8_4#binaries >> >>>>>>>>>>>> >> >>>>>>>>>>>> Get rid of all that (GHC, HP, Cabal), then install GHC using >> the >> >>>>>>>>>>>> bindist for Mac OS X linked above. >> >>>>>>>>>>>> >> >>>>>>>>>>>> On Thu, Jun 18, 2015 at 1:14 PM, Miguel A. Santos >> >>>>>>>>>>>> wrote: >> >>>>>>>>>>>>> >> >>>>>>>>>>>>> That is obviously a typo: I meant I *did* do a fresh >> install of >> >>>>>>>>>>>>> the Haskell Platform and cabal before >> >>>>>>>>>>>>> trying -and failing- to install yesod. >> >>>>>>>>>>>>> >> >>>>>>>>>>>>> On Thu, Jun 18, 2015 at 1:38 PM, Miguel A. Santos >> >>>>>>>>>>>>> wrote: >> >>>>>>>>>>>>>> >> >>>>>>>>>>>>>> This corresponds to a fresh install of the HP, ghc, and >> cabal >> >>>>>>>>>>>>>> I didn't before trying to install yesod. >> >>>>>>>>>>>>> >> >>>>>>>>>>>>> >> >>>>>>>>>>>>> >> >>>>>>>>>>>>> -- >> >>>>>>>>>>>>> Public key ID: E8FE60D7 >> >>>>>>>>>>>>> Public key server: see, e.g., hkp://keys.gnupg.net >> >>>>>>>>>>>>> >> >>>>>>>>>>>>> _______________________________________________ >> >>>>>>>>>>>>> Haskell-Cafe mailing list >> >>>>>>>>>>>>> Haskell-Cafe at haskell.org >> >>>>>>>>>>>>> >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> >>>>>>>>>>>>> >> >>>>>>>>>>>> >> >>>>>>>>>>>> >> >>>>>>>>>>>> >> >>>>>>>>>>>> -- >> >>>>>>>>>>>> Chris Allen >> >>>>>>>>>>>> Currently working on http://haskellbook.com >> >>>>>>>>>>> >> >>>>>>>>>>> >> >>>>>>>>>> >> >>>>>>>>>> >> >>>>>>>>>> >> >>>>>>>>>> -- >> >>>>>>>>>> Chris Allen >> >>>>>>>>>> Currently working on http://haskellbook.com >> >>>>>>>>> >> >>>>>>>>> >> >>>>>>>> >> >>>>>>>> >> >>>>>>>> >> >>>>>>>> -- >> >>>>>>>> Chris Allen >> >>>>>>>> Currently working on http://haskellbook.com >> >>>>>>> >> >>>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> -- >> >>>>>> Chris Allen >> >>>>>> Currently working on http://haskellbook.com >> >>>>> >> >>>>> >> >>>> >> >>>> >> >>>> >> >>>> -- >> >>>> Chris Allen >> >>>> Currently working on http://haskellbook.com >> >>> >> >>> >> >> >> >> _______________________________________________ >> >> Haskell-Cafe mailing list >> >> Haskell-Cafe at haskell.org >> >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> > >> > >> > _______________________________________________ >> > Haskell-Cafe mailing list >> > Haskell-Cafe at haskell.org >> > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> > >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at well-typed.com Fri Jun 19 13:19:32 2015 From: adam at well-typed.com (Adam Gundry) Date: Fri, 19 Jun 2015 14:19:32 +0100 Subject: [Haskell-cafe] Mild confusion around type family In-Reply-To: References: Message-ID: <558416E4.8020901@well-typed.com> On 18/06/15 17:19, Nicholls, Mark wrote: >> data Z >> data S n > >> type family Sub a b >> type instance Sub a Z = a >> type instance Sub (S a) (S b) = Sub a b > > I want this to be a type error!...but the above type family appears to > not be partial?this IS defined?.?Sub Z (S Z)? is a type! (I thought it > wasn?t) > >> oneMinusTwo :: Sub Z (S Z) >> oneMinusTwo = undefined :: Sub (S Z) (S (S Z)) This is a slightly subtle point about type families. The type family application `Sub Z (S Z)` does not reduce, but neither is it an error. In this case, because Sub is an open type family, there is nothing to stop someone subsequently defining something like type instance Sub Z (S b) = Z in another module. Type families are functional relations, not functions in the FP sense. See also the discussion here, about the corresponding situation for a closed type family: https://ghc.haskell.org/trac/ghc/ticket/9636 Hope this helps, Adam -- Adam Gundry, Haskell Consultant Well-Typed LLP, http://www.well-typed.com/ From heraldhoi at gmail.com Fri Jun 19 13:32:40 2015 From: heraldhoi at gmail.com (Geraldus) Date: Fri, 19 Jun 2015 13:32:40 +0000 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: >From Haskell Wiki Mac OS X page: > To uninstall ghc call: *sudo uninstall-hs* > In order to work with/in a sandbox it's enough to do mkdir ~/MyProject cd ~/MyProject cabal init cabal sandbox init -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholls.mark at vimn.com Fri Jun 19 14:14:57 2015 From: nicholls.mark at vimn.com (Nicholls, Mark) Date: Fri, 19 Jun 2015 14:14:57 +0000 Subject: [Haskell-cafe] Mild confusion around type family In-Reply-To: <558416E4.8020901@well-typed.com> References: <558416E4.8020901@well-typed.com> Message-ID: Ah ok...my mistake... Lets do closed (below)....same problem. Its not partial.....so how do we make it a type error?...."1 - 2" is not defined on the natural numbers (I'll have a go with datakinds....) > {-# LANGUAGE DataKinds #-} > {-# LANGUAGE ExplicitForAll #-} > {-# LANGUAGE FlexibleContexts #-} > {-# LANGUAGE FlexibleInstances #-} > {-# LANGUAGE GADTs #-} > {-# LANGUAGE MultiParamTypeClasses #-} > {-# LANGUAGE PolyKinds #-} > {-# LANGUAGE StandaloneDeriving #-} > {-# LANGUAGE TypeFamilies #-} > {-# LANGUAGE TypeOperators #-} > {-# LANGUAGE UndecidableInstances #-} > {-# LANGUAGE ScopedTypeVariables #-} lets do something simple > data Z > data S n > type family Sub a b where > -- a - 0 == a > Sub a Z = a > -- (a + 1) - (b + 1) == a - b > Sub (S a) (S b) = Sub a b > oneMinusOne :: Z > oneMinusOne = undefined :: Sub (S Z) (S Z) I want this to be a type error!... > oneMinusTwo :: Sub Z (S Z) > oneMinusTwo = undefined :: Sub (S Z) (S (S Z)) >-----Original Message----- >From: Haskell-Cafe [mailto:haskell-cafe-bounces at haskell.org] On Behalf Of >Adam Gundry >Sent: 19 June 2015 2:20 PM >To: haskell-cafe at haskell.org >Subject: Re: [Haskell-cafe] Mild confusion around type family > >On 18/06/15 17:19, Nicholls, Mark wrote: >>> data Z >>> data S n >> >>> type family Sub a b >>> type instance Sub a Z = a >>> type instance Sub (S a) (S b) = Sub a b >> >> I want this to be a type error!...but the above type family appears to >> not be partial...this IS defined...."Sub Z (S Z)" is a type! (I thought it >> wasn't) >> >>> oneMinusTwo :: Sub Z (S Z) >>> oneMinusTwo = undefined :: Sub (S Z) (S (S Z)) > >This is a slightly subtle point about type families. The type family application >`Sub Z (S Z)` does not reduce, but neither is it an error. >In this case, because Sub is an open type family, there is nothing to stop >someone subsequently defining something like > > type instance Sub Z (S b) = Z > >in another module. > >Type families are functional relations, not functions in the FP sense. > >See also the discussion here, about the corresponding situation for a closed >type family: https://ghc.haskell.org/trac/ghc/ticket/9636 > >Hope this helps, > >Adam > >-- >Adam Gundry, Haskell Consultant >Well-Typed LLP, http://www.well-typed.com/ >_______________________________________________ >Haskell-Cafe mailing list >Haskell-Cafe at haskell.org >http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. From mark.lentczner at gmail.com Fri Jun 19 14:35:54 2015 From: mark.lentczner at gmail.com (Mark Lentczner) Date: Fri, 19 Jun 2015 07:35:54 -0700 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: HP 2014.2.0.0 for Mac OS X is built with a bindist of GHC 7.8.3 that *is* compiled with support for 10.6. To remove HP from a system, you can use the handy unisntall-hs command - that does a better job than just poking around by hand. There does appear to be a problem with Template Haskell, and loading some packages that depend on yet other packages to be loaded... For some reason dynamic loading in this case doesn't resolve. Fortunately there is a workaround: ?When you see a message like: Loading package parsec-3.1.5 ... : can't load .so/.DLL for: /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/ libHSparsec-3.1.5-ghc7.8.3.dylib (dlopen(/Library/Haskell/ghc- 7.8.3-x86_64/lib/parsec-3.1.5/libHSparsec-3.1.5-ghc7.8.3.dylib, 9): *Library not loaded: @rpath/libHStext-1.1.0.0-ghc7.**8.3.dylib* Referenced from: /Library/Haskell/ghc-7.8.3-x86_64/lib/parsec-3.1.5/ libHSparsec-3.1.5-ghc7.8.3.dylib Reason: image not found) Look at the part in red. It indicates that *text *can't be loaded. You need to add it's libdir to an export like so (you are adding the location of the libHStext... file, which is always in a similarly named directory under /Library/Haskell/ghc-7.8.3-x86_64/lib): export DYLD_FALLBACK_LIBRARY_PATH=/Library/Haskell/ghc- 7.8.3-x86_64/lib/text-1.1.0.0:$DYLD_FALLBACK_LIBRARY_PATH Rebuild, and you may see another to add, and you'll have to do this again. To build shaekespeare-2.0.4.1 on a stock HP 2014.2.0.0 install, I needed to add the following libs to that path primitive, hashable, mtl, and text. I don't yet know if this is a bug in the way the HP libs were built, the way GHC was built, or just a fundamental problem of GHC 7.8.3 (and later) and OS X 10.6. - Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.lentczner at gmail.com Fri Jun 19 14:57:22 2015 From: mark.lentczner at gmail.com (Mark Lentczner) Date: Fri, 19 Jun 2015 07:57:22 -0700 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: For the record: The problem doesn't occur on OS X 10.10. I haven't done the "binary search through OS X releases" dance to find where the problem stops being a problem.. ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajnsit at gmail.com Fri Jun 19 15:14:10 2015 From: ajnsit at gmail.com (Anupam Jain) Date: Fri, 19 Jun 2015 20:44:10 +0530 Subject: [Haskell-cafe] Haskell users on Chile In-Reply-To: <5584214C.30003@ucv.cl> References: <5576D88E.7090203@gmail.com> <3102A7DE-6DEB-4B5B-B322-060E3ED07C17@dcc.uchile.cl> <5584214C.30003@ucv.cl> Message-ID: Also, I am a part of the Startup Chile community. I would be happy to promote this group on their mailing list. On Friday, June 19, 2015, Ismael Figueroa wrote: > Hi all, > > I definitely love the idea of having a chilean Haskell user group :-) > Even more so if it is in the V Region ;-) > > -- > Ismael > > On 18/06/15 18:14, ?ric Tanter wrote: > >> I?m a CS professor at Universidad de Chile, doing research in PL, some >> of it in Haskell. I also use Haskell for part of my PL courses, so there >> might be some Haskellers that came out of these experiences. >> >> Also, Ismael Figueroa (in cc) graduated from his PhD under my >> supervision last year. His PhD thesis was entirely around Haskell >> (monadic embedding of aspects, compositional reasoning about >> interference), and we?ve done some other stuff on Haskell too (effect >> capabilities). Ismael is now professor at Universidad Cat?lica de >> Valpara?so. >> >> -- ?ric >> >> >> On Jun 18, 2015, at 2:44 PM, Roman Dzvinkovsky >> > wrote: >>> >>> Living in Vi?a del Mar, would love to participate. >>> >>> 2015-06-09 9:46 GMT-03:00 Anupam Jain >> >: >>> >>> Great idea! Though not a native Chilean, I lived in Chile (Santiago) >>> for the better part of a year in 2014-2015, where my favourite >>> activity was infiltrating JS meetups and evangelizing Haskell :) >>> >>> It would be great to have a dedicated Haskell community there. >>> >>> -- Anupam >>> >>> On Tue, Jun 9, 2015 at 5:44 PM, Ruben Astudillo >>> > wrote: >>> > Hi all >>> > >>> > I would like to see how many haskellers are living on Chile with >>> hopes of >>> > forming a user group. If you are in here, you should reply this >>> thread and >>> > see >>> > how many of us there are. You can also contact me to my mail. >>> > >>> > -- >>> > Ruben Astudillo. pgp: 0x3C332311 , usala en lo posible :-) >>> > Crear un haiku, en diecisiete silabas, es complica... >>> > _______________________________________________ >>> > Haskell-Cafe mailing list >>> > Haskell-Cafe at haskell.org >>> > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>> _______________________________________________ >>> Haskell-Cafe mailing list >>> Haskell-Cafe at haskell.org >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>> >>> >>> _______________________________________________ >>> Haskell-Cafe mailing list >>> Haskell-Cafe at haskell.org >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>> >> >> > -- > Ismael > -- Sent from my hyper-communicator -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholls.mark at vimn.com Fri Jun 19 15:48:46 2015 From: nicholls.mark at vimn.com (Nicholls, Mark) Date: Fri, 19 Jun 2015 15:48:46 +0000 Subject: [Haskell-cafe] Do people use visitor pattern in Haskell... Message-ID: My initial guess would be no...its built into the language But.... I find myself tempted to use it (in order to match on a type that's the instance of a typeclass)...which makes me think I've missed something. So... > data Foo = Foo > data Bar = Bar Ooo...this looks like an OO design pattern...surely wrong? > class Wibble a where > visit :: (Foo -> b) -> (Bar -> b) -> a -> b > instance Wibble Foo where > visit f _ x = f x > instance Wibble Bar where > visit _ f x = f x I want a list of Wibbles.... hmmm... (Wibble a) => [a] is clearly wrong... I want [(Wibble a) =>a] so I package it up? > data WibblePackage where > WibblePackage :: (Wibble a) => a -> WibblePackage lets try this now...so pointless function across Wibbles in a list. > fizzBuzz :: [WibblePackage] -> Integer > fizzBuzz [] = 0 > fizzBuzz ((WibblePackage x) : xs) = (visit (\_ -> 1) (\_ -> 2) x) + (fizzBuzz xs) > help :: Integer > help = fizzBuzz [WibblePackage Foo,WibblePackage Bar] That works! OO nerds will get uptight about "closing" the Wibble typeclass....but I've managed to create a list of different types and have a mechanism for recovering the type. How would a Haskell nerd do this? (I have looked, but they look more complicated....maybe to my OO eye). CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajnsit at gmail.com Fri Jun 19 16:03:49 2015 From: ajnsit at gmail.com (Anupam Jain) Date: Fri, 19 Jun 2015 21:33:49 +0530 Subject: [Haskell-cafe] Do people use visitor pattern in Haskell... In-Reply-To: References: Message-ID: I discovered the same general pattern foroop On Friday, June 19, 2015, Nicholls, Mark wrote: > My initial guess would be no?its built into the language > > > > But?. > > > > I find myself tempted to use it (in order to match on a type that?s the > instance of a typeclass)?which makes me think I?ve missed something. > > > > So? > > > > > data Foo = Foo > > > data Bar = Bar > > > > Ooo?this looks like an OO design pattern?surely wrong? > > > > > class Wibble a where > > > visit :: (Foo -> b) -> (Bar -> b) -> a -> b > > > > > instance Wibble Foo where > > > visit f _ x = f x > > > instance Wibble Bar where > > > visit _ f x = f x > > > > I want a list of Wibbles.... > > hmmm... > > (Wibble a) => [a] is clearly wrong... > > I want [(Wibble a) =>a] > > > > so I package it up? > > > > > data WibblePackage where > > > WibblePackage :: (Wibble a) => a -> WibblePackage > > > > lets try this now?so pointless function across Wibbles in a list. > > > > > fizzBuzz :: [WibblePackage] -> Integer > > > fizzBuzz [] = 0 > > > fizzBuzz ((WibblePackage x) : xs) = (visit (\_ -> 1) (\_ -> 2) x) + > (fizzBuzz xs) > > > > > help :: Integer > > > help = fizzBuzz [WibblePackage Foo,WibblePackage Bar] > > > > > > That works! > > > > OO nerds will get uptight about ?closing? the Wibble typeclass?.but I?ve > managed to create a list of different types and have a mechanism for > recovering the type. > > > > How would a Haskell nerd do this? (I have looked, but they look more > complicated?.maybe to my OO eye). > > > > > > > > CONFIDENTIALITY NOTICE > > This e-mail (and any attached files) is confidential and protected by > copyright (and other intellectual property rights). If you are not the > intended recipient please e-mail the sender and then delete the email and > any attached files immediately. Any further use or dissemination is > prohibited. > > While MTV Networks Europe has taken steps to ensure that this email and > any attachments are virus free, it is your responsibility to ensure that > this message and any attachments are virus free and do not affect your > systems / data. > > Communicating by email is not 100% secure and carries risks such as delay, > data corruption, non-delivery, wrongful interception and unauthorised > amendment. If you communicate with us by e-mail, you acknowledge and assume > these risks, and you agree to take appropriate measures to minimise these > risks when e-mailing us. > > MTV Networks International, MTV Networks UK & Ireland, Greenhouse, > Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions > International, Be Viacom, Viacom International Media Networks and VIMN and > Comedy Central are all trading names of MTV Networks Europe. MTV Networks > Europe is a partnership between MTV Networks Europe Inc. and Viacom > Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley > Crescent, London, NW1 8TT. > -- Sent from my hyper-communicator -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajnsit at gmail.com Fri Jun 19 16:05:50 2015 From: ajnsit at gmail.com (Anupam Jain) Date: Fri, 19 Jun 2015 21:35:50 +0530 Subject: [Haskell-cafe] Do people use visitor pattern in Haskell... In-Reply-To: References: Message-ID: Doh fat fingers! I discovered the same general pattern for oops programming in Haskell. An example - https://github.com/ajnsit/oop-inheritence-in-haskell/blob/master/Main.hs On Friday, June 19, 2015, Anupam Jain wrote: > I discovered the same general pattern foroop > > On Friday, June 19, 2015, Nicholls, Mark > wrote: > >> My initial guess would be no?its built into the language >> >> >> >> But?. >> >> >> >> I find myself tempted to use it (in order to match on a type that?s the >> instance of a typeclass)?which makes me think I?ve missed something. >> >> >> >> So? >> >> >> >> > data Foo = Foo >> >> > data Bar = Bar >> >> >> >> Ooo?this looks like an OO design pattern?surely wrong? >> >> >> >> > class Wibble a where >> >> > visit :: (Foo -> b) -> (Bar -> b) -> a -> b >> >> >> >> > instance Wibble Foo where >> >> > visit f _ x = f x >> >> > instance Wibble Bar where >> >> > visit _ f x = f x >> >> >> >> I want a list of Wibbles.... >> >> hmmm... >> >> (Wibble a) => [a] is clearly wrong... >> >> I want [(Wibble a) =>a] >> >> >> >> so I package it up? >> >> >> >> > data WibblePackage where >> >> > WibblePackage :: (Wibble a) => a -> WibblePackage >> >> >> >> lets try this now?so pointless function across Wibbles in a list. >> >> >> >> > fizzBuzz :: [WibblePackage] -> Integer >> >> > fizzBuzz [] = 0 >> >> > fizzBuzz ((WibblePackage x) : xs) = (visit (\_ -> 1) (\_ -> 2) x) + >> (fizzBuzz xs) >> >> >> >> > help :: Integer >> >> > help = fizzBuzz [WibblePackage Foo,WibblePackage Bar] >> >> >> >> >> >> That works! >> >> >> >> OO nerds will get uptight about ?closing? the Wibble typeclass?.but I?ve >> managed to create a list of different types and have a mechanism for >> recovering the type. >> >> >> >> How would a Haskell nerd do this? (I have looked, but they look more >> complicated?.maybe to my OO eye). >> >> >> >> >> >> >> >> CONFIDENTIALITY NOTICE >> >> This e-mail (and any attached files) is confidential and protected by >> copyright (and other intellectual property rights). If you are not the >> intended recipient please e-mail the sender and then delete the email and >> any attached files immediately. Any further use or dissemination is >> prohibited. >> >> While MTV Networks Europe has taken steps to ensure that this email and >> any attachments are virus free, it is your responsibility to ensure that >> this message and any attachments are virus free and do not affect your >> systems / data. >> >> Communicating by email is not 100% secure and carries risks such as >> delay, data corruption, non-delivery, wrongful interception and >> unauthorised amendment. If you communicate with us by e-mail, you >> acknowledge and assume these risks, and you agree to take appropriate >> measures to minimise these risks when e-mailing us. >> >> MTV Networks International, MTV Networks UK & Ireland, Greenhouse, >> Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions >> International, Be Viacom, Viacom International Media Networks and VIMN and >> Comedy Central are all trading names of MTV Networks Europe. MTV Networks >> Europe is a partnership between MTV Networks Europe Inc. and Viacom >> Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley >> Crescent, London, NW1 8TT. >> > > > -- > Sent from my hyper-communicator > -- Sent from my hyper-communicator -------------- next part -------------- An HTML attachment was scrubbed... URL: From miguelimo38 at yandex.ru Fri Jun 19 16:08:40 2015 From: miguelimo38 at yandex.ru (MigMit) Date: Fri, 19 Jun 2015 18:08:40 +0200 Subject: [Haskell-cafe] Do people use visitor pattern in Haskell... In-Reply-To: References: Message-ID: data WibblePackage = WPFoo Foo | WPBar Bar ?????????? ? iPhone > 19 ???? 2015 ?., ? 17:48, Nicholls, Mark ???????(?): > > My initial guess would be no?its built into the language > > But?. > > I find myself tempted to use it (in order to match on a type that?s the instance of a typeclass)?which makes me think I?ve missed something. > > So? > > > data Foo = Foo > > data Bar = Bar > > Ooo?this looks like an OO design pattern?surely wrong? > > > class Wibble a where > > visit :: (Foo -> b) -> (Bar -> b) -> a -> b > > > instance Wibble Foo where > > visit f _ x = f x > > instance Wibble Bar where > > visit _ f x = f x > > I want a list of Wibbles.... > hmmm... > (Wibble a) => [a] is clearly wrong... > I want [(Wibble a) =>a] > > so I package it up? > > > data WibblePackage where > > WibblePackage :: (Wibble a) => a -> WibblePackage > > lets try this now?so pointless function across Wibbles in a list. > > > fizzBuzz :: [WibblePackage] -> Integer > > fizzBuzz [] = 0 > > fizzBuzz ((WibblePackage x) : xs) = (visit (\_ -> 1) (\_ -> 2) x) + (fizzBuzz xs) > > > help :: Integer > > help = fizzBuzz [WibblePackage Foo,WibblePackage Bar] > > > That works! > > OO nerds will get uptight about ?closing? the Wibble typeclass?.but I?ve managed to create a list of different types and have a mechanism for recovering the type. > > How would a Haskell nerd do this? (I have looked, but they look more complicated?.maybe to my OO eye). > > > > > CONFIDENTIALITY NOTICE > > This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. > > While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. > > Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. > > MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholls.mark at vimn.com Fri Jun 19 16:09:02 2015 From: nicholls.mark at vimn.com (Nicholls, Mark) Date: Fri, 19 Jun 2015 16:09:02 +0000 Subject: [Haskell-cafe] Do people use visitor pattern in Haskell... In-Reply-To: References: Message-ID: The design pattern is very well known in the OO community?most of the use cases evaporate in Haskell?.in some sense its part of the language? Haskell is my 9th or 10th language, I can barely write ?hello world? without the manual, so I?m still at times I?m still trying to discover the basic idioms? How to put heterogenuos things in a list?and yet not loose all type information (I know about HList?but I think that?s for special occasions) From: Haskell-Cafe [mailto:haskell-cafe-bounces at haskell.org] On Behalf Of Anupam Jain Sent: 19 June 2015 5:04 PM To: haskell-cafe Cafe Subject: Re: [Haskell-cafe] Do people use visitor pattern in Haskell... I discovered the same general pattern foroop On Friday, June 19, 2015, Nicholls, Mark > wrote: My initial guess would be no?its built into the language But?. I find myself tempted to use it (in order to match on a type that?s the instance of a typeclass)?which makes me think I?ve missed something. So? > data Foo = Foo > data Bar = Bar Ooo?this looks like an OO design pattern?surely wrong? > class Wibble a where > visit :: (Foo -> b) -> (Bar -> b) -> a -> b > instance Wibble Foo where > visit f _ x = f x > instance Wibble Bar where > visit _ f x = f x I want a list of Wibbles.... hmmm... (Wibble a) => [a] is clearly wrong... I want [(Wibble a) =>a] so I package it up? > data WibblePackage where > WibblePackage :: (Wibble a) => a -> WibblePackage lets try this now?so pointless function across Wibbles in a list. > fizzBuzz :: [WibblePackage] -> Integer > fizzBuzz [] = 0 > fizzBuzz ((WibblePackage x) : xs) = (visit (\_ -> 1) (\_ -> 2) x) + (fizzBuzz xs) > help :: Integer > help = fizzBuzz [WibblePackage Foo,WibblePackage Bar] That works! OO nerds will get uptight about ?closing? the Wibble typeclass?.but I?ve managed to create a list of different types and have a mechanism for recovering the type. How would a Haskell nerd do this? (I have looked, but they look more complicated?.maybe to my OO eye). CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. -- Sent from my hyper-communicator CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholls.mark at vimn.com Fri Jun 19 16:10:45 2015 From: nicholls.mark at vimn.com (Nicholls, Mark) Date: Fri, 19 Jun 2015 16:10:45 +0000 Subject: [Haskell-cafe] Do people use visitor pattern in Haskell... In-Reply-To: References: Message-ID: The shortest answers are the best. Of course. Thanks. From: MigMit [mailto:miguelimo38 at yandex.ru] Sent: 19 June 2015 5:09 PM To: Nicholls, Mark Cc: haskell-cafe at haskell.org Subject: Re: [Haskell-cafe] Do people use visitor pattern in Haskell... data WibblePackage = WPFoo Foo | WPBar Bar ?????????? ? iPhone 19 ???? 2015 ?., ? 17:48, Nicholls, Mark > ???????(?): My initial guess would be no?its built into the language But?. I find myself tempted to use it (in order to match on a type that?s the instance of a typeclass)?which makes me think I?ve missed something. So? > data Foo = Foo > data Bar = Bar Ooo?this looks like an OO design pattern?surely wrong? > class Wibble a where > visit :: (Foo -> b) -> (Bar -> b) -> a -> b > instance Wibble Foo where > visit f _ x = f x > instance Wibble Bar where > visit _ f x = f x I want a list of Wibbles.... hmmm... (Wibble a) => [a] is clearly wrong... I want [(Wibble a) =>a] so I package it up? > data WibblePackage where > WibblePackage :: (Wibble a) => a -> WibblePackage lets try this now?so pointless function across Wibbles in a list. > fizzBuzz :: [WibblePackage] -> Integer > fizzBuzz [] = 0 > fizzBuzz ((WibblePackage x) : xs) = (visit (\_ -> 1) (\_ -> 2) x) + (fizzBuzz xs) > help :: Integer > help = fizzBuzz [WibblePackage Foo,WibblePackage Bar] That works! OO nerds will get uptight about ?closing? the Wibble typeclass?.but I?ve managed to create a list of different types and have a mechanism for recovering the type. How would a Haskell nerd do this? (I have looked, but they look more complicated?.maybe to my OO eye). CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe at haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chpatrick at gmail.com Fri Jun 19 16:10:50 2015 From: chpatrick at gmail.com (Patrick Chilton) Date: Fri, 19 Jun 2015 17:10:50 +0100 Subject: [Haskell-cafe] Do people use visitor pattern in Haskell... In-Reply-To: References: Message-ID: This is a frequent antipattern: https://lukepalmer.wordpress.com/2010/01/24/haskell-antipattern-existential-typeclass/ If all you can do with WibblePackage is recover either a Foo or a Bar, why not just use Either Foo Bar? On Fri, Jun 19, 2015 at 5:09 PM, Nicholls, Mark wrote: > The design pattern is very well known in the OO community?most of the > use cases evaporate in Haskell?.in some sense its part of the language? > > > > Haskell is my 9th or 10th language, I can barely write ?hello world? > without the manual, so I?m still at times I?m still trying to discover the > basic idioms? > > > > How to put heterogenuos things in a list?and yet not loose all type > information (I know about HList?but I think that?s for special occasions) > > > > > > *From:* Haskell-Cafe [mailto:haskell-cafe-bounces at haskell.org] *On Behalf > Of *Anupam Jain > *Sent:* 19 June 2015 5:04 PM > *To:* haskell-cafe Cafe > *Subject:* Re: [Haskell-cafe] Do people use visitor pattern in Haskell... > > > > I discovered the same general pattern foroop > > On Friday, June 19, 2015, Nicholls, Mark wrote: > > My initial guess would be no?its built into the language > > > > But?. > > > > I find myself tempted to use it (in order to match on a type that?s the > instance of a typeclass)?which makes me think I?ve missed something. > > > > So? > > > > > data Foo = Foo > > > data Bar = Bar > > > > Ooo?this looks like an OO design pattern?surely wrong? > > > > > class Wibble a where > > > visit :: (Foo -> b) -> (Bar -> b) -> a -> b > > > > > instance Wibble Foo where > > > visit f _ x = f x > > > instance Wibble Bar where > > > visit _ f x = f x > > > > I want a list of Wibbles.... > > hmmm... > > (Wibble a) => [a] is clearly wrong... > > I want [(Wibble a) =>a] > > > > so I package it up? > > > > > data WibblePackage where > > > WibblePackage :: (Wibble a) => a -> WibblePackage > > > > lets try this now?so pointless function across Wibbles in a list. > > > > > fizzBuzz :: [WibblePackage] -> Integer > > > fizzBuzz [] = 0 > > > fizzBuzz ((WibblePackage x) : xs) = (visit (\_ -> 1) (\_ -> 2) x) + > (fizzBuzz xs) > > > > > help :: Integer > > > help = fizzBuzz [WibblePackage Foo,WibblePackage Bar] > > > > > > That works! > > > > OO nerds will get uptight about ?closing? the Wibble typeclass?.but I?ve > managed to create a list of different types and have a mechanism for > recovering the type. > > > > How would a Haskell nerd do this? (I have looked, but they look more > complicated?.maybe to my OO eye). > > > > > > > > CONFIDENTIALITY NOTICE > > This e-mail (and any attached files) is confidential and protected by > copyright (and other intellectual property rights). If you are not the > intended recipient please e-mail the sender and then delete the email and > any attached files immediately. Any further use or dissemination is > prohibited. > > While MTV Networks Europe has taken steps to ensure that this email and > any attachments are virus free, it is your responsibility to ensure that > this message and any attachments are virus free and do not affect your > systems / data. > > Communicating by email is not 100% secure and carries risks such as delay, > data corruption, non-delivery, wrongful interception and unauthorised > amendment. If you communicate with us by e-mail, you acknowledge and assume > these risks, and you agree to take appropriate measures to minimise these > risks when e-mailing us. > > MTV Networks International, MTV Networks UK & Ireland, Greenhouse, > Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions > International, Be Viacom, Viacom International Media Networks and VIMN and > Comedy Central are all trading names of MTV Networks Europe. MTV Networks > Europe is a partnership between MTV Networks Europe Inc. and Viacom > Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley > Crescent, London, NW1 8TT. > > > > -- > Sent from my hyper-communicator > > > > CONFIDENTIALITY NOTICE > > This e-mail (and any attached files) is confidential and protected by > copyright (and other intellectual property rights). If you are not the > intended recipient please e-mail the sender and then delete the email and > any attached files immediately. Any further use or dissemination is > prohibited. > > While MTV Networks Europe has taken steps to ensure that this email and > any attachments are virus free, it is your responsibility to ensure that > this message and any attachments are virus free and do not affect your > systems / data. > > Communicating by email is not 100% secure and carries risks such as delay, > data corruption, non-delivery, wrongful interception and unauthorised > amendment. If you communicate with us by e-mail, you acknowledge and assume > these risks, and you agree to take appropriate measures to minimise these > risks when e-mailing us. > > MTV Networks International, MTV Networks UK & Ireland, Greenhouse, > Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions > International, Be Viacom, Viacom International Media Networks and VIMN and > Comedy Central are all trading names of MTV Networks Europe. MTV Networks > Europe is a partnership between MTV Networks Europe Inc. and Viacom > Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley > Crescent, London, NW1 8TT. > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cma at bitemyapp.com Fri Jun 19 16:11:37 2015 From: cma at bitemyapp.com (Christopher Allen) Date: Fri, 19 Jun 2015 11:11:37 -0500 Subject: [Haskell-cafe] Do people use visitor pattern in Haskell... In-Reply-To: References: Message-ID: This is a pattern people usually refer to as the "existential typeclass antipattern". An article goes into more depth here: https://lukepalmer.wordpress.com/2010/01/24/haskell-antipattern-existential-typeclass/ Sometimes you need a GADT with an existential type and a typeclass, but it doesn't occur as often as the equivalent does in OO. On Fri, Jun 19, 2015 at 10:48 AM, Nicholls, Mark wrote: > My initial guess would be no?its built into the language > > > > But?. > > > > I find myself tempted to use it (in order to match on a type that?s the > instance of a typeclass)?which makes me think I?ve missed something. > > > > So? > > > > > data Foo = Foo > > > data Bar = Bar > > > > Ooo?this looks like an OO design pattern?surely wrong? > > > > > class Wibble a where > > > visit :: (Foo -> b) -> (Bar -> b) -> a -> b > > > > > instance Wibble Foo where > > > visit f _ x = f x > > > instance Wibble Bar where > > > visit _ f x = f x > > > > I want a list of Wibbles.... > > hmmm... > > (Wibble a) => [a] is clearly wrong... > > I want [(Wibble a) =>a] > > > > so I package it up? > > > > > data WibblePackage where > > > WibblePackage :: (Wibble a) => a -> WibblePackage > > > > lets try this now?so pointless function across Wibbles in a list. > > > > > fizzBuzz :: [WibblePackage] -> Integer > > > fizzBuzz [] = 0 > > > fizzBuzz ((WibblePackage x) : xs) = (visit (\_ -> 1) (\_ -> 2) x) + > (fizzBuzz xs) > > > > > help :: Integer > > > help = fizzBuzz [WibblePackage Foo,WibblePackage Bar] > > > > > > That works! > > > > OO nerds will get uptight about ?closing? the Wibble typeclass?.but I?ve > managed to create a list of different types and have a mechanism for > recovering the type. > > > > How would a Haskell nerd do this? (I have looked, but they look more > complicated?.maybe to my OO eye). > > > > > > > > CONFIDENTIALITY NOTICE > > This e-mail (and any attached files) is confidential and protected by > copyright (and other intellectual property rights). If you are not the > intended recipient please e-mail the sender and then delete the email and > any attached files immediately. Any further use or dissemination is > prohibited. > > While MTV Networks Europe has taken steps to ensure that this email and > any attachments are virus free, it is your responsibility to ensure that > this message and any attachments are virus free and do not affect your > systems / data. > > Communicating by email is not 100% secure and carries risks such as delay, > data corruption, non-delivery, wrongful interception and unauthorised > amendment. If you communicate with us by e-mail, you acknowledge and assume > these risks, and you agree to take appropriate measures to minimise these > risks when e-mailing us. > > MTV Networks International, MTV Networks UK & Ireland, Greenhouse, > Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions > International, Be Viacom, Viacom International Media Networks and VIMN and > Comedy Central are all trading names of MTV Networks Europe. MTV Networks > Europe is a partnership between MTV Networks Europe Inc. and Viacom > Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley > Crescent, London, NW1 8TT. > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -- Chris Allen Currently working on http://haskellbook.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From cma at bitemyapp.com Fri Jun 19 16:12:14 2015 From: cma at bitemyapp.com (Christopher Allen) Date: Fri, 19 Jun 2015 11:12:14 -0500 Subject: [Haskell-cafe] Do people use visitor pattern in Haskell... In-Reply-To: References: Message-ID: Sorry for adding to the dogpile, should've guessed others would point to the same resource :) On Fri, Jun 19, 2015 at 11:11 AM, Christopher Allen wrote: > This is a pattern people usually refer to as the "existential typeclass > antipattern". > > An article goes into more depth here: > https://lukepalmer.wordpress.com/2010/01/24/haskell-antipattern-existential-typeclass/ > > Sometimes you need a GADT with an existential type and a typeclass, but it > doesn't occur as often as the equivalent does in OO. > > On Fri, Jun 19, 2015 at 10:48 AM, Nicholls, Mark > wrote: > >> My initial guess would be no?its built into the language >> >> >> >> But?. >> >> >> >> I find myself tempted to use it (in order to match on a type that?s the >> instance of a typeclass)?which makes me think I?ve missed something. >> >> >> >> So? >> >> >> >> > data Foo = Foo >> >> > data Bar = Bar >> >> >> >> Ooo?this looks like an OO design pattern?surely wrong? >> >> >> >> > class Wibble a where >> >> > visit :: (Foo -> b) -> (Bar -> b) -> a -> b >> >> >> >> > instance Wibble Foo where >> >> > visit f _ x = f x >> >> > instance Wibble Bar where >> >> > visit _ f x = f x >> >> >> >> I want a list of Wibbles.... >> >> hmmm... >> >> (Wibble a) => [a] is clearly wrong... >> >> I want [(Wibble a) =>a] >> >> >> >> so I package it up? >> >> >> >> > data WibblePackage where >> >> > WibblePackage :: (Wibble a) => a -> WibblePackage >> >> >> >> lets try this now?so pointless function across Wibbles in a list. >> >> >> >> > fizzBuzz :: [WibblePackage] -> Integer >> >> > fizzBuzz [] = 0 >> >> > fizzBuzz ((WibblePackage x) : xs) = (visit (\_ -> 1) (\_ -> 2) x) + >> (fizzBuzz xs) >> >> >> >> > help :: Integer >> >> > help = fizzBuzz [WibblePackage Foo,WibblePackage Bar] >> >> >> >> >> >> That works! >> >> >> >> OO nerds will get uptight about ?closing? the Wibble typeclass?.but I?ve >> managed to create a list of different types and have a mechanism for >> recovering the type. >> >> >> >> How would a Haskell nerd do this? (I have looked, but they look more >> complicated?.maybe to my OO eye). >> >> >> >> >> >> >> >> CONFIDENTIALITY NOTICE >> >> This e-mail (and any attached files) is confidential and protected by >> copyright (and other intellectual property rights). If you are not the >> intended recipient please e-mail the sender and then delete the email and >> any attached files immediately. Any further use or dissemination is >> prohibited. >> >> While MTV Networks Europe has taken steps to ensure that this email and >> any attachments are virus free, it is your responsibility to ensure that >> this message and any attachments are virus free and do not affect your >> systems / data. >> >> Communicating by email is not 100% secure and carries risks such as >> delay, data corruption, non-delivery, wrongful interception and >> unauthorised amendment. If you communicate with us by e-mail, you >> acknowledge and assume these risks, and you agree to take appropriate >> measures to minimise these risks when e-mailing us. >> >> MTV Networks International, MTV Networks UK & Ireland, Greenhouse, >> Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions >> International, Be Viacom, Viacom International Media Networks and VIMN and >> Comedy Central are all trading names of MTV Networks Europe. MTV Networks >> Europe is a partnership between MTV Networks Europe Inc. and Viacom >> Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley >> Crescent, London, NW1 8TT. >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> >> > > > -- > Chris Allen > Currently working on http://haskellbook.com > -- Chris Allen Currently working on http://haskellbook.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex.solla at gmail.com Fri Jun 19 16:46:01 2015 From: alex.solla at gmail.com (Alexander Solla) Date: Fri, 19 Jun 2015 09:46:01 -0700 Subject: [Haskell-cafe] Do people use visitor pattern in Haskell... In-Reply-To: References: Message-ID: > If all you can do with WibblePackage is recover either a Foo or a Bar, why not just use Either Foo Bar? Typically, I just go straight for "data types a la carte" when I need any kind of type-level disjunction. Define the type synonym: type (:+:) a b = Either a b and define a type class class (:<:) a b where inj :: a -> b with some appropriate instances (as specified in the paper)[1], and you can chain disjunctions almost automatically: data Commercial = Commercial data Retail = Retail data Investment = Investment type Bank = Retail :+: Commercial :+: Investment bac :: Bank bac = inj $ Retail [1]: http://www.cs.ru.nl/~W.Swierstra/Publications/DataTypesALaCarte.pdf On Fri, Jun 19, 2015 at 9:10 AM, Patrick Chilton wrote: > This is a frequent antipattern: > https://lukepalmer.wordpress.com/2010/01/24/haskell-antipattern-existential-typeclass/ > > If all you can do with WibblePackage is recover either a Foo or a Bar, why > not just use Either Foo Bar? > > On Fri, Jun 19, 2015 at 5:09 PM, Nicholls, Mark > wrote: > >> The design pattern is very well known in the OO community?most of the >> use cases evaporate in Haskell?.in some sense its part of the language? >> >> >> >> Haskell is my 9th or 10th language, I can barely write ?hello world? >> without the manual, so I?m still at times I?m still trying to discover the >> basic idioms? >> >> >> >> How to put heterogenuos things in a list?and yet not loose all type >> information (I know about HList?but I think that?s for special occasions) >> >> >> >> >> >> *From:* Haskell-Cafe [mailto:haskell-cafe-bounces at haskell.org] *On >> Behalf Of *Anupam Jain >> *Sent:* 19 June 2015 5:04 PM >> *To:* haskell-cafe Cafe >> *Subject:* Re: [Haskell-cafe] Do people use visitor pattern in Haskell... >> >> >> >> I discovered the same general pattern foroop >> >> On Friday, June 19, 2015, Nicholls, Mark wrote: >> >> My initial guess would be no?its built into the language >> >> >> >> But?. >> >> >> >> I find myself tempted to use it (in order to match on a type that?s the >> instance of a typeclass)?which makes me think I?ve missed something. >> >> >> >> So? >> >> >> >> > data Foo = Foo >> >> > data Bar = Bar >> >> >> >> Ooo?this looks like an OO design pattern?surely wrong? >> >> >> >> > class Wibble a where >> >> > visit :: (Foo -> b) -> (Bar -> b) -> a -> b >> >> >> >> > instance Wibble Foo where >> >> > visit f _ x = f x >> >> > instance Wibble Bar where >> >> > visit _ f x = f x >> >> >> >> I want a list of Wibbles.... >> >> hmmm... >> >> (Wibble a) => [a] is clearly wrong... >> >> I want [(Wibble a) =>a] >> >> >> >> so I package it up? >> >> >> >> > data WibblePackage where >> >> > WibblePackage :: (Wibble a) => a -> WibblePackage >> >> >> >> lets try this now?so pointless function across Wibbles in a list. >> >> >> >> > fizzBuzz :: [WibblePackage] -> Integer >> >> > fizzBuzz [] = 0 >> >> > fizzBuzz ((WibblePackage x) : xs) = (visit (\_ -> 1) (\_ -> 2) x) + >> (fizzBuzz xs) >> >> >> >> > help :: Integer >> >> > help = fizzBuzz [WibblePackage Foo,WibblePackage Bar] >> >> >> >> >> >> That works! >> >> >> >> OO nerds will get uptight about ?closing? the Wibble typeclass?.but I?ve >> managed to create a list of different types and have a mechanism for >> recovering the type. >> >> >> >> How would a Haskell nerd do this? (I have looked, but they look more >> complicated?.maybe to my OO eye). >> >> >> >> >> >> >> >> CONFIDENTIALITY NOTICE >> >> This e-mail (and any attached files) is confidential and protected by >> copyright (and other intellectual property rights). If you are not the >> intended recipient please e-mail the sender and then delete the email and >> any attached files immediately. Any further use or dissemination is >> prohibited. >> >> While MTV Networks Europe has taken steps to ensure that this email and >> any attachments are virus free, it is your responsibility to ensure that >> this message and any attachments are virus free and do not affect your >> systems / data. >> >> Communicating by email is not 100% secure and carries risks such as >> delay, data corruption, non-delivery, wrongful interception and >> unauthorised amendment. If you communicate with us by e-mail, you >> acknowledge and assume these risks, and you agree to take appropriate >> measures to minimise these risks when e-mailing us. >> >> MTV Networks International, MTV Networks UK & Ireland, Greenhouse, >> Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions >> International, Be Viacom, Viacom International Media Networks and VIMN and >> Comedy Central are all trading names of MTV Networks Europe. MTV Networks >> Europe is a partnership between MTV Networks Europe Inc. and Viacom >> Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley >> Crescent, London, NW1 8TT. >> >> >> >> -- >> Sent from my hyper-communicator >> >> >> >> CONFIDENTIALITY NOTICE >> >> This e-mail (and any attached files) is confidential and protected by >> copyright (and other intellectual property rights). If you are not the >> intended recipient please e-mail the sender and then delete the email and >> any attached files immediately. Any further use or dissemination is >> prohibited. >> >> While MTV Networks Europe has taken steps to ensure that this email and >> any attachments are virus free, it is your responsibility to ensure that >> this message and any attachments are virus free and do not affect your >> systems / data. >> >> Communicating by email is not 100% secure and carries risks such as >> delay, data corruption, non-delivery, wrongful interception and >> unauthorised amendment. If you communicate with us by e-mail, you >> acknowledge and assume these risks, and you agree to take appropriate >> measures to minimise these risks when e-mailing us. >> >> MTV Networks International, MTV Networks UK & Ireland, Greenhouse, >> Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions >> International, Be Viacom, Viacom International Media Networks and VIMN and >> Comedy Central are all trading names of MTV Networks Europe. MTV Networks >> Europe is a partnership between MTV Networks Europe Inc. and Viacom >> Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley >> Crescent, London, NW1 8TT. >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> >> > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eir at cis.upenn.edu Fri Jun 19 18:28:47 2015 From: eir at cis.upenn.edu (Richard Eisenberg) Date: Fri, 19 Jun 2015 14:28:47 -0400 Subject: [Haskell-cafe] Mild confusion around type family In-Reply-To: References: <558416E4.8020901@well-typed.com> Message-ID: <3A3A7E3D-A26F-4779-B7C9-1A8284CFF4FF@cis.upenn.edu> On Jun 19, 2015, at 10:14 AM, "Nicholls, Mark" wrote: >> type family Sub a b where >> -- a - 0 == a >> Sub a Z = a >> -- (a + 1) - (b + 1) == a - b >> Sub (S a) (S b) = Sub a b With a closed family, you could always do something like this: > type family Error (msg :: Symbol) -- no instances! > type family Sub a b where > -- real work > Sub a b = Error "Sub is undefined here" Would that help? It still doesn't immediately error (there's no way to do that currently), but it's perhaps more telling to have an error string. Richard From rf at rufflewind.com Fri Jun 19 18:36:26 2015 From: rf at rufflewind.com (Phil Ruffwind) Date: Fri, 19 Jun 2015 14:36:26 -0400 Subject: [Haskell-cafe] Do people use visitor pattern in Haskell... In-Reply-To: References: Message-ID: > class Wibble a where > > visit :: (Foo -> b) -> (Bar -> b) -> a -> b The type `forall b. (X -> b) -> (Y -> b) -> b` is isomorphic to `Either X Y`. If you rearrange the signature of `visit` a little bit, visit_ :: a -> forall b . (Foo -> b) -> (Bar -> b) -> b you can see that you're really just defining a function `a -> Either Foo Bar`. So the class can be simplified to: class Wibble' a where visit' :: a -> Either Foo Bar It follows that `WibblePackage'` is equivalent to type WibblePackage' = forall a . (WibbleInstance a, a) where type WibbleInstance a = a -> Either Foo Bar Because of the `forall`, there's nothing you can do with the second component of the tuple (`a`) except to apply it to the first (`a -> Either Foo Bar`), so it's just a long-winded way of saying type WibblePackage'' = Either Foo Bar In a non-strict language like Haskell, there's no reason to use such a complicated type signature to delay the application of `a -> Either Foo Bar` to `a`. From leza.ml at fecrd.cujae.edu.cu Fri Jun 19 20:13:09 2015 From: leza.ml at fecrd.cujae.edu.cu (Leza Morais Lutonda) Date: Fri, 19 Jun 2015 16:13:09 -0400 Subject: [Haskell-cafe] "SameConstraints?" type constraints In-Reply-To: References: <5583A5C2.8070606@fecrd.cujae.edu.cu> <25A7119A-F9F8-483C-8FD9-0C85909E4BD2@yandex.ru> <5583B7AF.7080703@fecrd.cujae.edu.cu> <7D13873D-60B5-4FFB-A002-19E52A43DE1B@yandex.ru> <55840661.1080100@fecrd.cujae.edu.cu> Message-ID: <558477D5.7070809@fecrd.cujae.edu.cu> On 06/19/2015 08:44 AM, Sean Leather wrote: > Note this won't work for a Num instance mentioned earlier because the > existentially quantified d types in two SC values are not provably the > same type. In other words, you can't write > > instance Num e => Show (S Num e) where > SC x1 y1 + SC x2 y2 = SC (x1 + x2) (y1 + y2) > > because x1 and x2 can have different types. Another issue is: what if I want to constraint the type `e` to more classes and make `d` to have the same constrains? I have to re-declare the `S` data type like?: data S c1 c2 ... cN e where SC :: (c1 d, c2 d, ..., cN d) -> d -> e -> S c1 c2 ... cN e Does anyone ever needed such a feature? -- Leza Morais Lutonda, Lemol-C http://lemol.github.io 50 Aniversario de la Cujae. Inaugurada por Fidel el 2 de diciembre de 1964 http://cujae.edu.cu -------------- next part -------------- An HTML attachment was scrubbed... URL: From brucker at spamfence.net Fri Jun 19 20:57:36 2015 From: brucker at spamfence.net (Achim D. Brucker) Date: Fri, 19 Jun 2015 22:57:36 +0200 Subject: [Haskell-cafe] OCL 2015: Second Call for Papers - Only Four Weeks Left Message-ID: <20150619205736.GA13487@fujikawa.home.brucker.ch> (Apologies for duplicates) CALL FOR PAPERS 15th International Workshop on OCL and Textual Modeling Tools and Textual Model Transformations Co-located with ACM/IEEE 18th International Conference on Model Driven Engineering Languages and Systems (MODELS 2015) September 28th, 2015, Ottawa, Canada http://ocl2015.lri.fr Modeling started out with UML and its precursors as a graphical notation. Such visual representations enable direct intuitive capturing of reality, but some of their features are difficult to formalize and lack the level of precision required to create complete and unambiguous specifications. Limitations of the graphical notations encouraged the development of text-based modeling languages that either integrate with or replace graphical notations for modeling. Typical examples of such languages are OCL, textual MOF, Epsilon, and Alloy. Textual modeling languages have their roots in formal language paradigms like logic, programming and databases. The goal of this workshop is to create a forum where researchers and practitioners interested in building models using OCL or other kinds of textual languages can directly interact, report advances, share results, identify tools for language development, and discuss appropriate standards. In particular, the workshop will encourage discussions for achieving synergy from different modeling language concepts and modeling language use. The close interaction will enable researchers and practitioners to identify common interests and options for potential cooperation. Topics of interest include (but are not limited to) =================================================== - Mappings between textual modeling languages and other languages/formalisms - Algorithms, evaluation strategies and optimizations in the context of textual modeling languages for -- validation, verification, and testing, -- model transformation and code generation, -- meta-modeling and DSLs, and -- query and constraint specifications - Alternative graphical/textual notations for textual modeling languages - Evolution, transformation and simplification of textual modeling expressions - Libraries, templates and patterns for textual modeling languages - Tools that support textual modeling languages (e.g., verification of OCL formulae, runtime monitoring of invariants) - Complexity results for textual modeling languages - Quality models and benchmarks for comparing and evaluating textual modeling tools and algorithms - Successful applications of textual modeling languages - Case studies on industrial applications of textual modeling languages - Experience reports -- usage of textual modeling languages and tools in complex domains, -- usability of textual modeling languages and tools for end-users - Empirical studies about the benefits and drawbacks of textual modeling languages - Innovative textual modeling tools - Comparison, evaluation and integration of modeling languages - Correlation between modeling languages and modeling tasks This year, we particularly encourage submissions describing tools that support - in a very broad sense - textual modeling languages (if you have implemented OCL.js to run OCL in a web browser, this is the right workshop to present your work) as well as textual model transformations. Venue ===== The workshop will be organized as a part of MODELS 2015 Conference in Ottawa, Canada. It continues the series of OCL workshops held at UML/MODELS conferences: York (2000), Toronto (2001), San Francisco (2003), Lisbon (2004), Montego Bay (2005), Genova (2006), Nashville (2007), Toulouse (2008), Denver (2009), Oslo (2010), Zurich (2011, at the TOOLs conference), 2012 in Innsbruck, 2013 in Miami, and 2014 in Valencia, Spain. Similar to its predecessors, the workshop addresses both people from academia and industry. The aim is to provide a forum for addressing integration of OCL and other textual modeling languages, as well as tools for textual modeling, and for disseminating good practice and discussing the new requirements for textual modeling. Workshop Format =============== The workshop will include short (about 15 min) presentations, parallel sessions of working groups, and sum-up discussions. Submissions =========== Three types of papers will be considered: * short papers (between 6 and 8 pages) describing ideas, * tool papers (between 6 and 8 pages), and * full papers (between 12 and 16 pages) in LNCS format. Submissions should be uploaded to EasyChair (https://easychair.org/conferences/?conf=ocl20150). The program committee will review the submissions (minimum 2 reviews per paper, usually 3 reviews) and select papers according to their relevance and interest for discussions that will take place at the workshop. Accepted papers will be published online in a pre-conference edition of CEUR (http://www.ceur-ws.org). Important Dates =============== Submission of papers: July 17, 2015 Notification: August 21, 2015 Workshop date: September 28, 2015 Organizers ========== Achim D. Brucker, SAP SE, Germany Marina Egea, Indra Sistemas S.A., Spain Martin Gogolla, University of Bremen, Germany Frederic Tuong, Univ. Paris-Sud - IRT SystemX - LRI, France Programme Committee =================== Mira Balaban, Ben-Gurion University of the Negev, Israel Tricia Balfe, Nomos Software, Ireland Achim D. Brucker, SAP SE, Germany Fabian Buettner, Inria - Ecole des Mines de Nantes, France Jordi Cabot, Inria - Ecole des Mines de Nantes, France Dan Chiorean, Babes-Bolyai University, Romania Robert Clariso, Universitat Oberta de Catalunya, Spain Tony Clark, Middlesex University, UK Manuel Clavel, IMDEA Software Institute, Spain Carolina Dania, IMDEA Software Institute, Spain Birgit Demuth, Technische Universitat Dresden, Germany Marina Egea, Indra Sistemas S.A., Spain Geri Georg, Colorado State University, USA Martin Gogolla, University of Bremen, Germany Shahar Maoz, Tel Aviv University, Israel Istvan Rath, Budapest University of Technology and Economics, Hungary Bernhard Rumpe, RWTH Aachen, Germany Frederic Tuong, Univ. Paris-Sud - IRT SystemX - LRI, France Claas Wilke, Technische Universitat Dresden, Germany Edward Willink, Willink Transformations Ltd., UK Burkhart Wolff, Univ. Paris-Sud - LRI, France Steffen Zschaler, King's College, UK -- Dr. Achim D. Brucker, SAP SE, Vincenz-Priessnitz-Str. 1, D-76131 Karlsruhe Phone: +49 6227 7-52595, http://www.brucker.ch/ From arnaudpourseb at gmail.com Sat Jun 20 00:48:26 2015 From: arnaudpourseb at gmail.com (Sebastian) Date: Fri, 19 Jun 2015 20:48:26 -0400 Subject: [Haskell-cafe] [ANN] wai-middleware-metrics package Message-ID: Hello everyone, I'm announcing the release of the wai-middleware-metrics package. http://hackage.haskell.org/package/wai-middleware-metrics https://github.com/Helkafen/wai-middleware-metrics Full example here with scotty: https://hackage.haskell.org/package/wai-middleware-metrics-0.2.1/docs/Network-Wai-Metrics.html It registers some ekg metrics in WAI web servers (scotty, servant, yesod...) using a middleware. Right now the metrics are: - wai.request_count - wai.server_error_count - wai.latency_distribution Time distributions will benefit from future developments in ekg and become more descriptive. Other metrics could be added. Ideas, contributions and comments are welcome! Cheers -- Sebastian de Bellefon -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at nh2.me Sat Jun 20 02:00:40 2015 From: mail at nh2.me (=?UTF-8?B?TmlrbGFzIEhhbWLDvGNoZW4=?=) Date: Sat, 20 Jun 2015 04:00:40 +0200 Subject: [Haskell-cafe] Question about terminateProcess Message-ID: <5584C948.1090707@nh2.me> Hi, http://hackage.haskell.org/package/process-1.2.0.0/docs/System-Process.html#v:terminateProcess says: " Note: on Windows, if the process was a shell command created by createProcess with shell, or created by runCommand or runInteractiveCommand, then terminateProcess will only terminate the shell, not the command itself. On Unix systems, both processes are in a process group and will be terminated together. " I don't see that happening, at least not in ghci. When I do import System.Process (_,_,_,p) <- createProcess $ (shell "sleep 10") -- wait a second or so terminateProcess p in ghci, then in `ps aux | grep "sleep 10"`, the sleep is still running; same when I'm using `(shell "sleep 10"){ create_group = True }` (`shell` defaults to `create_group = False`). What am I missing? From allbery.b at gmail.com Sat Jun 20 02:17:01 2015 From: allbery.b at gmail.com (Brandon Allbery) Date: Fri, 19 Jun 2015 22:17:01 -0400 Subject: [Haskell-cafe] Question about terminateProcess In-Reply-To: <5584C948.1090707@nh2.me> References: <5584C948.1090707@nh2.me> Message-ID: On Fri, Jun 19, 2015 at 10:00 PM, Niklas Hamb?chen wrote: > Note: on Windows, if the process was a shell command created by > createProcess with shell, or created by runCommand or > runInteractiveCommand, then terminateProcess will only terminate the > shell, not the command itself. On Unix systems, both processes are in a > process group and will be terminated together. > Last I checked, that was just wrong on Unix; it kills only the shell. This is probably because someone did not consider that most modern shells support job control, and therefore start commands in their own independent process groups. (Or assumed that this does not happen with "sh -c"; I would have to test specific shells --- and versions! various bash versions can behave quite differently and often have bugs lurking in the dark corners --- to see if this applies.) -- brandon s allbery kf8nh sine nomine associates allbery.b at gmail.com ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From allbery.b at gmail.com Sat Jun 20 02:24:43 2015 From: allbery.b at gmail.com (Brandon Allbery) Date: Fri, 19 Jun 2015 22:24:43 -0400 Subject: [Haskell-cafe] Question about terminateProcess In-Reply-To: References: <5584C948.1090707@nh2.me> Message-ID: On Fri, Jun 19, 2015 at 10:17 PM, Brandon Allbery wrote: > I would have to test specific shells --- and versions! various bash > versions can behave quite differently and often have bugs lurking in the > dark corners --- to see if this applies. FWIW dash as shipped on Mint 17 and bash 4.3.11(1) do not create a new pgrp with sh -c, at least by default. I think you can turn job control on even in noninteractive bash if you try hard enough, though. bash -c 'echo shell=$$; perl -le "print qq{perl=\$\$}; print qq{pgrp=}, getpgrp(0)"' Replace "bash" with "sh" or other specific shell you want to test; if the "pgrp" is the same as the "perl" then the shell is doing job control, if it's the same as "shell" then it is not and (at least in theory) create_group + terminateProcess should work. -- brandon s allbery kf8nh sine nomine associates allbery.b at gmail.com ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From eir at cis.upenn.edu Sat Jun 20 02:34:24 2015 From: eir at cis.upenn.edu (Richard Eisenberg) Date: Fri, 19 Jun 2015 22:34:24 -0400 Subject: [Haskell-cafe] "SameConstraints?" type constraints In-Reply-To: <558477D5.7070809@fecrd.cujae.edu.cu> References: <5583A5C2.8070606@fecrd.cujae.edu.cu> <25A7119A-F9F8-483C-8FD9-0C85909E4BD2@yandex.ru> <5583B7AF.7080703@fecrd.cujae.edu.cu> <7D13873D-60B5-4FFB-A002-19E52A43DE1B@yandex.ru> <55840661.1080100@fecrd.cujae.edu.cu> <558477D5.7070809@fecrd.cujae.edu.cu> Message-ID: <26D48FB8-9E90-415D-A17B-5BC9F45F66F4@cis.upenn.edu> How about this: > class (a x, b x) => (a `And` b) x > instance (a x, b x) => (a `And` b) x > infixr 3 `And` > > data S c e where > SC :: c d => d -> e -> S c e > > foo :: S (Show `And` Read `And` Num) Int > foo = SC (5.0 :: Double) (6 :: Int) Richard On Jun 19, 2015, at 4:13 PM, Leza Morais Lutonda wrote: > On 06/19/2015 08:44 AM, Sean Leather wrote: >> Note this won't work for a Num instance mentioned earlier because the existentially quantified d types in two SC values are not provably the same type. In other words, you can't write >> >> instance Num e => Show (S Num e) where >> SC x1 y1 + SC x2 y2 = SC (x1 + x2) (y1 + y2) >> >> because x1 and x2 can have different types. > Another issue is: what if I want to constraint the type `e` to more classes and make `d` to have the same constrains? I have to re-declare the `S` data type like?: > > data S c1 c2 ... cN e where > SC :: (c1 d, c2 d, ..., cN d) -> d -> e -> S c1 c2 ... cN e > > Does anyone ever needed such a feature? > -- > Leza Morais Lutonda, Lemol-C > http://lemol.github.io > 50 Aniversario de la Cujae. Inaugurada por Fidel el 2 de diciembre de 1964 http://cujae.edu.cu > > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe -------------- next part -------------- An HTML attachment was scrubbed... URL: From vigalchin at gmail.com Sat Jun 20 05:19:15 2015 From: vigalchin at gmail.com (Vasili I. Galchin) Date: Fri, 19 Jun 2015 22:19:15 -0700 Subject: [Haskell-cafe] Haskell and Spark(Hadoop) Message-ID: > Hello, > > There was a posting from a Polish guy(Wojcieh .,,,, been trying to > contact him) on implementing a library/wrapper for Spark. Does anybody know > the status? > > Vasili > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vogt.adam at gmail.com Sat Jun 20 15:34:58 2015 From: vogt.adam at gmail.com (adam vogt) Date: Sat, 20 Jun 2015 11:34:58 -0400 Subject: [Haskell-cafe] Mild confusion around type family In-Reply-To: <3A3A7E3D-A26F-4779-B7C9-1A8284CFF4FF@cis.upenn.edu> References: <558416E4.8020901@well-typed.com> <3A3A7E3D-A26F-4779-B7C9-1A8284CFF4FF@cis.upenn.edu> Message-ID: On Jun 19, 2015 2:29 PM, "Richard Eisenberg" wrote: > With a closed family, you could always do something like this: > > > type family Error (msg :: Symbol) -- no instances! > > type family Sub a b where > > -- real work > > Sub a b = Error "Sub is undefined here" > > Would that help? It still doesn't immediately error (there's no way to do that currently), but it's perhaps more telling to have an error string. Ghc does error out right away if you give it an infinite loop: type family Fail (x::k) (a :: *) where Fail x a = Fail x (Fail "don't raise the context stack please" a) -- defining f leads to compile failure, and the message includes the "msg" f :: Fail "msg" () f = undefined But it would be nice to have a less hacky solution, especially as this one gives error messages that suggest giving the type checker more resources. Regards, Adam -------------- next part -------------- An HTML attachment was scrubbed... URL: From sumit.sahrawat.apm13 at iitbhu.ac.in Sat Jun 20 17:25:32 2015 From: sumit.sahrawat.apm13 at iitbhu.ac.in (Sumit Sahrawat, Maths & Computing, IIT (BHU)) Date: Sat, 20 Jun 2015 22:55:32 +0530 Subject: [Haskell-cafe] [Haskell-beginners] Haskell -> JavaScript -> nodejs In-Reply-To: <558538DA.8030002@vlkk.cz> References: <558513E4.2070600@vlkk.cz> <558538DA.8030002@vlkk.cz> Message-ID: Better try on the cafe. cc-ing. On 20 June 2015 at 15:26, Martin Vlk wrote: > I made some progress - in order for Haskell modules to work with ghcjs > you need to use cabal with the --ghcjs flag to install them. > > Martin > > Martin Vlk: > > Hi, > > I can successfully compile a basic Hello World into JavaScript with > > ghcjs and run it with nodejs. > > But what I ultimately need to do is write a nodejs module in Haskell and > > compile down to JavaScript with ghcjs. I need to be able to require > > other nodejs modules as well. > > > > Could somebody point me in the right direction? E.g. what approach and > > libraries to use... > > > > I have tried a simple thing with jsaddle/lens, but when I try to compile > > with ghcjs it is not finding the imported modules, even though when > > compiling with ghc it does find them (they are installed using cabal). > > > > Many Thanks > > Martin > > > _______________________________________________ > Beginners mailing list > Beginners at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners > -- Regards Sumit Sahrawat -------------- next part -------------- An HTML attachment was scrubbed... URL: From miguel.a.santos.l at gmail.com Sat Jun 20 20:04:05 2015 From: miguel.a.santos.l at gmail.com (Miguel A. Santos) Date: Sat, 20 Jun 2015 16:04:05 -0400 Subject: [Haskell-cafe] shakespeare >= 2.0.2 fails to install in OS X 10.6.8, Haskell-platform 2014.2.0.0; cabal-install 1.22.4.0 In-Reply-To: References: Message-ID: Hi, sorry for the late reply. I got Yesod installed and running on my OSX 10.6.8! Before I comment how I did it, let me start again by thanking you all for that quick & generous help. I haven't had the time to try all those different suggestions you all provided although I'd like to do so and post the results here if time permits. It seems to me it could be worth to have a record of it as others may follow a different choice of these approaches when it comes to installing&using Haskell -although that's more of wild guess of mine than an educated one. I tried again the minimal disruptive approach, that is, keep my HP installation and try sandboxing yesod. The quickstart from the yesod site http://www.yesodweb.com/page/quickstart wouldn't work as I said at the beginning of this thread because the shakespeare package didn't get built. That's because those steps suggest installing yesod-bin globally and only afterwards start the sandbox. Reversing those steps does the work. More concretely, what I did was mkdir yesod cd yesod wget --no-check-certificate https://www.stackage.org/lts/cabal.config cabal update cabal install alex happy (actually I had these already installed) cabal sandbox init cabal install network (see below why) cabal install primitive-0.6 (idem) cabal install yesod-bin And at this point shakespeare built fine and yesod got installed. I went then further and did export PATH=./.cabal-sandbox/bin/:$PATH in order to get yesod running. yesod init --bare cabal install -j --enable-tests --max-backjumps=-1 --reorder-goal (probably not necessary; followed blindly init's suggestion) cabal install --run-tests yesod devel That lead to a minor configuring of FirstWebServer-0.0.0..., which triggered a recompile of a few libraries and a rebuild of the application and finally a working Welcome Yesod page at localhost:3000 Trying cabal install yesod-bin right after the sandbox init failed with file not found .cabal-sandbox/logs/network-2.6.2.0.log This required thus to install network. Still yesod-bin install failed again this time complaining about not finding file .cabal-sandbox/logs/primitive-0.6.log, which in turn required the install of primitive-0.6. After that yesod-bin installs without problems. I did do an additional step before the final cabal install yesod-bin, just out of despair of the time devoted to it. That step was a chmod +w .cabal-sandbox/ However, I don't think this is relevant at all. But just in case... Lastly, let me add another suggestion I got from Rahul Muttineni in a private email. As I believe in giving credit where credit is due, I'll paste his answer below for others -and me, in the future- to see. After all I haven't heard of the Nix package manager before. Again, thanks all!. Regards, MA On Fri, Jun 19, 2015 at 11:43 AM, R. Muttineni wrote Hello Miguel, I saw that you had trouble installing yesod on your Mac OS on the haskell-cafe mailing list. I receive the list in digest format, so it's rather cumbersome for me to respond to your thread as it has an extremely long length. For now, I'll respond to you personally. I suggest you try the Nix package manager. I'm currently running both yesod and pandoc on the most recent GHC (7.10.1) with no problems. You can find a tutorial here http://corajr.com/posts/2014/12/22/nix-osx-haskell/. It's very easy. Just write (or generate with cabal2nix) the default.nix file and use the nix command line tools and you're on your way. The packages are built from source so expect it take lots of time. Pandoc will take many hours, but yesod should finish in a couple. If this helped you, please repost this on the mailing list. Don't worry about quoting me, just provide the link for others to see. If you face any issues, feel free to ask me, or you can post it on the nixpkgs github repository and they'll help you out. If you are going to be developing a lot in Haskell, I suggest you invest time in getting to know Nix as it guaranteed to cure cabal hell. Stackage works too, but it doesn't offer you the flexibility of rebuilding the packages for profiling/debugging effortlessly as well as using different versions of the compiler for different packages like it does with Nix. Moreover, nixpkgs currently supports a majority of Hackage, so you don't have to worry about losing out. Best Regards, Rahul Muttineni -- Public key ID: E8FE60D7 Public key server: see, e.g., hkp://keys.gnupg.net On Fri, Jun 19, 2015 at 10:57 AM, Mark Lentczner wrote: > For the record: The problem doesn't occur on OS X 10.10. > > I haven't done the "binary search through OS X releases" dance to find > where the problem stops being a problem.. > ? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zemyla at gmail.com Sun Jun 21 00:49:43 2015 From: zemyla at gmail.com (Zemyla) Date: Sat, 20 Jun 2015 19:49:43 -0500 Subject: [Haskell-cafe] Symmetric Difference for Data.Set and Data.IntSet? Message-ID: Could this be implemented as a primitive? I know it can be made from union and difference, or doing toList on both of them, taking the symmetric difference, and using fromDistinctAscList on the result, but it'd probably be much faster if it could be done natively, like can be done with Data.Map.mergeWithKey. Alternatively, could we get a merge interface for Set and IntSet roughly matching Map and IntMap? -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruben.astud at gmail.com Sun Jun 21 05:15:49 2015 From: ruben.astud at gmail.com (Ruben Astudillo) Date: Sun, 21 Jun 2015 02:15:49 -0300 Subject: [Haskell-cafe] Symmetric Difference for Data.Set and Data.IntSet? In-Reply-To: References: Message-ID: <55864885.7010109@gmail.com> On 20/06/15 21:49, Zemyla wrote: > Alternatively, could we get a merge interface for Set and IntSet roughly > matching Map and IntMap? Could you expand on what you mean? I understand it as that having operations of (Int)Map for (Int)Set, why don't just use (Int)Map then? From mike at barrucadu.co.uk Sun Jun 21 05:55:52 2015 From: mike at barrucadu.co.uk (Michael Walker) Date: Sun, 21 Jun 2015 06:55:52 +0100 Subject: [Haskell-cafe] "Universal" constraints? Message-ID: <20150621055552.GA21313@arkham.barrucadu.barrucadu.uk0.bigv.io> Hi all, I was wondering about constraints in class declarations. Suppose we have something like this: class Monad m => Store m where type Var m :: * -> * new :: a -> m (Var m a) read :: Var m a -> m a write :: Var m a -> a -> m () Then some reasonable implementations would be IO and ST, using IORefs and STRefs, instance Store IO where type Var IO = IORef new = newIORef read = readIORef write = writeIORef instance Store (ST s) where type Var (ST s) = STRef s new = newSTRef read = readSTRef write = writeSTRef Now, both IORefs and STRefs have equality, which doesn't require equality of the contained type, instance Eq (IORef a) where ... instance Eq (STRef s a) where ... This corresponds to pointer equality and, because reading the values is a monadic action, is as good an Eq instance as we can get. Given this, it would be nice to be able to specify that all instances of our Store class have this property. Something like, class (Monad m, Eq (Var m a)) => Store m where ... But we can't write this! The `a` isn't in scope! What I really want to do is to be able to write class constraints like this, class (forall a. C (T a)) => D x where ... Or why not get really crazy: class (forall a. C a => D (T a)) => E x where ... Is there some extension or combination of extensions that would make this work without completely sacrificing type safety? FlexibleContexts allows it (the simpler form, at least) for function constraints, but not for class constraints. If not, has anyone thought about this sort of thing before? -- Michael Walker (http://www.barrucadu.co.uk) From ivan.miljenovic at gmail.com Sun Jun 21 06:09:25 2015 From: ivan.miljenovic at gmail.com (Ivan Lazar Miljenovic) Date: Sun, 21 Jun 2015 16:09:25 +1000 Subject: [Haskell-cafe] "Universal" constraints? In-Reply-To: <20150621055552.GA21313@arkham.barrucadu.barrucadu.uk0.bigv.io> References: <20150621055552.GA21313@arkham.barrucadu.barrucadu.uk0.bigv.io> Message-ID: On 21 June 2015 at 15:55, Michael Walker wrote: > Hi all, > > I was wondering about constraints in class declarations. Suppose we have > something like this: > > class Monad m => Store m where > type Var m :: * -> * > > new :: a -> m (Var m a) > read :: Var m a -> m a > write :: Var m a -> a -> m () > > [snip] > > ... it would be > nice to be able to specify that all instances of our Store class have this > property. Something like, > > class (Monad m, Eq (Var m a)) => Store m where ... > > But we can't write this! The `a` isn't in scope! What I really want to do is to > be able to write class constraints like this, Edward Kmett's constraints package has a Forall constraint that can be used for cases like this (but may require some fiddling when this constraint is used/required). -- Ivan Lazar Miljenovic Ivan.Miljenovic at gmail.com http://IvanMiljenovic.wordpress.com From nicholls.mark at vimn.com Sun Jun 21 09:29:28 2015 From: nicholls.mark at vimn.com (Nicholls, Mark) Date: Sun, 21 Jun 2015 09:29:28 +0000 Subject: [Haskell-cafe] Mild confusion around type family In-Reply-To: References: <558416E4.8020901@well-typed.com> <3A3A7E3D-A26F-4779-B7C9-1A8284CFF4FF@cis.upenn.edu>, Message-ID: Let me have a go with both of these Excuse the spelling, sent from a phone with itty bitty keys, it like trying to sow a button on a shirt with a sausage. On 20 Jun 2015, at 16:35, adam vogt > wrote: On Jun 19, 2015 2:29 PM, "Richard Eisenberg" > wrote: > With a closed family, you could always do something like this: > > > type family Error (msg :: Symbol) -- no instances! > > type family Sub a b where > > -- real work > > Sub a b = Error "Sub is undefined here" > > Would that help? It still doesn't immediately error (there's no way to do that currently), but it's perhaps more telling to have an error string. Ghc does error out right away if you give it an infinite loop: type family Fail (x::k) (a :: *) where Fail x a = Fail x (Fail "don't raise the context stack please" a) -- defining f leads to compile failure, and the message includes the "msg" f :: Fail "msg" () f = undefined But it would be nice to have a less hacky solution, especially as this one gives error messages that suggest giving the type checker more resources. Regards, Adam CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lambda.fairy at gmail.com Sun Jun 21 10:05:01 2015 From: lambda.fairy at gmail.com (Chris Wong) Date: Sun, 21 Jun 2015 22:05:01 +1200 Subject: [Haskell-cafe] "Universal" constraints? In-Reply-To: <20150621055552.GA21313@arkham.barrucadu.barrucadu.uk0.bigv.io> References: <20150621055552.GA21313@arkham.barrucadu.barrucadu.uk0.bigv.io> Message-ID: On Sun, Jun 21, 2015 at 5:55 PM, Michael Walker wrote: > Hi all, > > I was wondering about constraints in class declarations. Suppose we have > something like this: > > class Monad m => Store m where > type Var m :: * -> * > > new :: a -> m (Var m a) > read :: Var m a -> m a > write :: Var m a -> a -> m () > > Then some reasonable implementations would be IO and ST, using IORefs and > STRefs, > > instance Store IO where > type Var IO = IORef > > new = newIORef > read = readIORef > write = writeIORef > > instance Store (ST s) where > type Var (ST s) = STRef s > > new = newSTRef > read = readSTRef > write = writeSTRef > > Now, both IORefs and STRefs have equality, which doesn't require equality of the > contained type, > > instance Eq (IORef a) where ... > instance Eq (STRef s a) where ... > > This corresponds to pointer equality and, because reading the values is a > monadic action, is as good an Eq instance as we can get. Given this, it would be > nice to be able to specify that all instances of our Store class have this > property. Something like, > > class (Monad m, Eq (Var m a)) => Store m where ... > > But we can't write this! The `a` isn't in scope! What I really want to do is to > be able to write class constraints like this, > > class (forall a. C (T a)) => D x where ... > > Or why not get really crazy: > > class (forall a. C a => D (T a)) => E x where ... > > Is there some extension or combination of extensions that would make this work > without completely sacrificing type safety? FlexibleContexts allows it (the > simpler form, at least) for function constraints, but not for class constraints. > > If not, has anyone thought about this sort of thing before? One solution is to add an equality operator to the class itself: class Monad m => Store m where type Var m :: * -> * eqVar :: Var m a -> Var m a -> Bool -- ... It may not be as satisfactory as subclassing Eq itself, but it should work in principle. Chris > -- > Michael Walker (http://www.barrucadu.co.uk) > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe -- https://lambda.xyz From itsuart at gmail.com Sun Jun 21 11:34:58 2015 From: itsuart at gmail.com (Ilya Seleznev) Date: Sun, 21 Jun 2015 17:34:58 +0600 Subject: [Haskell-cafe] Troubles with HStringTemplate (compilation/runtime errors) Message-ID: Hello Haskellers, I hope I chose proper mailing list, if not I apologize. And thanks for reading this! I run into a problem with HStringTemplate ( http://hackage.haskell.org/package/HStringTemplate) that I have never seen before. Code, similar to {-# LANGUAGE OverloadedStrings, DeriveDataTypeable, NoImplicitPrelude #-} module Main where import Data.Data import qualified Data.Text as T import qualified Text.StringTemplate as Template renderTextTemplate :: (Template.ToSElem a) => T.Text -> a -> IO T.Text renderTextTemplate name input = do templatesGroup <- Template.directoryGroup "templates" case Template.getStringTemplate (T.unpack name) templatesGroup of Nothing -> return $ "Internal Error: template '" `mappend` name `mappend` "' can not be rendered" Just template -> return $ Template.render (Template.setAttribute "it" input (template:: Template.StringTemplate T.Text)) data Foo = Foo {value:: T.Text} deriving (Data, Typeable) main :: IO () main = do content <- renderTextTemplate "test" $ Foo {value = "oh hi there!"} putStrLn content with a simple template like this: Just a test $it.value$! started to cause complaints from GHC (7.8.2 and 7.8.4 on Linux x86_64): No instance for (Template.ToSElem Foo) Problem is - it didn't do that before. What even more confusing, older project[0] uses same approach, compiles (same machine, same compiler) and works just fine! I've exhausted all means to fix the problem that I could think off: - Adding 'instance Template.ToSElem Foo' allows code to compile but it doesn't work and prints message in console like this: Main.hs:30:10-29: No instance nor default method for class operation Text.StringTemplate.Classes.toSElem - Tried to use same version of HStringTemplate deps (syb was different) - All kinds of desperate messing around (exporting records from modules, changing field names...) - Updated ghc from 7.8.2 to 7.8.4 - Googled error messages to no avail. I hope almighty All would give me some ideas/directions because I have none left. [0] Function: https://github.com/itsuart/fdc_archivist/blob/master/src/HttpUtils.hs#L59 Data: https://github.com/itsuart/fdc_archivist/blob/master/src/ViewModels/HomeViewModel.hs Usage: https://github.com/itsuart/fdc_archivist/blob/master/src/HomeViewFeature.hs#L59 -- With best regards, Ilya Seleznev -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholls.mark at vimn.com Sun Jun 21 12:06:42 2015 From: nicholls.mark at vimn.com (Nicholls, Mark) Date: Sun, 21 Jun 2015 12:06:42 +0000 Subject: [Haskell-cafe] Mild confusion around type family In-Reply-To: References: <558416E4.8020901@well-typed.com> <3A3A7E3D-A26F-4779-B7C9-1A8284CFF4FF@cis.upenn.edu>, Message-ID: ugly...but effective. thanks ________________________________ From: adam vogt [vogt.adam at gmail.com] Sent: 20 June 2015 16:34 To: Richard Eisenberg Cc: haskell-cafe; Nicholls, Mark Subject: Re: [Haskell-cafe] Mild confusion around type family On Jun 19, 2015 2:29 PM, "Richard Eisenberg" > wrote: > With a closed family, you could always do something like this: > > > type family Error (msg :: Symbol) -- no instances! > > type family Sub a b where > > -- real work > > Sub a b = Error "Sub is undefined here" > > Would that help? It still doesn't immediately error (there's no way to do that currently), but it's perhaps more telling to have an error string. Ghc does error out right away if you give it an infinite loop: type family Fail (x::k) (a :: *) where Fail x a = Fail x (Fail "don't raise the context stack please" a) -- defining f leads to compile failure, and the message includes the "msg" f :: Fail "msg" () f = undefined But it would be nice to have a less hacky solution, especially as this one gives error messages that suggest giving the type checker more resources. Regards, Adam CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. -------------- next part -------------- An HTML attachment was scrubbed... URL: From allbery.b at gmail.com Sun Jun 21 12:12:38 2015 From: allbery.b at gmail.com (Brandon Allbery) Date: Sun, 21 Jun 2015 08:12:38 -0400 Subject: [Haskell-cafe] Troubles with HStringTemplate (compilation/runtime errors) In-Reply-To: References: Message-ID: On Sun, Jun 21, 2015 at 7:34 AM, Ilya Seleznev wrote: > Problem is - it didn't do that before. What even more confusing, older > project[0] uses same approach, compiles (same machine, same compiler) and > works just fine! > I've exhausted all means to fix the problem that I could think off: > - Adding 'instance Template.ToSElem Foo' allows code to compile but it > doesn't work and prints message in console like this: > Main.hs:30:10-29: No instance nor default method for class operation > Text.StringTemplate.Classes.toSElem > This makes me think you have multiple versions of that package around and your new project has managed to use both, such that it finds an instance in the wrong version of the package which will not be considered compatible with the instance it is looking for. -- brandon s allbery kf8nh sine nomine associates allbery.b at gmail.com ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.clover at gmail.com Sun Jun 21 14:22:05 2015 From: s.clover at gmail.com (S. Clover) Date: Sun, 21 Jun 2015 10:22:05 -0400 Subject: [Haskell-cafe] Troubles with HStringTemplate (compilation/runtime errors) In-Reply-To: References: Message-ID: You probably also need to import Text.StringTemplate.GenericStandard to bring the instance for Data into scope. It was originally exported seperately to be compatible with either syb or syb-with-class. But syb-with-class is no longer supported because it did not come into widespread use. GenericStandard should probably be exported by default these days, especially since orphan instances are more frowned upon than when the package was written. -S On June 21, 2015 at 7:35:14 AM, Ilya Seleznev (itsuart at gmail.com) wrote: > Hello Haskellers, > > I hope I chose proper mailing list, if not I apologize. And thanks for > reading this! > > I run into a problem with HStringTemplate ( > http://hackage.haskell.org/package/HStringTemplate) that I have never seen > before. > Code, similar to > > {-# LANGUAGE OverloadedStrings, DeriveDataTypeable, NoImplicitPrelude #-} > module Main where > import Data.Data > import qualified Data.Text as T > import qualified Text.StringTemplate as Template > > renderTextTemplate :: (Template.ToSElem a) => T.Text -> a -> IO T.Text > renderTextTemplate name input = do > templatesGroup <- Template.directoryGroup "templates" > case Template.getStringTemplate (T.unpack name) templatesGroup of > Nothing -> return $ "Internal Error: template '" `mappend` name > `mappend` "' can not be rendered" > Just template -> return $ Template.render (Template.setAttribute "it" > input (template:: Template.StringTemplate T.Text)) > > data Foo = Foo {value:: T.Text} deriving (Data, Typeable) > > main :: IO () > main = do > content <- renderTextTemplate "test" $ Foo {value = "oh hi there!"} > putStrLn content > > with a simple template like this: > Just a test $it.value$! > > started to cause complaints from GHC (7.8.2 and 7.8.4 on Linux x86_64): > No instance for (Template.ToSElem Foo) > > Problem is - it didn't do that before. What even more confusing, older > project[0] uses same approach, compiles (same machine, same compiler) and > works just fine! > I've exhausted all means to fix the problem that I could think off: > - Adding 'instance Template.ToSElem Foo' allows code to compile but it > doesn't work and prints message in console like this: > Main.hs:30:10-29: No instance nor default method for class operation > Text.StringTemplate.Classes.toSElem > - Tried to use same version of HStringTemplate deps (syb was different) > - All kinds of desperate messing around (exporting records from modules, > changing field names...) > - Updated ghc from 7.8.2 to 7.8.4 > - Googled error messages > to no avail. > > I hope almighty All would give me some ideas/directions because I have none > left. > > [0] Function: > https://github.com/itsuart/fdc_archivist/blob/master/src/HttpUtils.hs#L59 > Data: > https://github.com/itsuart/fdc_archivist/blob/master/src/ViewModels/HomeViewModel.hs > Usage: > https://github.com/itsuart/fdc_archivist/blob/master/src/HomeViewFeature.hs#L59 > -- > With best regards, > Ilya Seleznev > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > From itsuart at gmail.com Sun Jun 21 15:21:00 2015 From: itsuart at gmail.com (Ilya Seleznev) Date: Sun, 21 Jun 2015 21:21:00 +0600 Subject: [Haskell-cafe] Troubles with HStringTemplate (compilation/runtime errors) In-Reply-To: References: Message-ID: Yes! Importing GenericStandard() solved the problem! Thank you very much! And big thanks for the HStringTemplate itself - awesome library! On Sun, Jun 21, 2015 at 8:22 PM, S. Clover wrote: > You probably also need to import Text.StringTemplate.GenericStandard to > bring the instance for Data into scope. It was originally exported > seperately to be compatible with either syb or syb-with-class. But > syb-with-class is no longer supported because it did not come into > widespread use. GenericStandard should probably be exported by default > these days, especially since orphan instances are more frowned upon than > when the package was written. > > -S > > > On June 21, 2015 at 7:35:14 AM, Ilya Seleznev (itsuart at gmail.com) wrote: > > Hello Haskellers, > > > > I hope I chose proper mailing list, if not I apologize. And thanks for > > reading this! > > > > I run into a problem with HStringTemplate ( > > http://hackage.haskell.org/package/HStringTemplate) that I have never > seen > > before. > > Code, similar to > > > > {-# LANGUAGE OverloadedStrings, DeriveDataTypeable, NoImplicitPrelude #-} > > module Main where > > import Data.Data > > import qualified Data.Text as T > > import qualified Text.StringTemplate as Template > > > > renderTextTemplate :: (Template.ToSElem a) => T.Text -> a -> IO T.Text > > renderTextTemplate name input = do > > templatesGroup <- Template.directoryGroup "templates" > > case Template.getStringTemplate (T.unpack name) templatesGroup of > > Nothing -> return $ "Internal Error: template '" `mappend` name > > `mappend` "' can not be rendered" > > Just template -> return $ Template.render (Template.setAttribute "it" > > input (template:: Template.StringTemplate T.Text)) > > > > data Foo = Foo {value:: T.Text} deriving (Data, Typeable) > > > > main :: IO () > > main = do > > content <- renderTextTemplate "test" $ Foo {value = "oh hi there!"} > > putStrLn content > > > > with a simple template like this: > > Just a test $it.value$! > > > > started to cause complaints from GHC (7.8.2 and 7.8.4 on Linux x86_64): > > No instance for (Template.ToSElem Foo) > > > > Problem is - it didn't do that before. What even more confusing, older > > project[0] uses same approach, compiles (same machine, same compiler) and > > works just fine! > > I've exhausted all means to fix the problem that I could think off: > > - Adding 'instance Template.ToSElem Foo' allows code to compile but it > > doesn't work and prints message in console like this: > > Main.hs:30:10-29: No instance nor default method for class operation > > Text.StringTemplate.Classes.toSElem > > - Tried to use same version of HStringTemplate deps (syb was different) > > - All kinds of desperate messing around (exporting records from modules, > > changing field names...) > > - Updated ghc from 7.8.2 to 7.8.4 > > - Googled error messages > > to no avail. > > > > I hope almighty All would give me some ideas/directions because I have > none > > left. > > > > [0] Function: > > > https://github.com/itsuart/fdc_archivist/blob/master/src/HttpUtils.hs#L59 > > Data: > > > https://github.com/itsuart/fdc_archivist/blob/master/src/ViewModels/HomeViewModel.hs > > Usage: > > > https://github.com/itsuart/fdc_archivist/blob/master/src/HomeViewFeature.hs#L59 > > -- > > With best regards, > > Ilya Seleznev > > _______________________________________________ > > Haskell-Cafe mailing list > > Haskell-Cafe at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > > > -- With best regards, Ilya Seleznev -------------- next part -------------- An HTML attachment was scrubbed... URL: From itsuart at gmail.com Sun Jun 21 15:28:09 2015 From: itsuart at gmail.com (Ilya Seleznev) Date: Sun, 21 Jun 2015 21:28:09 +0600 Subject: [Haskell-cafe] Troubles with HStringTemplate (compilation/runtime errors) In-Reply-To: References: Message-ID: Looks like my mistake was much more trivial: one of the numerious *ViewModels of old project did import instances from GenericStandard, that's why everything was working. And my crude attempts (with manual 'instance ...') were not adequate. On Sun, Jun 21, 2015 at 6:12 PM, Brandon Allbery wrote: > On Sun, Jun 21, 2015 at 7:34 AM, Ilya Seleznev wrote: > >> Problem is - it didn't do that before. What even more confusing, older >> project[0] uses same approach, compiles (same machine, same compiler) and >> works just fine! >> I've exhausted all means to fix the problem that I could think off: >> - Adding 'instance Template.ToSElem Foo' allows code to compile but it >> doesn't work and prints message in console like this: >> Main.hs:30:10-29: No instance nor default method for class operation >> Text.StringTemplate.Classes.toSElem >> > > This makes me think you have multiple versions of that package around and > your new project has managed to use both, such that it finds an instance in > the wrong version of the package which will not be considered compatible > with the instance it is looking for. > > -- > brandon s allbery kf8nh sine nomine > associates > allbery.b at gmail.com > ballbery at sinenomine.net > unix, openafs, kerberos, infrastructure, xmonad > http://sinenomine.net > -- With best regards, Ilya Seleznev -------------- next part -------------- An HTML attachment was scrubbed... URL: From oleg.grenrus at iki.fi Sun Jun 21 16:13:13 2015 From: oleg.grenrus at iki.fi (Oleg Grenrus) Date: Sun, 21 Jun 2015 19:13:13 +0300 Subject: [Haskell-cafe] "Universal" constraints? In-Reply-To: <20150621055552.GA21313@arkham.barrucadu.barrucadu.uk0.bigv.io> References: <20150621055552.GA21313@arkham.barrucadu.barrucadu.uk0.bigv.io> Message-ID: You can use `Eq1` class (either from prelude-extras [1], or your own): {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} import Data.IORef import Data.STRef import Control.Monad.ST -- | U for universal. class UEq1 f where (==#) :: f a -> f a -> Bool instance UEq1 IORef where (==#) = (==) instance UEq1 (STRef s) where (==#) = (==) class (Monad m, UEq1 (Var m)) => Store m where type Var m :: * -> * new :: a -> m (Var m a) read :: Var m a -> m a write :: Var m a -> a -> m () instance Store IO where type Var IO = IORef new = newIORef read = readIORef write = writeIORef instance Store (ST s) where type Var (ST s) = STRef s new = newSTRef read = readSTRef write = writeSTRef In same way you can lift any constraint to * -> * kind... - [1] https://hackage.haskell.org/package/prelude-extras-0.4/docs/Prelude-Extras.html - [2] https://hackage.haskell.org/package/transformers-0.4.3.0/docs/Data-Functor-Classes.html - Oleg > On 21 Jun 2015, at 08:55, Michael Walker wrote: > > Hi all, > > I was wondering about constraints in class declarations. Suppose we have > something like this: > > class Monad m => Store m where > type Var m :: * -> * > > new :: a -> m (Var m a) > read :: Var m a -> m a > write :: Var m a -> a -> m () > > Then some reasonable implementations would be IO and ST, using IORefs and > STRefs, > > instance Store IO where > type Var IO = IORef > > new = newIORef > read = readIORef > write = writeIORef > > instance Store (ST s) where > type Var (ST s) = STRef s > > new = newSTRef > read = readSTRef > write = writeSTRef > > Now, both IORefs and STRefs have equality, which doesn't require equality of the > contained type, > > instance Eq (IORef a) where ... > instance Eq (STRef s a) where ... > > This corresponds to pointer equality and, because reading the values is a > monadic action, is as good an Eq instance as we can get. Given this, it would be > nice to be able to specify that all instances of our Store class have this > property. Something like, > > class (Monad m, Eq (Var m a)) => Store m where ... > > But we can't write this! The `a` isn't in scope! What I really want to do is to > be able to write class constraints like this, > > class (forall a. C (T a)) => D x where ... > > Or why not get really crazy: > > class (forall a. C a => D (T a)) => E x where ... > > Is there some extension or combination of extensions that would make this work > without completely sacrificing type safety? FlexibleContexts allows it (the > simpler form, at least) for function constraints, but not for class constraints. > > If not, has anyone thought about this sort of thing before? > > -- > Michael Walker (http://www.barrucadu.co.uk) > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 842 bytes Desc: Message signed with OpenPGP using GPGMail URL: From clintonmead at gmail.com Mon Jun 22 04:35:36 2015 From: clintonmead at gmail.com (Clinton Mead) Date: Mon, 22 Jun 2015 14:35:36 +1000 Subject: [Haskell-cafe] Symmetric Difference for Data.Set and Data.IntSet? In-Reply-To: <55864885.7010109@gmail.com> References: <55864885.7010109@gmail.com> Message-ID: I think he means symmetricDifference a b = (a `union` b) `difference` (a `intersection` b) Or equivalently symmetricDifference a b = (a `difference` b) `union` (b `difference` a) Basically the elements in one of the two sets but not both. He's claiming a direct function would be faster than combining three. Note that (a `difference` b \= b `difference` a) but (a `symmetricDifference` b == b `symmetricDifference` a). On Sun, Jun 21, 2015 at 3:15 PM, Ruben Astudillo wrote: > > On 20/06/15 21:49, Zemyla wrote: > >> Alternatively, could we get a merge interface for Set and IntSet roughly >> matching Map and IntMap? >> > > Could you expand on what you mean? I understand it as that having > operations of > (Int)Map for (Int)Set, why don't just use (Int)Map then? > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From emax at chalmers.se Mon Jun 22 07:26:03 2015 From: emax at chalmers.se (Emil Axelsson) Date: Mon, 22 Jun 2015 09:26:03 +0200 Subject: [Haskell-cafe] "SameConstraints?" type constraints In-Reply-To: <558477D5.7070809@fecrd.cujae.edu.cu> References: <5583A5C2.8070606@fecrd.cujae.edu.cu> <25A7119A-F9F8-483C-8FD9-0C85909E4BD2@yandex.ru> <5583B7AF.7080703@fecrd.cujae.edu.cu> <7D13873D-60B5-4FFB-A002-19E52A43DE1B@yandex.ru> <55840661.1080100@fecrd.cujae.edu.cu> <558477D5.7070809@fecrd.cujae.edu.cu> Message-ID: <5587B88B.7090202@chalmers.se> Den 2015-06-19 22:13, Leza Morais Lutonda skrev: > On 06/19/2015 08:44 AM, Sean Leather wrote: >> Note this won't work for a Num instance mentioned earlier because the >> existentially quantified d types in two SC values are not provably the >> same type. In other words, you can't write >> >> instance Num e => Show (S Num e) where >> SC x1 y1 + SC x2 y2 = SC (x1 + x2) (y1 + y2) >> >> because x1 and x2 can have different types. > Another issue is: what if I want to constraint the type `e` to more > classes and make `d` to have the same constrains? I have to re-declare > the `S` data type like?: > > data S c1 c2 ... cN e where > > SC :: (c1 d, c2 d, ..., cN d) -> d -> e -> S c1 c2 ... cN e > > > Does anyone ever needed such a feature? Yes, have a look at the paper "Deconstraing DSLs": http://dl.acm.org/citation.cfm?id=2364571 See also the constraint product (&&&) from the `constraints` package. / Emil From nicholls.mark at vimn.com Mon Jun 22 07:28:32 2015 From: nicholls.mark at vimn.com (Nicholls, Mark) Date: Mon, 22 Jun 2015 07:28:32 +0000 Subject: [Haskell-cafe] Do people use visitor pattern in Haskell... In-Reply-To: References: , Message-ID: <16BE6C66-D11F-412C-BE66-AAF339EFC760@vimn.com> Brilliant, v interesring Excuse the spelling, sent from a phone with itty bitty keys, it like trying to sow a button on a shirt with a sausage. On 19 Jun 2015, at 19:37, Phil Ruffwind wrote: >> class Wibble a where >> >> visit :: (Foo -> b) -> (Bar -> b) -> a -> b > > The type `forall b. (X -> b) -> (Y -> b) -> b` is isomorphic to > `Either X Y`. If you rearrange the signature of `visit` a little bit, > > visit_ :: a -> forall b . (Foo -> b) -> (Bar -> b) -> b > > you can see that you're really just defining a function `a -> Either > Foo Bar`. So the class can be simplified to: > > class Wibble' a where > visit' :: a -> Either Foo Bar > > It follows that `WibblePackage'` is equivalent to > > type WibblePackage' = forall a . (WibbleInstance a, a) > > where > > type WibbleInstance a = a -> Either Foo Bar > > Because of the `forall`, there's nothing you can do with the second > component of the tuple (`a`) except to apply it to the first (`a -> > Either Foo Bar`), so it's just a long-winded way of saying > > type WibblePackage'' = Either Foo Bar > > In a non-strict language like Haskell, there's no reason to use such a > complicated type signature to delay the application of `a -> Either > Foo Bar` to `a`. CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. From michael at snoyman.com Mon Jun 22 07:42:46 2015 From: michael at snoyman.com (Michael Snoyman) Date: Mon, 22 Jun 2015 07:42:46 +0000 Subject: [Haskell-cafe] stack mailing list Message-ID: We recently started a mailing list for discussions of stack[1], a new Haskell build tool (see initial release announcement[2]). This list is open for questions, requests, discussions, and internal development (though if that last becomes too chatty, we can always move it to a separate list). You can sign up for the mailing list at: https://groups.google.com/d/forum/haskell-stack [1] https://github.com/commercialhaskell/stack#readme [2] https://www.fpcomplete.com/blog/2015/06/announcing-first-public-beta-stack -------------- next part -------------- An HTML attachment was scrubbed... URL: From emax at chalmers.se Mon Jun 22 07:45:13 2015 From: emax at chalmers.se (Emil Axelsson) Date: Mon, 22 Jun 2015 09:45:13 +0200 Subject: [Haskell-cafe] "SameConstraints?" type constraints In-Reply-To: <5587B88B.7090202@chalmers.se> References: <5583A5C2.8070606@fecrd.cujae.edu.cu> <25A7119A-F9F8-483C-8FD9-0C85909E4BD2@yandex.ru> <5583B7AF.7080703@fecrd.cujae.edu.cu> <7D13873D-60B5-4FFB-A002-19E52A43DE1B@yandex.ru> <55840661.1080100@fecrd.cujae.edu.cu> <558477D5.7070809@fecrd.cujae.edu.cu> <5587B88B.7090202@chalmers.se> Message-ID: <5587BD09.8020905@chalmers.se> Den 2015-06-22 09:26, Emil Axelsson skrev: > Den 2015-06-19 22:13, Leza Morais Lutonda skrev: >> On 06/19/2015 08:44 AM, Sean Leather wrote: >>> Note this won't work for a Num instance mentioned earlier because the >>> existentially quantified d types in two SC values are not provably the >>> same type. In other words, you can't write >>> >>> instance Num e => Show (S Num e) where >>> SC x1 y1 + SC x2 y2 = SC (x1 + x2) (y1 + y2) >>> >>> because x1 and x2 can have different types. >> Another issue is: what if I want to constraint the type `e` to more >> classes and make `d` to have the same constrains? I have to re-declare >> the `S` data type like?: >> >> data S c1 c2 ... cN e where >> >> SC :: (c1 d, c2 d, ..., cN d) -> d -> e -> S c1 c2 ... cN e >> >> >> Does anyone ever needed such a feature? > > Yes, have a look at the paper "Deconstraing DSLs": > > http://dl.acm.org/citation.cfm?id=2364571 > > See also the constraint product (&&&) from the `constraints` package. Or you might find this interface easier to work with: https://github.com/emilaxelsson/imperative-edsl/blob/master/src/Data/TypePredicates.hs It's based on type predicates (`* -> Constraint`), so you can write e.g. `(c1 /\ c2 /\ ... /\ cN) d => ...`. It also implements "sub-classing" using a technique similar to Data Types ? la Carte. / Emil From nicholls.mark at vimn.com Mon Jun 22 07:52:07 2015 From: nicholls.mark at vimn.com (Nicholls, Mark) Date: Mon, 22 Jun 2015 07:52:07 +0000 Subject: [Haskell-cafe] Mild confusion around type family In-Reply-To: References: <558416E4.8020901@well-typed.com> <3A3A7E3D-A26F-4779-B7C9-1A8284CFF4FF@cis.upenn.edu> Message-ID: <900674CB-F135-4A24-A437-717CBFB69C22@vimn.com> So this works, what i find surprising is that type families do this at all...in my head "type" means some sort of synonym, so to allow unmapped synonyms and not flag them as an error seems very odd. With datakind its doubly troubling as the unmatched family expression is of the same kind as the intended types in the domain of the "function"...so its unmatched and ive extended what seemed to be a closed expression defining some types of kind N. Excuse the spelling, sent from a phone with itty bitty keys, it like trying to sow a button on a shirt with a sausage. On 21 Jun 2015, at 13:07, Nicholls, Mark > wrote: ugly...but effective. thanks ________________________________ From: adam vogt [vogt.adam at gmail.com] Sent: 20 June 2015 16:34 To: Richard Eisenberg Cc: haskell-cafe; Nicholls, Mark Subject: Re: [Haskell-cafe] Mild confusion around type family On Jun 19, 2015 2:29 PM, "Richard Eisenberg" > wrote: > With a closed family, you could always do something like this: > > > type family Error (msg :: Symbol) -- no instances! > > type family Sub a b where > > -- real work > > Sub a b = Error "Sub is undefined here" > > Would that help? It still doesn't immediately error (there's no way to do that currently), but it's perhaps more telling to have an error string. Ghc does error out right away if you give it an infinite loop: type family Fail (x::k) (a :: *) where Fail x a = Fail x (Fail "don't raise the context stack please" a) -- defining f leads to compile failure, and the message includes the "msg" f :: Fail "msg" () f = undefined But it would be nice to have a less hacky solution, especially as this one gives error messages that suggest giving the type checker more resources. Regards, Adam CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe at haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan.miljenovic at gmail.com Mon Jun 22 13:21:18 2015 From: ivan.miljenovic at gmail.com (Ivan Lazar Miljenovic) Date: Mon, 22 Jun 2015 23:21:18 +1000 Subject: [Haskell-cafe] ANNOUNCE: fgl-arbitrary Message-ID: I've just released the first version of fgl-arbitrary [1], which provides Arbitrary instances for fgl graphs for use with QuickCheck. Also provided are some wrapper newtypes to produce specific types of graphs, and also the ability to generate just valid node and edge lists for use with other graph-like data structures. [1]: http://hackage.haskell.org/package/fgl-arbitrary -- Ivan Lazar Miljenovic Ivan.Miljenovic at gmail.com http://IvanMiljenovic.wordpress.com From eir at cis.upenn.edu Mon Jun 22 16:19:49 2015 From: eir at cis.upenn.edu (Richard Eisenberg) Date: Mon, 22 Jun 2015 12:19:49 -0400 Subject: [Haskell-cafe] Mild confusion around type family In-Reply-To: <900674CB-F135-4A24-A437-717CBFB69C22@vimn.com> References: <558416E4.8020901@well-typed.com> <3A3A7E3D-A26F-4779-B7C9-1A8284CFF4FF@cis.upenn.edu> <900674CB-F135-4A24-A437-717CBFB69C22@vimn.com> Message-ID: "type" does exactly mean a synonym. "type family" means something else. Exactly what that "something else" is is actually puzzling me too these days. I think some Hard Thought here is called for, to be honest. A close approximation is that type families do introduce new types, with equality dictated by a (confluent) rewrite system. The troublesome aspect of declaring a new type at a closed kind is mitigated by the fact that we can never pattern match on a type family. (That is, we can't use a type family on the left of the = in a type family instance.) So we can't ever observe the new types. But it is still a bit odd. As for the trick of getting early errors through infinite recursion: be careful. GHC makes no guarantees at all that an infinite loop in a type will cause an error. For example, if you have type Const a b = a and the infinite loop is the second parameter to Const, GHC will chug on happily. Perhaps this is intended, but perhaps not. Note that there is no type-level `Seq` that you might need to "force" a type to expose this sort of error. Richard On Jun 22, 2015, at 3:52 AM, "Nicholls, Mark" wrote: > So this works, what i find surprising is that type families do this at all...in my head "type" means some sort of synonym, so to allow unmapped synonyms and not flag them as an error seems very odd. > > With datakind its doubly troubling as the unmatched family expression is of the same kind as the intended types in the domain of the "function"...so its unmatched and ive extended what seemed to be a closed expression defining some types of kind N. > > Excuse the spelling, sent from a phone with itty bitty keys, it like trying to sow a button on a shirt with a sausage. > > > On 21 Jun 2015, at 13:07, Nicholls, Mark wrote: > >> ugly...but effective. >> >> thanks >> >> >> From: adam vogt [vogt.adam at gmail.com] >> Sent: 20 June 2015 16:34 >> To: Richard Eisenberg >> Cc: haskell-cafe; Nicholls, Mark >> Subject: Re: [Haskell-cafe] Mild confusion around type family >> >> >> On Jun 19, 2015 2:29 PM, "Richard Eisenberg" wrote: >> > With a closed family, you could always do something like this: >> > >> > > type family Error (msg :: Symbol) -- no instances! >> > > type family Sub a b where >> > > -- real work >> > > Sub a b = Error "Sub is undefined here" >> > >> > Would that help? It still doesn't immediately error (there's no way to do that currently), but it's perhaps more telling to have an error string. >> Ghc does error out right away if you give it an infinite loop: >> type family Fail (x::k) (a :: *) where >> Fail x a = Fail x (Fail "don't raise the context stack please" a) >> -- defining f leads to compile failure, and the message includes the "msg" >> f :: Fail "msg" () >> f = undefined >> But it would be nice to have a less hacky solution, especially as this one gives error messages that suggest giving the type checker more resources. >> Regards, >> Adam >> >> >> >> CONFIDENTIALITY NOTICE >> >> This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. >> >> While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. >> >> Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. >> >> MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > > > CONFIDENTIALITY NOTICE > > This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. > > While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. > > Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. > > MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholls.mark at vimn.com Mon Jun 22 16:49:15 2015 From: nicholls.mark at vimn.com (Nicholls, Mark) Date: Mon, 22 Jun 2015 16:49:15 +0000 Subject: [Haskell-cafe] Mild confusion around type family In-Reply-To: References: <558416E4.8020901@well-typed.com> <3A3A7E3D-A26F-4779-B7C9-1A8284CFF4FF@cis.upenn.edu> <900674CB-F135-4A24-A437-717CBFB69C22@vimn.com> Message-ID: I mostly understand (a confluent rewrite system doesn't register). I did something it mathematically couldn't do. I did 0 - n = (0 - (0 - (0 - n))) On N...that can't be done... It all feels a bit odd....introducing new types through data families seems reasonable, introducing them through type families...not.....but that's to my untrained eye. From: Richard Eisenberg [mailto:eir at cis.upenn.edu] Sent: 22 June 2015 5:20 PM To: Nicholls, Mark Cc: adam vogt; haskell-cafe Subject: Re: [Haskell-cafe] Mild confusion around type family "type" does exactly mean a synonym. "type family" means something else. Exactly what that "something else" is is actually puzzling me too these days. I think some Hard Thought here is called for, to be honest. A close approximation is that type families do introduce new types, with equality dictated by a (confluent) rewrite system. The troublesome aspect of declaring a new type at a closed kind is mitigated by the fact that we can never pattern match on a type family. (That is, we can't use a type family on the left of the = in a type family instance.) So we can't ever observe the new types. But it is still a bit odd. As for the trick of getting early errors through infinite recursion: be careful. GHC makes no guarantees at all that an infinite loop in a type will cause an error. For example, if you have type Const a b = a and the infinite loop is the second parameter to Const, GHC will chug on happily. Perhaps this is intended, but perhaps not. Note that there is no type-level `Seq` that you might need to "force" a type to expose this sort of error. Richard On Jun 22, 2015, at 3:52 AM, "Nicholls, Mark" > wrote: So this works, what i find surprising is that type families do this at all...in my head "type" means some sort of synonym, so to allow unmapped synonyms and not flag them as an error seems very odd. With datakind its doubly troubling as the unmatched family expression is of the same kind as the intended types in the domain of the "function"...so its unmatched and ive extended what seemed to be a closed expression defining some types of kind N. Excuse the spelling, sent from a phone with itty bitty keys, it like trying to sow a button on a shirt with a sausage. On 21 Jun 2015, at 13:07, Nicholls, Mark > wrote: ugly...but effective. thanks ________________________________ From: adam vogt [vogt.adam at gmail.com] Sent: 20 June 2015 16:34 To: Richard Eisenberg Cc: haskell-cafe; Nicholls, Mark Subject: Re: [Haskell-cafe] Mild confusion around type family On Jun 19, 2015 2:29 PM, "Richard Eisenberg" > wrote: > With a closed family, you could always do something like this: > > > type family Error (msg :: Symbol) -- no instances! > > type family Sub a b where > > -- real work > > Sub a b = Error "Sub is undefined here" > > Would that help? It still doesn't immediately error (there's no way to do that currently), but it's perhaps more telling to have an error string. Ghc does error out right away if you give it an infinite loop: type family Fail (x::k) (a :: *) where Fail x a = Fail x (Fail "don't raise the context stack please" a) -- defining f leads to compile failure, and the message includes the "msg" f :: Fail "msg" () f = undefined But it would be nice to have a less hacky solution, especially as this one gives error messages that suggest giving the type checker more resources. Regards, Adam CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe at haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.feuer at gmail.com Mon Jun 22 16:51:48 2015 From: david.feuer at gmail.com (David Feuer) Date: Mon, 22 Jun 2015 12:51:48 -0400 Subject: [Haskell-cafe] Turning Monoids into Categories Message-ID: Is there a newtype defined in some normal sort of place for turning Monoids into Categories? I'm looking for something like this: newtype ConstConst m a b = ConstConst m instance Monoid m => Category (ConstConst m) where id = ConstConst mempty ConstConst x . ConstConst y = ConstConst (x <> y) Thanks, David Feuer From chpatrick at gmail.com Mon Jun 22 17:13:28 2015 From: chpatrick at gmail.com (Patrick Chilton) Date: Mon, 22 Jun 2015 18:13:28 +0100 Subject: [Haskell-cafe] Turning Monoids into Categories In-Reply-To: References: Message-ID: Looks like Semi from semigroupoids: https://hackage.haskell.org/package/semigroupoids-5.0.0.2/docs/Data-Semigroupoid.html#t:Semi On Mon, Jun 22, 2015 at 5:51 PM, David Feuer wrote: > Is there a newtype defined in some normal sort of place for turning > Monoids into Categories? I'm looking for something like this: > > newtype ConstConst m a b = ConstConst m > > instance Monoid m => Category (ConstConst m) where > id = ConstConst mempty > ConstConst x . ConstConst y = ConstConst (x <> y) > > Thanks, > David Feuer > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From markandrusroberts at gmail.com Mon Jun 22 18:39:15 2015 From: markandrusroberts at gmail.com (Mark Roberts) Date: Mon, 22 Jun 2015 11:39:15 -0700 Subject: [Haskell-cafe] RebindableSyntax on individual do blocks Message-ID: I have a program that uses both monads and indexed monads, and I'd like to use do-notation for each in the same source file. Is there a way to rebind syntax for only the do blocks that make use of an indexed monad? Thanks, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From sumit.sahrawat.apm13 at iitbhu.ac.in Mon Jun 22 18:56:36 2015 From: sumit.sahrawat.apm13 at iitbhu.ac.in (Sumit Sahrawat, Maths & Computing, IIT (BHU)) Date: Tue, 23 Jun 2015 00:26:36 +0530 Subject: [Haskell-cafe] RebindableSyntax on individual do blocks In-Reply-To: References: Message-ID: I don't know anything about indexed monads, but it seems that you can use the 'where' keyword to rebind (>>) and return for any block you want [1]. An example from [1]: addNumbers = do 80 60 10 where (>>) = (+) It might be possible to generate this where block using TH. There is also a quasi-quoter available for indexed-do-notation [2]. [1]: https://ocharles.org.uk/blog/guest-posts/2014-12-06-rebindable-syntax.html [2]: https://github.com/fumieval/indexed-do-notation On 23 June 2015 at 00:09, Mark Roberts wrote: > I have a program that uses both monads and indexed monads, and I'd like to > use do-notation for each in the same source file. Is there a way to rebind > syntax for only the do blocks that make use of an indexed monad? > > Thanks, > Mark > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -- Regards Sumit Sahrawat -------------- next part -------------- An HTML attachment was scrubbed... URL: From hesselink at gmail.com Mon Jun 22 19:18:10 2015 From: hesselink at gmail.com (Erik Hesselink) Date: Mon, 22 Jun 2015 21:18:10 +0200 Subject: [Haskell-cafe] RebindableSyntax on individual do blocks In-Reply-To: References: Message-ID: Hi Mark, RebindableSyntax uses whatever (>>), (>>=) and return are in scope. So if you bind them in a `let` or `where`, you should be able to use different ones for different do blocks. Erik On Mon, Jun 22, 2015 at 8:39 PM, Mark Roberts wrote: > I have a program that uses both monads and indexed monads, and I'd like to > use do-notation for each in the same source file. Is there a way to rebind > syntax for only the do blocks that make use of an indexed monad? > > Thanks, > Mark > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > From markandrusroberts at gmail.com Mon Jun 22 19:19:52 2015 From: markandrusroberts at gmail.com (Mark Roberts) Date: Mon, 22 Jun 2015 12:19:52 -0700 Subject: [Haskell-cafe] RebindableSyntax on individual do blocks In-Reply-To: References: Message-ID: Ah, I missed that bit. Thank you! Mark On Mon, Jun 22, 2015 at 12:18 PM, Erik Hesselink wrote: > Hi Mark, > > RebindableSyntax uses whatever (>>), (>>=) and return are in scope. So > if you bind them in a `let` or `where`, you should be able to use > different ones for different do blocks. > > Erik > > On Mon, Jun 22, 2015 at 8:39 PM, Mark Roberts > wrote: > > I have a program that uses both monads and indexed monads, and I'd like > to > > use do-notation for each in the same source file. Is there a way to > rebind > > syntax for only the do blocks that make use of an indexed monad? > > > > Thanks, > > Mark > > > > _______________________________________________ > > Haskell-Cafe mailing list > > Haskell-Cafe at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.feuer at gmail.com Mon Jun 22 19:27:51 2015 From: david.feuer at gmail.com (David Feuer) Date: Mon, 22 Jun 2015 15:27:51 -0400 Subject: [Haskell-cafe] Turning Monoids into Categories In-Reply-To: References: Message-ID: Thanks. That looks like the right thing. It's kind of a strange name for it though, without the context. Basically, Semi m = Constant . Constant m I wonder if something similar by a different name might fit in transformers. On Mon, Jun 22, 2015 at 1:13 PM, Patrick Chilton wrote: > Looks like Semi from semigroupoids: > https://hackage.haskell.org/package/semigroupoids-5.0.0.2/docs/Data-Semigroupoid.html#t:Semi > > On Mon, Jun 22, 2015 at 5:51 PM, David Feuer wrote: >> >> Is there a newtype defined in some normal sort of place for turning >> Monoids into Categories? I'm looking for something like this: >> >> newtype ConstConst m a b = ConstConst m >> >> instance Monoid m => Category (ConstConst m) where >> id = ConstConst mempty >> ConstConst x . ConstConst y = ConstConst (x <> y) >> >> Thanks, >> David Feuer >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > From adam at bergmark.nl Mon Jun 22 19:27:53 2015 From: adam at bergmark.nl (Adam Bergmark) Date: Mon, 22 Jun 2015 21:27:53 +0200 Subject: [Haskell-cafe] RebindableSyntax on individual do blocks In-Reply-To: References: Message-ID: Here's a pretty elegant (read: hacky?) way of working with RebindableSyntax: === Foo.hs module Foo where import Prelude hiding (Monad (..)) import qualified Prelude as P data MyMonad m a b = MyMonad { (>>=) :: m a -> (a -> m b) -> m b , (>>) :: m a -> m b -> m b , return :: a -> m a , fail :: String -> m a } ioMonad :: MyMonad IO a b ioMonad = MyMonad (P.>>=) (P.>>) P.return P.fail === Bar.hs {-# OPTIONS -fno-warn-name-shadowing #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE RebindableSyntax #-} module Bar where import Prelude import qualified Foo normalDo :: Monad m => m () normalDo = do return () -- Inferred: ioDo :: IO () ioDo = do return () where Foo.MyMonad{..} = Foo.ioMonad Cheers, Adam On Mon, Jun 22, 2015 at 9:19 PM, Mark Roberts wrote: > Ah, I missed that bit. Thank you! > Mark > > On Mon, Jun 22, 2015 at 12:18 PM, Erik Hesselink > wrote: > >> Hi Mark, >> >> RebindableSyntax uses whatever (>>), (>>=) and return are in scope. So >> if you bind them in a `let` or `where`, you should be able to use >> different ones for different do blocks. >> >> Erik >> >> On Mon, Jun 22, 2015 at 8:39 PM, Mark Roberts >> wrote: >> > I have a program that uses both monads and indexed monads, and I'd like >> to >> > use do-notation for each in the same source file. Is there a way to >> rebind >> > syntax for only the do blocks that make use of an indexed monad? >> > >> > Thanks, >> > Mark >> > >> > _______________________________________________ >> > Haskell-Cafe mailing list >> > Haskell-Cafe at haskell.org >> > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> > >> > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicola.gigante at gmail.com Tue Jun 23 16:11:19 2015 From: nicola.gigante at gmail.com (Nicola Gigante) Date: Tue, 23 Jun 2015 18:11:19 +0200 Subject: [Haskell-cafe] Bibliographic references on advantages of functional languages for refactoring Message-ID: <262FDF8F-2A5A-45BD-8DCE-8E95BB3FBAD0@gmail.com> Hi all, I?m writing my master thesis, which is not itself about functional programming but I use Haskell as the language chosen for the implementation of whatever I?m talking about. To motivate the choice more than ?I like the language? I?m arguing that since I?m implementing experimental stuff and I?ll need to change the code and refactor very often, a strongly typed language is what I need. I wrote this sentence: "Strongly-typed programming eases the refactoring process by leveraging the compiler to spot wrong transformations before they turn into runtime bugs? Since this thesis is not itself about functional programming this sentence needs to be backed by something. In other words I need to cite some published paper where this is said/surveyed/proved/whatever. So the question: can you help me find referentiable published work relative to how strongly-typed functional programming eases refactoring? A survey or some case-study report or some functional pearl, dunno. Thank you very much in advance, Nicola From manny at fpcomplete.com Tue Jun 23 17:24:25 2015 From: manny at fpcomplete.com (Emanuel Borsboom) Date: Tue, 23 Jun 2015 10:24:25 -0700 Subject: [Haskell-cafe] ANNOUNCE: stack 0.1.0.0 Message-ID: Announcing stack, a new build tool, first stable release. More information at: https://www.fpcomplete.com/blog/2015/06/stack-0-1-release From heraldhoi at gmail.com Wed Jun 24 08:30:01 2015 From: heraldhoi at gmail.com (Geraldus) Date: Wed, 24 Jun 2015 08:30:01 +0000 Subject: [Haskell-cafe] Generalizing a library Message-ID: Hi Cafe! I've written very first version of GHCJS port of Perch library originally designed to work with Haste compiler. Most of work is already done, though some polishing is needed. In essence Haste and GHCJS versions are very similar, the major difference is how foreign functions are defined, and in fact Perch is built using just a few low-level primitives . So, as these libraries are very similar I want to generalize Perch to make it independent of compiler somehow. My initial idea was to have a Perch library and several compiler specific back-ends which user should select depending on his toolchain, but my Haskell skills are still very poor to find a proper way to do this. Can someone point me in right direction or at least give some advices? Very appreciate any help! -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at bergmark.nl Wed Jun 24 08:57:10 2015 From: adam at bergmark.nl (Adam Bergmark) Date: Wed, 24 Jun 2015 10:57:10 +0200 Subject: [Haskell-cafe] Generalizing a library In-Reply-To: References: Message-ID: The way Fay handles this is to set the `FAY` variable for CPP so you can use `#ifdef FAY`. I then usually have a module Foo.GHC and Foo.Fay imported conditionally. Perhaps something similar is applicable here? HTH, Adam On Wed, Jun 24, 2015 at 10:30 AM, Geraldus wrote: > Hi Cafe! > > I've written very first version of GHCJS port > of Perch > library originally designed to > work with Haste compiler. Most of work is already done, though some > polishing is needed. In essence Haste and GHCJS versions are very similar, > the major difference is how foreign functions are defined, and in fact > Perch is built using just a few low-level primitives > . > > So, as these libraries are very similar I want to generalize Perch to make > it independent of compiler somehow. > > My initial idea was to have a Perch library and several compiler specific > back-ends which user should select depending on his toolchain, but my > Haskell skills are still very poor to find a proper way to do this. Can > someone point me in right direction or at least give some advices? > > Very appreciate any help! > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholls.mark at vimn.com Wed Jun 24 12:59:51 2015 From: nicholls.mark at vimn.com (Nicholls, Mark) Date: Wed, 24 Jun 2015 12:59:51 +0000 Subject: [Haskell-cafe] Reinventing the wheel with HList. Message-ID: My latest confusion.... I've got a typeclass (with associated types) monoid sort of thing.... I can get a Singleton family of Nat to be an instance of the typeclass. Lists are sort of Natural numbers...with a bit of extra functionality... So I should be able to take HList and make that a member of the same typeclass... I fail for 2 reasons...1...I have to wrestle with the kinds...in a way I find ununderstandbly irritating. And 2...because BOOM. "is a rigid type variable bound by" blab la. My Haskell in many ways is primitive...I seem to be messing with things beyond my ability....but that's the way to learn I suppose. > {-# LANGUAGE DataKinds #-} > {-# LANGUAGE ExplicitForAll #-} > {-# LANGUAGE FlexibleContexts #-} > {-# LANGUAGE FlexibleInstances #-} > {-# LANGUAGE GADTs #-} > {-# LANGUAGE MultiParamTypeClasses #-} > {-# LANGUAGE PolyKinds #-} > {-# LANGUAGE StandaloneDeriving #-} > {-# LANGUAGE TypeFamilies #-} > {-# LANGUAGE TypeOperators #-} > {-# LANGUAGE UndecidableInstances #-} > {-# LANGUAGE ScopedTypeVariables #-} > import Control.Effect > import Control.Effect.Helpers.List > import Control.Effect.WriteOnceWriter > import Prelude hiding ((>>=),(>>),return,fmap,fail) > --import GHC.TypeLits > import Data.Type.Equality > import Data.Type.Bool > --import Data.HList.HList > data Nat where > Z :: Nat > S :: Nat -> Nat > data family Sing (a :: k) > data SNat (a :: Nat) where > SZ :: SNat 'Z > SS :: SNat a -> SNat ('S a) > type family (n :: Nat) :+ (m :: Nat) :: Nat > type instance 'Z :+ m = m > type instance ('S n) :+ m = 'S (n :+ m) Define something like a monoid over the types... (note I have to wrestle with the kind signatures to get the instance of SNat to work, which is fine...but now closes doors to other instances) > class TMonoid (m :: k -> *) where > type O m :: k > zero :: m (O m) > type TPlus m (d :: k) (e :: k) :: k > add :: m a -> m b -> m (TPlus m a b) And this works quite nicely > instance TMonoid SNat where > type O SNat = 'Z > zero = SZ > type TPlus SNat a b = a :+ b > add SZ b = b > add (SS a) b = SS (add a b) Now.... (I have to declare different kind?....I can't get a single simple declaration of TMonoid?) > class TMonoid' (m :: [*] -> *) where > type O' m :: [*] > zero' :: m (O' m) > type TPlus' m (d :: [*]) (e :: [*]) :: [*] > add' :: m a -> m b -> m (TPlus' m a b) Steal the definition of HList > data family HList (l::[*]) :: * > data instance HList '[] = HNil > data instance HList (x ': xs) = x `HCons` HList xs And try to construct an analogous TMonoid of it... > instance TMonoid' HList where > type O' HList = '[] > zero' = HNil > type TPlus' HList a b = a :++ b > add' HNil b = b > add' (HCons x xs) ys = HCons x (add' xs ys) BOOM Couldn't match type 'a' with ''[]' 'a' is a rigid type variable bound by the type signature for add' :: HList a -> HList b -> HList (TPlus' HList a b) at broadcast2.lhs:90:5 Expected type: HList a Actual type: HList '[] Relevant bindings include add' :: HList a -> HList b -> HList (TPlus' HList a b) (bound at broadcast2.lhs:90:5) In the pattern: HNil In an equation for 'add'': add' HNil b = b In the instance declaration for 'TMonoid' HList' Hmmm....confused...why does add SZ b = b work, but the analogous add' HNil b = b fail CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at well-typed.com Wed Jun 24 15:31:59 2015 From: adam at well-typed.com (Adam Gundry) Date: Wed, 24 Jun 2015 16:31:59 +0100 Subject: [Haskell-cafe] Reinventing the wheel with HList. In-Reply-To: References: Message-ID: <558ACD6F.3020103@well-typed.com> Hi, The problem here is that, since `HList` is a data family, pattern matching on a value of type `HList a` does not provide more information about the variable `a`. It is only valid to pattern-match on `HNil` if you already know that it has type `HList '[]`, hence the error message. Instead, you probably want to use a GADT for singleton lists: > data SList l where > Nil :: SList '[] > Cons :: x -> SList xs -> SList (x ': xs) Now it is possible for `add` to pattern-match on a constructor of `SList` and refine the type. (By the way, I don't think you need TMonoid'... just using TMonoid should work.) Hope this helps, Adam On 24/06/15 13:59, Nicholls, Mark wrote: > My latest confusion?. > > > > I?ve got a typeclass (with associated types) monoid sort of thing?. > > I can get a Singleton family of Nat to be an instance of the typeclass. > > > > Lists are sort of Natural numbers?with a bit of extra functionality? > > So I should be able to take HList and make that a member of the same > typeclass? > > > > I fail for 2 reasons?1?I have to wrestle with the kinds?in a way I find > ununderstandbly irritating. > > And 2?because BOOM. > > ?is a rigid type variable bound by? blab la. > > > > My Haskell in many ways is primitive?I seem to be messing with things > beyond my ability?.but that?s the way to learn I suppose. > > > >> {-# LANGUAGE DataKinds #-} > >> {-# LANGUAGE ExplicitForAll #-} > >> {-# LANGUAGE FlexibleContexts #-} > >> {-# LANGUAGE FlexibleInstances #-} > >> {-# LANGUAGE GADTs #-} > >> {-# LANGUAGE MultiParamTypeClasses #-} > >> {-# LANGUAGE PolyKinds #-} > >> {-# LANGUAGE StandaloneDeriving #-} > >> {-# LANGUAGE TypeFamilies #-} > >> {-# LANGUAGE TypeOperators #-} > >> {-# LANGUAGE UndecidableInstances #-} > >> {-# LANGUAGE ScopedTypeVariables #-} > > > >> import Control.Effect > >> import Control.Effect.Helpers.List > >> import Control.Effect.WriteOnceWriter > >> import Prelude hiding ((>>=),(>>),return,fmap,fail) > >> --import GHC.TypeLits > >> import Data.Type.Equality > >> import Data.Type.Bool > >> --import Data.HList.HList > > > > > >> data Nat where > >> Z :: Nat > >> S :: Nat -> Nat > > > >> data family Sing (a :: k) > > > >> data SNat (a :: Nat) where > >> SZ :: SNat 'Z > >> SS :: SNat a -> SNat ('S a) > > > >> type family (n :: Nat) :+ (m :: Nat) :: Nat > >> type instance 'Z :+ m = m > >> type instance ('S n) :+ m = 'S (n :+ m) > > > > > > Define something like a monoid over the types? > > (note I have to wrestle with the kind signatures to get the instance of > SNat to work, which is fine?but now closes doors to other instances) > > > >> class TMonoid (m :: k -> *) where > >> type O m :: k > >> zero :: m (O m) > >> type TPlus m (d :: k) (e :: k) :: k > >> add :: m a -> m b -> m (TPlus m a b) > > > > And this works quite nicely > > > >> instance TMonoid SNat where > >> type O SNat = 'Z > >> zero = SZ > >> type TPlus SNat a b = a :+ b > >> add SZ b = b > >> add (SS a) b = SS (add a b) > > > > Now?. > > > > (I have to declare different kind?....I can?t get a single simple > declaration of TMonoid?) > > > >> class TMonoid' (m :: [*] -> *) where > >> type O' m :: [*] > >> zero' :: m (O' m) > >> type TPlus' m (d :: [*]) (e :: [*]) :: [*] > >> add' :: m a -> m b -> m (TPlus' m a b) > > > > Steal the definition of HList > > > >> data family HList (l::[*]) :: * > > > >> data instance HList '[] = HNil > >> data instance HList (x ': xs) = x `HCons` HList xs > > > > And try to construct an analogous TMonoid of it? > > > >> instance TMonoid' HList where > >> type O' HList = '[] > >> zero' = HNil > >> type TPlus' HList a b = a :++ b > >> add' HNil b = b > >> add' (HCons x xs) ys = HCons x (add' xs ys) > > > > BOOM > > > > Couldn't match type ?a? with ?'[]? > > ?a? is a rigid type variable bound by > > the type signature for > > add' :: HList a -> HList b -> HList (TPlus' HList a b) > > at broadcast2.lhs:90:5 > > Expected type: HList a > > Actual type: HList '[] > > Relevant bindings include > > add' :: HList a -> HList b -> HList (TPlus' HList a b) > > (bound at broadcast2.lhs:90:5) > > In the pattern: HNil > > In an equation for ?add'?: add' HNil b = b > > In the instance declaration for ?TMonoid' HList? > > > > Hmmm?.confused?why does > > > > add SZ b = b > > > > work, but the analogous > > > > add' HNil b = b > > > > fail -- Adam Gundry, Haskell Consultant Well-Typed LLP, http://www.well-typed.com/ From nicholls.mark at vimn.com Wed Jun 24 15:37:21 2015 From: nicholls.mark at vimn.com (Nicholls, Mark) Date: Wed, 24 Jun 2015 15:37:21 +0000 Subject: [Haskell-cafe] Reinventing the wheel with HList. In-Reply-To: <558ACD6F.3020103@well-typed.com> References: <558ACD6F.3020103@well-typed.com> Message-ID: Brilliant....let me have a go...half the problem here is there seems to be about 5 different ways to do the same thing...all slightly different...and all with creases in it....I'm probably more at home with GADTs anyway. >-----Original Message----- >From: Haskell-Cafe [mailto:haskell-cafe-bounces at haskell.org] On Behalf Of >Adam Gundry >Sent: 24 June 2015 4:32 PM >To: haskell-cafe at haskell.org >Subject: Re: [Haskell-cafe] Reinventing the wheel with HList. > >Hi, > >The problem here is that, since `HList` is a data family, pattern matching on a >value of type `HList a` does not provide more information about the variable >`a`. It is only valid to pattern-match on `HNil` if you already know that it has >type `HList '[]`, hence the error message. > >Instead, you probably want to use a GADT for singleton lists: > >> data SList l where >> Nil :: SList '[] >> Cons :: x -> SList xs -> SList (x ': xs) > >Now it is possible for `add` to pattern-match on a constructor of `SList` and >refine the type. > >(By the way, I don't think you need TMonoid'... just using TMonoid should >work.) > >Hope this helps, > >Adam > > >On 24/06/15 13:59, Nicholls, Mark wrote: >> My latest confusion.... >> >> >> >> I've got a typeclass (with associated types) monoid sort of thing.... >> >> I can get a Singleton family of Nat to be an instance of the typeclass. >> >> >> >> Lists are sort of Natural numbers...with a bit of extra functionality... >> >> So I should be able to take HList and make that a member of the same >> typeclass... >> >> >> >> I fail for 2 reasons...1...I have to wrestle with the kinds...in a way I >> find ununderstandbly irritating. >> >> And 2...because BOOM. >> >> "is a rigid type variable bound by" blab la. >> >> >> >> My Haskell in many ways is primitive...I seem to be messing with things >> beyond my ability....but that's the way to learn I suppose. >> >> >> >>> {-# LANGUAGE DataKinds #-} >> >>> {-# LANGUAGE ExplicitForAll #-} >> >>> {-# LANGUAGE FlexibleContexts #-} >> >>> {-# LANGUAGE FlexibleInstances #-} >> >>> {-# LANGUAGE GADTs #-} >> >>> {-# LANGUAGE MultiParamTypeClasses #-} >> >>> {-# LANGUAGE PolyKinds #-} >> >>> {-# LANGUAGE StandaloneDeriving #-} >> >>> {-# LANGUAGE TypeFamilies #-} >> >>> {-# LANGUAGE TypeOperators #-} >> >>> {-# LANGUAGE UndecidableInstances #-} >> >>> {-# LANGUAGE ScopedTypeVariables #-} >> >> >> >>> import Control.Effect >> >>> import Control.Effect.Helpers.List >> >>> import Control.Effect.WriteOnceWriter >> >>> import Prelude hiding ((>>=),(>>),return,fmap,fail) >> >>> --import GHC.TypeLits >> >>> import Data.Type.Equality >> >>> import Data.Type.Bool >> >>> --import Data.HList.HList >> >> >> >> >> >>> data Nat where >> >>> Z :: Nat >> >>> S :: Nat -> Nat >> >> >> >>> data family Sing (a :: k) >> >> >> >>> data SNat (a :: Nat) where >> >>> SZ :: SNat 'Z >> >>> SS :: SNat a -> SNat ('S a) >> >> >> >>> type family (n :: Nat) :+ (m :: Nat) :: Nat >> >>> type instance 'Z :+ m = m >> >>> type instance ('S n) :+ m = 'S (n :+ m) >> >> >> >> >> >> Define something like a monoid over the types... >> >> (note I have to wrestle with the kind signatures to get the instance >> of SNat to work, which is fine...but now closes doors to other >> instances) >> >> >> >>> class TMonoid (m :: k -> *) where >> >>> type O m :: k >> >>> zero :: m (O m) >> >>> type TPlus m (d :: k) (e :: k) :: k >> >>> add :: m a -> m b -> m (TPlus m a b) >> >> >> >> And this works quite nicely >> >> >> >>> instance TMonoid SNat where >> >>> type O SNat = 'Z >> >>> zero = SZ >> >>> type TPlus SNat a b = a :+ b >> >>> add SZ b = b >> >>> add (SS a) b = SS (add a b) >> >> >> >> Now.... >> >> >> >> (I have to declare different kind?....I can't get a single simple >> declaration of TMonoid?) >> >> >> >>> class TMonoid' (m :: [*] -> *) where >> >>> type O' m :: [*] >> >>> zero' :: m (O' m) >> >>> type TPlus' m (d :: [*]) (e :: [*]) :: [*] >> >>> add' :: m a -> m b -> m (TPlus' m a b) >> >> >> >> Steal the definition of HList >> >> >> >>> data family HList (l::[*]) :: * >> >> >> >>> data instance HList '[] = HNil >> >>> data instance HList (x ': xs) = x `HCons` HList xs >> >> >> >> And try to construct an analogous TMonoid of it... >> >> >> >>> instance TMonoid' HList where >> >>> type O' HList = '[] >> >>> zero' = HNil >> >>> type TPlus' HList a b = a :++ b >> >>> add' HNil b = b >> >>> add' (HCons x xs) ys = HCons x (add' xs ys) >> >> >> >> BOOM >> >> >> >> Couldn't match type 'a' with ''[]' >> >> 'a' is a rigid type variable bound by >> >> the type signature for >> >> add' :: HList a -> HList b -> HList (TPlus' HList a b) >> >> at broadcast2.lhs:90:5 >> >> Expected type: HList a >> >> Actual type: HList '[] >> >> Relevant bindings include >> >> add' :: HList a -> HList b -> HList (TPlus' HList a b) >> >> (bound at broadcast2.lhs:90:5) >> >> In the pattern: HNil >> >> In an equation for 'add'': add' HNil b = b >> >> In the instance declaration for 'TMonoid' HList' >> >> >> >> Hmmm....confused...why does >> >> >> >> add SZ b = b >> >> >> >> work, but the analogous >> >> >> >> add' HNil b = b >> >> >> >> fail > > >-- >Adam Gundry, Haskell Consultant >Well-Typed LLP, http://www.well-typed.com/ >_______________________________________________ >Haskell-Cafe mailing list >Haskell-Cafe at haskell.org >http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. From francygazz at gmail.com Wed Jun 24 17:38:51 2015 From: francygazz at gmail.com (Francesco Gazzetta) Date: Wed, 24 Jun 2015 19:38:51 +0200 Subject: [Haskell-cafe] Fwd: taking over urlencoded In-Reply-To: References: Message-ID: The package urlencoded wasn't updated since 2012 and needs a minor modification in the .cabal file. The author was contacted half an year ago, but he didn't respond, so -according to the instructions on hackage- I state my intention to take over. Or, more simply, can an hackage admin just edit the cabal file? -------------- next part -------------- An HTML attachment was scrubbed... URL: From lsp at informatik.uni-kiel.de Wed Jun 24 21:07:29 2015 From: lsp at informatik.uni-kiel.de (lennart spitzner) Date: Wed, 24 Jun 2015 23:07:29 +0200 Subject: [Haskell-cafe] pqueue - repository and maintainer (taking over) In-Reply-To: <55662287.7000201@informatik.uni-kiel.de> References: <55662287.7000201@informatik.uni-kiel.de> Message-ID: <558B1C11.6050308@informatik.uni-kiel.de> Greetings; finally an update: pqueue-1.3.0 is now live; finally ghc-7.10 compatibility :) (tested with ghc-7.2 through ghc-7.10.2rc1.) Louis kindly made me co-maintainer. I created a github repo, so if I forgot to update anything you can use the issue-tracker over there :) Lennart On 27/05/15 22:01, lennart spitzner wrote: > Greetings, > > Regarding the pqueue package: > > 1) Does anyone have any (additional) contact details for the current > maintainer/author, Louis Wasserman? > 2) Is the package's repository available anywhere? The darcs link > listed in the package 404s. > 3) I would be willing to take over for basic maintenance if the > current maintainer is unavailable. > > The pqueue package does not compile with ghc-7.10. Fixing requires > just some quick changes (i have a working version locally). The last > upload for the package is from 2012, but the author's github account > lowasser shows some more recent activity. Yet I have not received a > reply to my e-mail from six weeks ago. > > Lennart > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > From danburton.email at gmail.com Wed Jun 24 21:11:42 2015 From: danburton.email at gmail.com (Dan Burton) Date: Wed, 24 Jun 2015 14:11:42 -0700 Subject: [Haskell-cafe] Fwd: taking over urlencoded In-Reply-To: References: Message-ID: Hackage admins can modify the dependency version constraints. I believe that any other edits require a new release of the package. -- Dan Burton On Wed, Jun 24, 2015 at 10:38 AM, Francesco Gazzetta wrote: > The package urlencoded > wasn't updated since 2012 and needs a minor modification in the .cabal file. > > The author was contacted half an year ago, but he didn't respond, so > -according to the instructions > on hackage- I state my > intention to take over. > > Or, more simply, can an hackage admin just edit the cabal file? > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at bergmark.nl Wed Jun 24 21:14:25 2015 From: adam at bergmark.nl (Adam Bergmark) Date: Wed, 24 Jun 2015 23:14:25 +0200 Subject: [Haskell-cafe] Fwd: taking over urlencoded In-Reply-To: References: Message-ID: Trustees can widen bounds or perform a non-maintainer upload if the regular maintainer is unavailable, as outlined here: Trustees can widen bounds as outlined here: https://gist.github.com/bergmark/76cafefb300546e9b90e#2-metadata-only-changes-relaxing-constraints I've opened an issue to track the progress: https://github.com/haskell-infra/hackage-trustees/issues/41 Cheers, Adam On Wed, Jun 24, 2015 at 11:11 PM, Dan Burton wrote: > Hackage admins can modify the dependency version constraints. I believe > that any other edits require a new release of the package. > > -- Dan Burton > > On Wed, Jun 24, 2015 at 10:38 AM, Francesco Gazzetta > wrote: > >> The package urlencoded >> wasn't updated since 2012 and needs a minor modification in the .cabal file. >> >> The author was contacted half an year ago, but he didn't respond, so >> -according to the instructions >> on hackage- I state my >> intention to take over. >> >> Or, more simply, can an hackage admin just edit the cabal file? >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> >> > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at bergmark.nl Wed Jun 24 21:21:24 2015 From: adam at bergmark.nl (Adam Bergmark) Date: Wed, 24 Jun 2015 23:21:24 +0200 Subject: [Haskell-cafe] pqueue - repository and maintainer (taking over) In-Reply-To: <558B1C11.6050308@informatik.uni-kiel.de> References: <55662287.7000201@informatik.uni-kiel.de> <558B1C11.6050308@informatik.uni-kiel.de> Message-ID: Glad to hear it! On Wed, Jun 24, 2015 at 11:07 PM, lennart spitzner < lsp at informatik.uni-kiel.de> wrote: > Greetings; finally an update: > > pqueue-1.3.0 is now live; finally ghc-7.10 compatibility :) > (tested with ghc-7.2 through ghc-7.10.2rc1.) > > Louis kindly made me co-maintainer. I created a github repo, so if I > forgot to update anything you can use the issue-tracker over there :) > > > Lennart > > > On 27/05/15 22:01, lennart spitzner wrote: > > Greetings, > > > > Regarding the pqueue package: > > > > 1) Does anyone have any (additional) contact details for the current > > maintainer/author, Louis Wasserman? > > 2) Is the package's repository available anywhere? The darcs link > > listed in the package 404s. > > 3) I would be willing to take over for basic maintenance if the > > current maintainer is unavailable. > > > > The pqueue package does not compile with ghc-7.10. Fixing requires > > just some quick changes (i have a working version locally). The last > > upload for the package is from 2012, but the author's github account > > lowasser shows some more recent activity. Yet I have not received a > > reply to my e-mail from six weeks ago. > > > > Lennart > > _______________________________________________ > > Haskell-Cafe mailing list > > Haskell-Cafe at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > > > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at bergmark.nl Wed Jun 24 21:35:24 2015 From: adam at bergmark.nl (Adam Bergmark) Date: Wed, 24 Jun 2015 23:35:24 +0200 Subject: [Haskell-cafe] Fwd: taking over urlencoded In-Reply-To: References: Message-ID: CC'ing the maintainer since that was left out, Hi Philip, your package urlencoded does not build with network-2.6. Please let us know whether you are able to upload a new version fixing this issue, otherwise I intend to perform a non-maintainer upload in two weeks with a package takeover to possibly follow after that. Cheers, Adam On Wed, Jun 24, 2015 at 11:14 PM, Adam Bergmark wrote: > Trustees can widen bounds or perform a non-maintainer upload if the > regular maintainer is unavailable, as outlined here: Trustees can widen > bounds as outlined here: > https://gist.github.com/bergmark/76cafefb300546e9b90e#2-metadata-only-changes-relaxing-constraints > > I've opened an issue to track the progress: > https://github.com/haskell-infra/hackage-trustees/issues/41 > > Cheers, > Adam > > > On Wed, Jun 24, 2015 at 11:11 PM, Dan Burton > wrote: > >> Hackage admins can modify the dependency version constraints. I believe >> that any other edits require a new release of the package. >> >> -- Dan Burton >> >> On Wed, Jun 24, 2015 at 10:38 AM, Francesco Gazzetta < >> francygazz at gmail.com> wrote: >> >>> The package urlencoded >>> wasn't updated since 2012 and needs a minor modification in the .cabal file. >>> >>> The author was contacted half an year ago, but he didn't respond, so >>> -according to the instructions >>> on hackage- I state my >>> intention to take over. >>> >>> Or, more simply, can an hackage admin just edit the cabal file? >>> >>> _______________________________________________ >>> Haskell-Cafe mailing list >>> Haskell-Cafe at haskell.org >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>> >>> >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From philip.weaver at gmail.com Wed Jun 24 21:42:44 2015 From: philip.weaver at gmail.com (Philip Weaver) Date: Wed, 24 Jun 2015 14:42:44 -0700 Subject: [Haskell-cafe] Fwd: taking over urlencoded In-Reply-To: References: Message-ID: I'm sorry, I haven't touched that package in years and don't have any interest in maintaining it. It looks like I became maintainer because it wasn't even in version control when I got my hands on it. Maybe someone else can take it over, or surely there is a better alternative out there somewhere? - Philip On Wed, Jun 24, 2015 at 2:35 PM, Adam Bergmark wrote: > CC'ing the maintainer since that was left out, > > Hi Philip, your package urlencoded does not build with network-2.6. Please > let us know whether you are able to upload a new version fixing this issue, > otherwise I intend to perform a non-maintainer upload in two weeks with a > package takeover to possibly follow after that. > > Cheers, > Adam > > > On Wed, Jun 24, 2015 at 11:14 PM, Adam Bergmark wrote: > >> Trustees can widen bounds or perform a non-maintainer upload if the >> regular maintainer is unavailable, as outlined here: Trustees can widen >> bounds as outlined here: >> https://gist.github.com/bergmark/76cafefb300546e9b90e#2-metadata-only-changes-relaxing-constraints >> >> I've opened an issue to track the progress: >> https://github.com/haskell-infra/hackage-trustees/issues/41 >> >> Cheers, >> Adam >> >> >> On Wed, Jun 24, 2015 at 11:11 PM, Dan Burton >> wrote: >> >>> Hackage admins can modify the dependency version constraints. I believe >>> that any other edits require a new release of the package. >>> >>> -- Dan Burton >>> >>> On Wed, Jun 24, 2015 at 10:38 AM, Francesco Gazzetta < >>> francygazz at gmail.com> wrote: >>> >>>> The package urlencoded >>>> wasn't updated since 2012 and needs a minor modification in the .cabal file. >>>> >>>> The author was contacted half an year ago, but he didn't respond, so >>>> -according to the instructions >>>> on hackage- I state >>>> my intention to take over. >>>> >>>> Or, more simply, can an hackage admin just edit the cabal file? >>>> >>>> _______________________________________________ >>>> Haskell-Cafe mailing list >>>> Haskell-Cafe at haskell.org >>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>> >>>> >>> >>> _______________________________________________ >>> Haskell-Cafe mailing list >>> Haskell-Cafe at haskell.org >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vigalchin at gmail.com Wed Jun 24 22:10:28 2015 From: vigalchin at gmail.com (Vasili I. Galchin) Date: Wed, 24 Jun 2015 15:10:28 -0700 Subject: [Haskell-cafe] Haskell support in Apache Spark (I am preparing) Message-ID: I am researching how to do. Hence, now is the time for everybody speak(!!) so I don't get blindsided, e.g. "I already did that" or "I am already working on that". Bad mojo. Vasili -------------- next part -------------- An HTML attachment was scrubbed... URL: From _deepfire at feelingofgreen.ru Thu Jun 25 06:44:16 2015 From: _deepfire at feelingofgreen.ru (Kosyrev Serge) Date: Thu, 25 Jun 2015 09:44:16 +0300 Subject: [Haskell-cafe] Promoting associated data types Message-ID: <87d20k9tj3.fsf@feelingofgreen.ru> Good day! DataKinds doesn't allow promotion of type/data families. However, in the specific case of associated data families -- aren't they constrained more, and sufficiently so that the following, for example, could be made to work without stepping into dangerous territories: -- {-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UnicodeSyntax #-} module M where class C a where data D a ? * data I instance C I where data D I class C1 a (b ? D I) where -- ..or, maybe, perhaps even the following: class C1 a (b ? D) where -- respectfully, ??????? ?????? From palotai.robin at gmail.com Thu Jun 25 06:55:11 2015 From: palotai.robin at gmail.com (Robin Palotai) Date: Thu, 25 Jun 2015 06:55:11 +0000 Subject: [Haskell-cafe] Haskell support in Apache Spark (I am preparing) In-Reply-To: References: Message-ID: Just FYI that anecdotally "I'm already working on it" is not a good reason why you shouldn't, as chances are high that the wip never gets finished. Also, heterogeneity is healthy for development. Best regards, Robin On Thu, Jun 25, 2015, 12:10 AM Vasili I. Galchin wrote: > I am researching how to do. Hence, now is the time for everybody speak(!!) > so I don't get blindsided, e.g. "I already did that" or "I am already > working on that". Bad mojo. > > Vasili > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vigalchin at gmail.com Thu Jun 25 07:06:13 2015 From: vigalchin at gmail.com (Vasili I. Galchin) Date: Thu, 25 Jun 2015 00:06:13 -0700 Subject: [Haskell-cafe] Haskell support in Apache Spark (I am preparing) In-Reply-To: References: Message-ID: What is."wip"? I don't like waste time out of life for heterogenity(sorry Robin). My passion is pure maths. I am just trying to promote Haskell a recalcitrant industry :-( Vas On Thursday, June 25, 2015, Robin Palotai wrote: > Just FYI that anecdotally "I'm already working on it" is not a good reason > why you shouldn't, as chances are high that the wip never gets finished. > > Also, heterogeneity is healthy for development. > > Best regards, > Robin > > On Thu, Jun 25, 2015, 12:10 AM Vasili I. Galchin > wrote: > >> I am researching how to do. Hence, now is the time for everybody >> speak(!!) so I don't get blindsided, e.g. "I already did that" or "I am >> already working on that". Bad mojo. >> >> Vasili >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joehillen at gmail.com Thu Jun 25 07:29:20 2015 From: joehillen at gmail.com (Joe Hillenbrand) Date: Thu, 25 Jun 2015 00:29:20 -0700 Subject: [Haskell-cafe] Haskell support in Apache Spark (I am preparing) In-Reply-To: References: Message-ID: WIP stands for Work In Progress On Thu, Jun 25, 2015 at 12:06 AM, Vasili I. Galchin wrote: > What is."wip"? > > I don't like waste time out of life for heterogenity(sorry Robin). My > passion is pure maths. I am just trying to promote Haskell a recalcitrant > industry :-( > > Vas > > > On Thursday, June 25, 2015, Robin Palotai wrote: >> >> Just FYI that anecdotally "I'm already working on it" is not a good reason >> why you shouldn't, as chances are high that the wip never gets finished. >> >> Also, heterogeneity is healthy for development. >> >> Best regards, >> Robin >> >> >> On Thu, Jun 25, 2015, 12:10 AM Vasili I. Galchin >> wrote: >>> >>> I am researching how to do. Hence, now is the time for everybody >>> speak(!!) so I don't get blindsided, e.g. "I already did that" or "I am >>> already working on that". Bad mojo. >>> >>> Vasili >>> _______________________________________________ >>> Haskell-Cafe mailing list >>> Haskell-Cafe at haskell.org >>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > From nicholls.mark at vimn.com Thu Jun 25 07:55:48 2015 From: nicholls.mark at vimn.com (Nicholls, Mark) Date: Thu, 25 Jun 2015 07:55:48 +0000 Subject: [Haskell-cafe] Advice gfx library Message-ID: <33157124-F2F9-4A63-971E-4E9B2C1C2EC0@vimn.com> I am interested in writing some real code now! What i could do with is a gfx library that Can render mpeg/mov files Scale Transform etc Is simple! Runs on windows in some form Ive got hudaks book about multimedia, and understand the general reactive idea behind it....i want to build on top of that Ive nosed around gloss and grapefruit, but the mpeg piece seems missing from these Any ideas? Excuse the spelling, sent from a phone with itty bitty keys, it like trying to sow a button on a shirt with a sausage. CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. From ruben.astud at gmail.com Thu Jun 25 09:44:32 2015 From: ruben.astud at gmail.com (Ruben Astudillo) Date: Thu, 25 Jun 2015 06:44:32 -0300 Subject: [Haskell-cafe] Haskell users on Chile In-Reply-To: References: <5576D88E.7090203@gmail.com> <3102A7DE-6DEB-4B5B-B322-060E3ED07C17@dcc.uchile.cl> <5584214C.30003@ucv.cl> <55844BC6.2000308@gmail.com> Message-ID: <558BCD80.6000200@gmail.com> On 24/06/15 16:18, Anupam Jain wrote: > Sure I can do that. It would help if the group was already created though. > Do you want any help setting up a mailing list or something? I set-up a mailing list on google groups here: https://groups.google.com/forum/#!forum/haskellchile If you got problems or want to also be a maintainer send me a mail. Also I should set up a channel on freenode, but that one ought to be easy. #haskell-chile should do. For the time being we should reefer to people interested to the mailing list. -- Ruben Astudillo. pgp: 0x3C332311 , usala en lo posible :-) Crear un haiku, en diecisiete silabas, es complica... From adam at bergmark.nl Thu Jun 25 09:55:59 2015 From: adam at bergmark.nl (Adam Bergmark) Date: Thu, 25 Jun 2015 11:55:59 +0200 Subject: [Haskell-cafe] Fwd: taking over urlencoded In-Reply-To: References: Message-ID: Thank you for replying Philip, The quickest way to transfer maintainership and resolve this would be for you add a new maintainer here: http://hackage.haskell.org/package/urlencoded/maintainers/edit Francesco, what is your hackage username? - Adam On Wed, Jun 24, 2015 at 11:42 PM, Philip Weaver wrote: > I'm sorry, I haven't touched that package in years and don't have any > interest in maintaining it. It looks like I became maintainer because it > wasn't even in version control when I got my hands on it. Maybe someone > else can take it over, or surely there is a better alternative out there > somewhere? > > - Philip > > On Wed, Jun 24, 2015 at 2:35 PM, Adam Bergmark wrote: > >> CC'ing the maintainer since that was left out, >> >> Hi Philip, your package urlencoded does not build with network-2.6. >> Please let us know whether you are able to upload a new version fixing this >> issue, otherwise I intend to perform a non-maintainer upload in two weeks >> with a package takeover to possibly follow after that. >> >> Cheers, >> Adam >> >> >> On Wed, Jun 24, 2015 at 11:14 PM, Adam Bergmark wrote: >> >>> Trustees can widen bounds or perform a non-maintainer upload if the >>> regular maintainer is unavailable, as outlined here: Trustees can widen >>> bounds as outlined here: >>> https://gist.github.com/bergmark/76cafefb300546e9b90e#2-metadata-only-changes-relaxing-constraints >>> >>> I've opened an issue to track the progress: >>> https://github.com/haskell-infra/hackage-trustees/issues/41 >>> >>> Cheers, >>> Adam >>> >>> >>> On Wed, Jun 24, 2015 at 11:11 PM, Dan Burton >>> wrote: >>> >>>> Hackage admins can modify the dependency version constraints. I believe >>>> that any other edits require a new release of the package. >>>> >>>> -- Dan Burton >>>> >>>> On Wed, Jun 24, 2015 at 10:38 AM, Francesco Gazzetta < >>>> francygazz at gmail.com> wrote: >>>> >>>>> The package urlencoded >>>>> wasn't updated since >>>>> 2012 and needs a minor modification in the .cabal file. >>>>> >>>>> The author was contacted half an year ago, but he didn't respond, so >>>>> -according to the instructions >>>>> on hackage- I state >>>>> my intention to take over. >>>>> >>>>> Or, more simply, can an hackage admin just edit the cabal file? >>>>> >>>>> _______________________________________________ >>>>> Haskell-Cafe mailing list >>>>> Haskell-Cafe at haskell.org >>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> Haskell-Cafe mailing list >>>> Haskell-Cafe at haskell.org >>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eir at cis.upenn.edu Thu Jun 25 12:31:15 2015 From: eir at cis.upenn.edu (Richard Eisenberg) Date: Thu, 25 Jun 2015 08:31:15 -0400 Subject: [Haskell-cafe] Promoting associated data types In-Reply-To: <87d20k9tj3.fsf@feelingofgreen.ru> References: <87d20k9tj3.fsf@feelingofgreen.ru> Message-ID: <0F217E8E-48F4-4714-91B0-EA2D88F5296B@cis.upenn.edu> Hi ???????, Promoting type/data families isn't a matter of safety, exactly, but a matter of drastically altering the internal type system of GHC to support such things. Happily, my research is all about doing so. You can expect your first example `class C1 a (b :: D I)` to work in GHC 7.12. If you're overly interested, my work is happening at github.com/goldfirere/ghc on the `nokinds` branch. But there won't be much (any?) action there for a little while as I'm working on anther project for the next few weeks. Your second example, though, is ill-formed: you can't have a type variable of kind `D`, as `D`, by itself, isn't a kind. You could say this, if you wanted, though: > class C1 a (b :: D a) Do you have an use case for this? I'm always curious to see how Haskellers want to use these advanced features! Thanks, Richard On Jun 25, 2015, at 2:44 AM, Kosyrev Serge <_deepfire at feelingofgreen.ru> wrote: > Good day! > > DataKinds doesn't allow promotion of type/data families. > > However, in the specific case of associated data families -- aren't > they constrained more, and sufficiently so that the following, for example, > could be made to work without stepping into dangerous territories: > > -- > {-# LANGUAGE DataKinds #-} > {-# LANGUAGE KindSignatures #-} > {-# LANGUAGE TypeFamilies #-} > {-# LANGUAGE UnicodeSyntax #-} > > module M where > > class C a where > data D a ? * > > data I > > instance C I where > data D I > > class C1 a (b ? D I) where > > -- ..or, maybe, perhaps even the following: > > class C1 a (b ? D) where > > -- > respectfully, > ??????? ?????? > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > From francygazz at gmail.com Thu Jun 25 13:49:53 2015 From: francygazz at gmail.com (Francesco Gazzetta) Date: Thu, 25 Jun 2015 15:49:53 +0200 Subject: [Haskell-cafe] Fwd: taking over urlencoded In-Reply-To: References: Message-ID: My hackage username is fgaz There are urlDecode and urlEncode in Network.HTTP.Base, but your package provides some very useful functions. - Francesco 2015-06-25 11:55 GMT+02:00 Adam Bergmark : > Thank you for replying Philip, > > The quickest way to transfer maintainership and resolve this would be for > you add a new maintainer here: > http://hackage.haskell.org/package/urlencoded/maintainers/edit > > Francesco, what is your hackage username? > > - Adam > > > On Wed, Jun 24, 2015 at 11:42 PM, Philip Weaver > wrote: > >> I'm sorry, I haven't touched that package in years and don't have any >> interest in maintaining it. It looks like I became maintainer because it >> wasn't even in version control when I got my hands on it. Maybe someone >> else can take it over, or surely there is a better alternative out there >> somewhere? >> >> - Philip >> >> On Wed, Jun 24, 2015 at 2:35 PM, Adam Bergmark wrote: >> >>> CC'ing the maintainer since that was left out, >>> >>> Hi Philip, your package urlencoded does not build with network-2.6. >>> Please let us know whether you are able to upload a new version fixing this >>> issue, otherwise I intend to perform a non-maintainer upload in two weeks >>> with a package takeover to possibly follow after that. >>> >>> Cheers, >>> Adam >>> >>> >>> On Wed, Jun 24, 2015 at 11:14 PM, Adam Bergmark >>> wrote: >>> >>>> Trustees can widen bounds or perform a non-maintainer upload if the >>>> regular maintainer is unavailable, as outlined here: Trustees can widen >>>> bounds as outlined here: >>>> https://gist.github.com/bergmark/76cafefb300546e9b90e#2-metadata-only-changes-relaxing-constraints >>>> >>>> I've opened an issue to track the progress: >>>> https://github.com/haskell-infra/hackage-trustees/issues/41 >>>> >>>> Cheers, >>>> Adam >>>> >>>> >>>> On Wed, Jun 24, 2015 at 11:11 PM, Dan Burton >>> > wrote: >>>> >>>>> Hackage admins can modify the dependency version constraints. I >>>>> believe that any other edits require a new release of the package. >>>>> >>>>> -- Dan Burton >>>>> >>>>> On Wed, Jun 24, 2015 at 10:38 AM, Francesco Gazzetta < >>>>> francygazz at gmail.com> wrote: >>>>> >>>>>> The package urlencoded >>>>>> wasn't updated >>>>>> since 2012 and needs a minor modification in the .cabal file. >>>>>> >>>>>> The author was contacted half an year ago, but he didn't respond, so >>>>>> -according to the instructions >>>>>> on hackage- I state >>>>>> my intention to take over. >>>>>> >>>>>> Or, more simply, can an hackage admin just edit the cabal file? >>>>>> >>>>>> _______________________________________________ >>>>>> Haskell-Cafe mailing list >>>>>> Haskell-Cafe at haskell.org >>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> Haskell-Cafe mailing list >>>>> Haskell-Cafe at haskell.org >>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajnsit at gmail.com Thu Jun 25 14:04:57 2015 From: ajnsit at gmail.com (Anupam Jain) Date: Thu, 25 Jun 2015 19:34:57 +0530 Subject: [Haskell-cafe] Haskell users on Chile In-Reply-To: <558BCD80.6000200@gmail.com> References: <5576D88E.7090203@gmail.com> <3102A7DE-6DEB-4B5B-B322-060E3ED07C17@dcc.uchile.cl> <5584214C.30003@ucv.cl> <55844BC6.2000308@gmail.com> <558BCD80.6000200@gmail.com> Message-ID: On Thu, Jun 25, 2015 at 3:14 PM, Ruben Astudillo wrote: > On 24/06/15 16:18, Anupam Jain wrote: >> >> Sure I can do that. It would help if the group was already created though. >> Do you want any help setting up a mailing list or something? > > > I set-up a mailing list on google groups here: > https://groups.google.com/forum/#!forum/haskellchile > If you got problems or want to also be a maintainer send me a mail. > > Also I should set up a channel on freenode, but that one ought to be easy. > #haskell-chile should do. For the time being we should reefer to people > interested to the mailing list. Looks good! I have posted the link to the Startup Chile message board. -- Anupam From ajnsit at gmail.com Thu Jun 25 14:20:38 2015 From: ajnsit at gmail.com (Anupam Jain) Date: Thu, 25 Jun 2015 19:50:38 +0530 Subject: [Haskell-cafe] Higher Kinded Void Message-ID: Hi all, I currently have some code for which I require a uninhabitable Functor. I currently just use - data VoidF a instance Functor VoidF where fmap = undefined Is there a reason something like this is not in the package void? Perhaps we could even have Void1 with kind * -> *, Void2 with kind * -> * -> * etc. I opened a github issue a few days ago but haven't received a response from ekmett yet - https://github.com/ekmett/void/issues/9 -- Anupam From philip.weaver at gmail.com Thu Jun 25 19:00:01 2015 From: philip.weaver at gmail.com (Philip Weaver) Date: Thu, 25 Jun 2015 12:00:01 -0700 Subject: [Haskell-cafe] Fwd: taking over urlencoded In-Reply-To: References: Message-ID: done. On Thu, Jun 25, 2015 at 6:49 AM, Francesco Gazzetta wrote: > My hackage username is fgaz > > There are urlDecode and urlEncode in Network.HTTP.Base, but your package > provides some very useful functions. > > - Francesco > > > 2015-06-25 11:55 GMT+02:00 Adam Bergmark : > >> Thank you for replying Philip, >> >> The quickest way to transfer maintainership and resolve this would be for >> you add a new maintainer here: >> http://hackage.haskell.org/package/urlencoded/maintainers/edit >> >> Francesco, what is your hackage username? >> >> - Adam >> >> >> On Wed, Jun 24, 2015 at 11:42 PM, Philip Weaver >> wrote: >> >>> I'm sorry, I haven't touched that package in years and don't have any >>> interest in maintaining it. It looks like I became maintainer because it >>> wasn't even in version control when I got my hands on it. Maybe someone >>> else can take it over, or surely there is a better alternative out there >>> somewhere? >>> >>> - Philip >>> >>> On Wed, Jun 24, 2015 at 2:35 PM, Adam Bergmark wrote: >>> >>>> CC'ing the maintainer since that was left out, >>>> >>>> Hi Philip, your package urlencoded does not build with network-2.6. >>>> Please let us know whether you are able to upload a new version fixing this >>>> issue, otherwise I intend to perform a non-maintainer upload in two weeks >>>> with a package takeover to possibly follow after that. >>>> >>>> Cheers, >>>> Adam >>>> >>>> >>>> On Wed, Jun 24, 2015 at 11:14 PM, Adam Bergmark >>>> wrote: >>>> >>>>> Trustees can widen bounds or perform a non-maintainer upload if the >>>>> regular maintainer is unavailable, as outlined here: Trustees can widen >>>>> bounds as outlined here: >>>>> https://gist.github.com/bergmark/76cafefb300546e9b90e#2-metadata-only-changes-relaxing-constraints >>>>> >>>>> I've opened an issue to track the progress: >>>>> https://github.com/haskell-infra/hackage-trustees/issues/41 >>>>> >>>>> Cheers, >>>>> Adam >>>>> >>>>> >>>>> On Wed, Jun 24, 2015 at 11:11 PM, Dan Burton < >>>>> danburton.email at gmail.com> wrote: >>>>> >>>>>> Hackage admins can modify the dependency version constraints. I >>>>>> believe that any other edits require a new release of the package. >>>>>> >>>>>> -- Dan Burton >>>>>> >>>>>> On Wed, Jun 24, 2015 at 10:38 AM, Francesco Gazzetta < >>>>>> francygazz at gmail.com> wrote: >>>>>> >>>>>>> The package urlencoded >>>>>>> wasn't updated >>>>>>> since 2012 and needs a minor modification in the .cabal file. >>>>>>> >>>>>>> The author was contacted half an year ago, but he didn't respond, so >>>>>>> -according to the instructions >>>>>>> on hackage- I >>>>>>> state my intention to take over. >>>>>>> >>>>>>> Or, more simply, can an hackage admin just edit the cabal file? >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Haskell-Cafe mailing list >>>>>>> Haskell-Cafe at haskell.org >>>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>>>>> >>>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Haskell-Cafe mailing list >>>>>> Haskell-Cafe at haskell.org >>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>>>> >>>>>> >>>>> >>>> >>> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk Thu Jun 25 19:11:46 2015 From: tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk (Tom Ellis) Date: Thu, 25 Jun 2015 20:11:46 +0100 Subject: [Haskell-cafe] Higher Kinded Void In-Reply-To: References: Message-ID: <20150625191146.GH16514@weber> On Thu, Jun 25, 2015 at 07:50:38PM +0530, Anupam Jain wrote: > data VoidF a > instance Functor VoidF where > fmap = undefined > > Is there a reason something like this is not in the package void? > Perhaps we could even have Void1 with kind * -> *, Void2 with kind * > -> * -> * etc. You could use 'Const Void', 'Const (Const Void)' etc.. (Const is in Control.Applicative) From adam at bergmark.nl Thu Jun 25 20:56:53 2015 From: adam at bergmark.nl (Adam Bergmark) Date: Thu, 25 Jun 2015 22:56:53 +0200 Subject: [Haskell-cafe] Fwd: taking over urlencoded In-Reply-To: References: Message-ID: Thank you! On Thu, Jun 25, 2015 at 9:00 PM, Philip Weaver wrote: > done. > > On Thu, Jun 25, 2015 at 6:49 AM, Francesco Gazzetta > wrote: > >> My hackage username is fgaz >> >> There are urlDecode and urlEncode in Network.HTTP.Base, but your package >> provides some very useful functions. >> >> - Francesco >> >> >> 2015-06-25 11:55 GMT+02:00 Adam Bergmark : >> >>> Thank you for replying Philip, >>> >>> The quickest way to transfer maintainership and resolve this would be >>> for you add a new maintainer here: >>> http://hackage.haskell.org/package/urlencoded/maintainers/edit >>> >>> Francesco, what is your hackage username? >>> >>> - Adam >>> >>> >>> On Wed, Jun 24, 2015 at 11:42 PM, Philip Weaver >> > wrote: >>> >>>> I'm sorry, I haven't touched that package in years and don't have any >>>> interest in maintaining it. It looks like I became maintainer because it >>>> wasn't even in version control when I got my hands on it. Maybe someone >>>> else can take it over, or surely there is a better alternative out there >>>> somewhere? >>>> >>>> - Philip >>>> >>>> On Wed, Jun 24, 2015 at 2:35 PM, Adam Bergmark >>>> wrote: >>>> >>>>> CC'ing the maintainer since that was left out, >>>>> >>>>> Hi Philip, your package urlencoded does not build with network-2.6. >>>>> Please let us know whether you are able to upload a new version fixing this >>>>> issue, otherwise I intend to perform a non-maintainer upload in two weeks >>>>> with a package takeover to possibly follow after that. >>>>> >>>>> Cheers, >>>>> Adam >>>>> >>>>> >>>>> On Wed, Jun 24, 2015 at 11:14 PM, Adam Bergmark >>>>> wrote: >>>>> >>>>>> Trustees can widen bounds or perform a non-maintainer upload if the >>>>>> regular maintainer is unavailable, as outlined here: Trustees can widen >>>>>> bounds as outlined here: >>>>>> https://gist.github.com/bergmark/76cafefb300546e9b90e#2-metadata-only-changes-relaxing-constraints >>>>>> >>>>>> I've opened an issue to track the progress: >>>>>> https://github.com/haskell-infra/hackage-trustees/issues/41 >>>>>> >>>>>> Cheers, >>>>>> Adam >>>>>> >>>>>> >>>>>> On Wed, Jun 24, 2015 at 11:11 PM, Dan Burton < >>>>>> danburton.email at gmail.com> wrote: >>>>>> >>>>>>> Hackage admins can modify the dependency version constraints. I >>>>>>> believe that any other edits require a new release of the package. >>>>>>> >>>>>>> -- Dan Burton >>>>>>> >>>>>>> On Wed, Jun 24, 2015 at 10:38 AM, Francesco Gazzetta < >>>>>>> francygazz at gmail.com> wrote: >>>>>>> >>>>>>>> The package urlencoded >>>>>>>> wasn't updated >>>>>>>> since 2012 and needs a minor modification in the .cabal file. >>>>>>>> >>>>>>>> The author was contacted half an year ago, but he didn't respond, >>>>>>>> so -according to the instructions >>>>>>>> on hackage- I >>>>>>>> state my intention to take over. >>>>>>>> >>>>>>>> Or, more simply, can an hackage admin just edit the cabal file? >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Haskell-Cafe mailing list >>>>>>>> Haskell-Cafe at haskell.org >>>>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Haskell-Cafe mailing list >>>>>>> Haskell-Cafe at haskell.org >>>>>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alpmestan at gmail.com Fri Jun 26 08:24:09 2015 From: alpmestan at gmail.com (Alp Mestanogullari) Date: Fri, 26 Jun 2015 10:24:09 +0200 Subject: [Haskell-cafe] Promoting associated data types In-Reply-To: <0F217E8E-48F4-4714-91B0-EA2D88F5296B@cis.upenn.edu> References: <87d20k9tj3.fsf@feelingofgreen.ru> <0F217E8E-48F4-4714-91B0-EA2D88F5296B@cis.upenn.edu> Message-ID: Hello, Sorry to chime in, but Richard: could you expand a little bit on what your ongoing work there consists in and what will be possible that wasn't before? You got me quite curious here. Thanks! On Thu, Jun 25, 2015 at 2:31 PM, Richard Eisenberg wrote: > Hi ???????, > > Promoting type/data families isn't a matter of safety, exactly, but a > matter of drastically altering the internal type system of GHC to support > such things. Happily, my research is all about doing so. You can expect > your first example `class C1 a (b :: D I)` to work in GHC 7.12. If you're > overly interested, my work is happening at github.com/goldfirere/ghc on > the `nokinds` branch. But there won't be much (any?) action there for a > little while as I'm working on anther project for the next few weeks. > > Your second example, though, is ill-formed: you can't have a type variable > of kind `D`, as `D`, by itself, isn't a kind. You could say this, if you > wanted, though: > > > class C1 a (b :: D a) > > Do you have an use case for this? I'm always curious to see how Haskellers > want to use these advanced features! > > Thanks, > Richard > > On Jun 25, 2015, at 2:44 AM, Kosyrev Serge <_deepfire at feelingofgreen.ru> > wrote: > > > Good day! > > > > DataKinds doesn't allow promotion of type/data families. > > > > However, in the specific case of associated data families -- aren't > > they constrained more, and sufficiently so that the following, for > example, > > could be made to work without stepping into dangerous territories: > > > > -- > > {-# LANGUAGE DataKinds #-} > > {-# LANGUAGE KindSignatures #-} > > {-# LANGUAGE TypeFamilies #-} > > {-# LANGUAGE UnicodeSyntax #-} > > > > module M where > > > > class C a where > > data D a ? * > > > > data I > > > > instance C I where > > data D I > > > > class C1 a (b ? D I) where > > > > -- ..or, maybe, perhaps even the following: > > > > class C1 a (b ? D) where > > > > -- > > respectfully, > > ??????? ?????? > > _______________________________________________ > > Haskell-Cafe mailing list > > Haskell-Cafe at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -- Alp Mestanogullari -------------- next part -------------- An HTML attachment was scrubbed... URL: From eir at cis.upenn.edu Fri Jun 26 16:30:50 2015 From: eir at cis.upenn.edu (Richard Eisenberg) Date: Fri, 26 Jun 2015 12:30:50 -0400 Subject: [Haskell-cafe] Promoting associated data types In-Reply-To: References: <87d20k9tj3.fsf@feelingofgreen.ru> <0F217E8E-48F4-4714-91B0-EA2D88F5296B@cis.upenn.edu> Message-ID: <9F1A8DAF-9B27-4F78-A9B5-13C5C9412C7D@cis.upenn.edu> A wiki page is desperately needed about this. One which I'll have to create after the POPL deadline (July 10). In the meantime, I'll summarize: The plan is to merge GHC's type language with its kind language. That is, there will be no difference, at all, between types and kinds. So any type family is now also a kind family, you can have unsaturated kinds, etc. Having merged types and kinds, it is also convenient to have (* :: *). That is, the type of * will be *. Other languages (Idris/Coq/Agda) avoid this simplification (preferring something *0 :: *1 :: *2 :: *3 :: ...) because they require logical consistency in order to be type-safe. Haskell doesn't (for reasons that are beyond the scope of this email) so our type system can be simpler, at least in this regard. The user-facing effects of this change should all be positive. All existing programs will continue to work (of course!), and I am being very careful not to degrade error messages. In particular, error messages will continue to mention types and kinds as separate entities, because this distinction is helpful to users. Kind parameters will remain invisible (implicit) in all code that compiles today. But, new, wonderful things are allowed. Like these: data Proxy k (a :: k) = Proxy -- note the visible (explicit) kind parameter k! data (a :: k1) :~~: (b :: k2) where -- heterogeneous equality HRefl :: a :~~: a data G a where MkG :: G Bool data H a (g :: G a) where MkH :: a -> H a g foo :: H Bool 'MkG foo = MkH True type family KindOf (a :: k) :: * type instance KindOf (a :: k) = k ... and other fun stuff. Richard On Jun 26, 2015, at 4:24 AM, Alp Mestanogullari wrote: > Hello, > > Sorry to chime in, but Richard: could you expand a little bit on what your ongoing work there consists in and what will be possible that wasn't before? You got me quite curious here. > > Thanks! > > On Thu, Jun 25, 2015 at 2:31 PM, Richard Eisenberg wrote: > Hi ???????, > > Promoting type/data families isn't a matter of safety, exactly, but a matter of drastically altering the internal type system of GHC to support such things. Happily, my research is all about doing so. You can expect your first example `class C1 a (b :: D I)` to work in GHC 7.12. If you're overly interested, my work is happening at github.com/goldfirere/ghc on the `nokinds` branch. But there won't be much (any?) action there for a little while as I'm working on anther project for the next few weeks. > > Your second example, though, is ill-formed: you can't have a type variable of kind `D`, as `D`, by itself, isn't a kind. You could say this, if you wanted, though: > > > class C1 a (b :: D a) > > Do you have an use case for this? I'm always curious to see how Haskellers want to use these advanced features! > > Thanks, > Richard > > On Jun 25, 2015, at 2:44 AM, Kosyrev Serge <_deepfire at feelingofgreen.ru> wrote: > > > Good day! > > > > DataKinds doesn't allow promotion of type/data families. > > > > However, in the specific case of associated data families -- aren't > > they constrained more, and sufficiently so that the following, for example, > > could be made to work without stepping into dangerous territories: > > > > -- > > {-# LANGUAGE DataKinds #-} > > {-# LANGUAGE KindSignatures #-} > > {-# LANGUAGE TypeFamilies #-} > > {-# LANGUAGE UnicodeSyntax #-} > > > > module M where > > > > class C a where > > data D a ? * > > > > data I > > > > instance C I where > > data D I > > > > class C1 a (b ? D I) where > > > > -- ..or, maybe, perhaps even the following: > > > > class C1 a (b ? D) where > > > > -- > > respectfully, > > ??????? ?????? > > _______________________________________________ > > Haskell-Cafe mailing list > > Haskell-Cafe at haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > > > -- > Alp Mestanogullari -------------- next part -------------- An HTML attachment was scrubbed... URL: From manny at fpcomplete.com Fri Jun 26 17:21:51 2015 From: manny at fpcomplete.com (Emanuel Borsboom) Date: Fri, 26 Jun 2015 10:21:51 -0700 Subject: [Haskell-cafe] ANN: stack-0.1.1.0 Message-ID: New release of stack, a build tool. Changes: https://github.com/commercialhaskell/stack/releases/tag/v0.1.1.0 General information and download links: https://github.com/commercialhaskell/stack#readme This version includes a 'stack upgrade' command, which will make to much easier to upgrade to the NEXT version (but unfortunately you'll have to get this version the old way). From heraldhoi at gmail.com Fri Jun 26 17:24:47 2015 From: heraldhoi at gmail.com (Geraldus) Date: Fri, 26 Jun 2015 17:24:47 +0000 Subject: [Haskell-cafe] Generalizing a library In-Reply-To: References: Message-ID: Sorry for late response! So likely CPP is the only option. Thank you, Adam! I know GHCJS also sets similar variable and I think it is possible to check compiler using `impl(ghcjs)` in cabal file and have conditional dependencies list (correct me if I wrong). But I don't know if Haste has similar var and flag. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alpmestan at gmail.com Fri Jun 26 23:09:31 2015 From: alpmestan at gmail.com (Alp Mestanogullari) Date: Sat, 27 Jun 2015 01:09:31 +0200 Subject: [Haskell-cafe] Promoting associated data types In-Reply-To: <9F1A8DAF-9B27-4F78-A9B5-13C5C9412C7D@cis.upenn.edu> References: <87d20k9tj3.fsf@feelingofgreen.ru> <0F217E8E-48F4-4714-91B0-EA2D88F5296B@cis.upenn.edu> <9F1A8DAF-9B27-4F78-A9B5-13C5C9412C7D@cis.upenn.edu> Message-ID: This all looks very interesting, thanks for the summary! Le 26 juin 2015 17:31, "Richard Eisenberg" a ?crit : > A wiki page is desperately needed about this. One which I'll have to > create after the POPL deadline (July 10). > > In the meantime, I'll summarize: > > The plan is to merge GHC's type language with its kind language. That is, > there will be no difference, at all, between types and kinds. So any type > family is now also a kind family, you can have unsaturated kinds, etc. > Having merged types and kinds, it is also convenient to have (* :: *). That > is, the type of * will be *. Other languages (Idris/Coq/Agda) avoid this > simplification (preferring something *0 :: *1 :: *2 :: *3 :: ...) because > they require logical consistency in order to be type-safe. Haskell doesn't > (for reasons that are beyond the scope of this email) so our type system > can be simpler, at least in this regard. > > The user-facing effects of this change should all be positive. All > existing programs will continue to work (of course!), and I am being very > careful not to degrade error messages. In particular, error messages will > continue to mention types and kinds as separate entities, because this > distinction is helpful to users. Kind parameters will remain invisible > (implicit) in all code that compiles today. > > But, new, wonderful things are allowed. Like these: > > data Proxy k (a :: k) = Proxy -- note the visible (explicit) kind > parameter k! > > data (a :: k1) :~~: (b :: k2) where -- heterogeneous equality > HRefl :: a :~~: a > > data G a where > MkG :: G Bool > data H a (g :: G a) where > MkH :: a -> H a g > foo :: H Bool 'MkG > foo = MkH True > > type family KindOf (a :: k) :: * > type instance KindOf (a :: k) = k > > ... and other fun stuff. > > Richard > > On Jun 26, 2015, at 4:24 AM, Alp Mestanogullari > wrote: > > Hello, > > Sorry to chime in, but Richard: could you expand a little bit on what your > ongoing work there consists in and what will be possible that wasn't > before? You got me quite curious here. > > Thanks! > > On Thu, Jun 25, 2015 at 2:31 PM, Richard Eisenberg > wrote: > >> Hi ???????, >> >> Promoting type/data families isn't a matter of safety, exactly, but a >> matter of drastically altering the internal type system of GHC to support >> such things. Happily, my research is all about doing so. You can expect >> your first example `class C1 a (b :: D I)` to work in GHC 7.12. If you're >> overly interested, my work is happening at github.com/goldfirere/ghc on >> the `nokinds` branch. But there won't be much (any?) action there for a >> little while as I'm working on anther project for the next few weeks. >> >> Your second example, though, is ill-formed: you can't have a type >> variable of kind `D`, as `D`, by itself, isn't a kind. You could say this, >> if you wanted, though: >> >> > class C1 a (b :: D a) >> >> Do you have an use case for this? I'm always curious to see how >> Haskellers want to use these advanced features! >> >> Thanks, >> Richard >> >> On Jun 25, 2015, at 2:44 AM, Kosyrev Serge <_deepfire at feelingofgreen.ru> >> wrote: >> >> > Good day! >> > >> > DataKinds doesn't allow promotion of type/data families. >> > >> > However, in the specific case of associated data families -- aren't >> > they constrained more, and sufficiently so that the following, for >> example, >> > could be made to work without stepping into dangerous territories: >> > >> > -- >> > {-# LANGUAGE DataKinds #-} >> > {-# LANGUAGE KindSignatures #-} >> > {-# LANGUAGE TypeFamilies #-} >> > {-# LANGUAGE UnicodeSyntax #-} >> > >> > module M where >> > >> > class C a where >> > data D a ? * >> > >> > data I >> > >> > instance C I where >> > data D I >> > >> > class C1 a (b ? D I) where >> > >> > -- ..or, maybe, perhaps even the following: >> > >> > class C1 a (b ? D) where >> > >> > -- >> > respectfully, >> > ??????? ?????? >> > _______________________________________________ >> > Haskell-Cafe mailing list >> > Haskell-Cafe at haskell.org >> > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> > >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> > > > > -- > Alp Mestanogullari > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajnsit at gmail.com Sat Jun 27 11:35:15 2015 From: ajnsit at gmail.com (Anupam Jain) Date: Sat, 27 Jun 2015 17:05:15 +0530 Subject: [Haskell-cafe] Higher Kinded Void In-Reply-To: <20150625191146.GH16514@weber> References: <20150625191146.GH16514@weber> Message-ID: On Friday, June 26, 2015, Tom Ellis < tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk> wrote: > On Thu, Jun 25, 2015 at 07:50:38PM +0530, Anupam Jain wrote: > > data VoidF a > > instance Functor VoidF where > > fmap = undefined > > > > Is there a reason something like this is not in the package void? > > Perhaps we could even have Void1 with kind * -> *, Void2 with kind * > > -> * -> * etc. > > You could use 'Const Void', 'Const (Const Void)' etc.. > > (Const is in Control.Applicative) Yes that's perfect! Thanks! -- Anupam -- Sent from my hyper-communicator -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcin.jan.mrotek at gmail.com Sat Jun 27 13:02:10 2015 From: marcin.jan.mrotek at gmail.com (Marcin Mrotek) Date: Sat, 27 Jun 2015 15:02:10 +0200 Subject: [Haskell-cafe] Promoting associated data types In-Reply-To: References: <87d20k9tj3.fsf@feelingofgreen.ru> <0F217E8E-48F4-4714-91B0-EA2D88F5296B@cis.upenn.edu> <9F1A8DAF-9B27-4F78-A9B5-13C5C9412C7D@cis.upenn.edu> Message-ID: Hello, As for use cases of promoted data families, I see a very simple one with https://hackage.haskell.org/package/vinyl Instead of having to define in one go all tags that can be used together: data Field = Foo | Bar | Baz | ... one could add them in separate modules. Best regards, Marcin Mrotek From stefan.reich.maker.of.eye at googlemail.com Sat Jun 27 18:14:31 2015 From: stefan.reich.maker.of.eye at googlemail.com (Stefan Reich) Date: Sat, 27 Jun 2015 20:14:31 +0200 Subject: [Haskell-cafe] Tokeninng Haskell for future A.I. Message-ID: Hi folks! I've been an avid Haskell user for a couple years. I am now making an A.I. system that will help programming in general. It's based on a Java variation called JavaX (javax.tinybrain.de). However, any language can be processed. The most important step is tokenization which is actually the bulk effort of the parsing process. Thus. Anyone in the mood for contributing a Haskell tokenizer? Instructions here: http://tinybrain.blog.de/2015/06/27/a-standard-system-for-tokenization-20606430/ The benefit? One day, your Haskell coding (/refactoring) can be done by A.I. (Or a part of it...) Cheers, Stefan From stefan.reich.maker.of.eye at googlemail.com Sat Jun 27 18:18:08 2015 From: stefan.reich.maker.of.eye at googlemail.com (Stefan Reich) Date: Sat, 27 Jun 2015 20:18:08 +0200 Subject: [Haskell-cafe] Tokenizing Haskell for future A.I. Message-ID: Oops. Subject should have read "Tokenizing" of course. :-) On 6/27/15, Stefan Reich wrote: > Hi folks! > > I've been an avid Haskell user for a couple years. > > I am now making an A.I. system that will help programming in general. > It's based on a Java variation called JavaX (javax.tinybrain.de). > > However, any language can be processed. The most important step is > tokenization which is actually the bulk effort of the parsing process. > > Thus. Anyone in the mood for contributing a Haskell tokenizer? > > Instructions here: > http://tinybrain.blog.de/2015/06/27/a-standard-system-for-tokenization-20606430/ > > The benefit? One day, your Haskell coding (/refactoring) can be done > by A.I. (Or a part of it...) > > Cheers, > Stefan > From heraldhoi at gmail.com Sat Jun 27 19:47:39 2015 From: heraldhoi at gmail.com (Geraldus) Date: Sat, 27 Jun 2015 19:47:39 +0000 Subject: [Haskell-cafe] Tokenizing Haskell for future A.I. In-Reply-To: References: Message-ID: Oh, by the way, haskell-mode for Emacs also needs a tokenizer. ??, 27 ???? 2015 ?. ? 23:18, Stefan Reich < stefan.reich.maker.of.eye at googlemail.com>: > Oops. Subject should have read "Tokenizing" of course. :-) > > On 6/27/15, Stefan Reich wrote: > > Hi folks! > > > > I've been an avid Haskell user for a couple years. > > > > I am now making an A.I. system that will help programming in general. > > It's based on a Java variation called JavaX (javax.tinybrain.de). > > > > However, any language can be processed. The most important step is > > tokenization which is actually the bulk effort of the parsing process. > > > > Thus. Anyone in the mood for contributing a Haskell tokenizer? > > > > Instructions here: > > > http://tinybrain.blog.de/2015/06/27/a-standard-system-for-tokenization-20606430/ > > > > The benefit? One day, your Haskell coding (/refactoring) can be done > > by A.I. (Or a part of it...) > > > > Cheers, > > Stefan > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan.reich.maker.of.eye at googlemail.com Sat Jun 27 19:49:33 2015 From: stefan.reich.maker.of.eye at googlemail.com (Stefan Reich) Date: Sat, 27 Jun 2015 21:49:33 +0200 Subject: [Haskell-cafe] Tokenizing Haskell for future A.I. In-Reply-To: References: Message-ID: Do you have a spec link handy? Cheers Stefan Am 27.06.2015 21:47 schrieb "Geraldus" : > Oh, by the way, haskell-mode for Emacs also needs a tokenizer. > > ??, 27 ???? 2015 ?. ? 23:18, Stefan Reich < > stefan.reich.maker.of.eye at googlemail.com>: > >> Oops. Subject should have read "Tokenizing" of course. :-) >> >> On 6/27/15, Stefan Reich >> wrote: >> > Hi folks! >> > >> > I've been an avid Haskell user for a couple years. >> > >> > I am now making an A.I. system that will help programming in general. >> > It's based on a Java variation called JavaX (javax.tinybrain.de). >> > >> > However, any language can be processed. The most important step is >> > tokenization which is actually the bulk effort of the parsing process. >> > >> > Thus. Anyone in the mood for contributing a Haskell tokenizer? >> > >> > Instructions here: >> > >> http://tinybrain.blog.de/2015/06/27/a-standard-system-for-tokenization-20606430/ >> > >> > The benefit? One day, your Haskell coding (/refactoring) can be done >> > by A.I. (Or a part of it...) >> > >> > Cheers, >> > Stefan >> > >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From _deepfire at feelingofgreen.ru Sat Jun 27 19:54:05 2015 From: _deepfire at feelingofgreen.ru (Kosyrev Serge) Date: Sat, 27 Jun 2015 22:54:05 +0300 Subject: [Haskell-cafe] Promoting associated data types In-Reply-To: <0F217E8E-48F4-4714-91B0-EA2D88F5296B@cis.upenn.edu> (sfid-20150625_164746_039718_F9AA8117) (Richard Eisenberg's message of "Thu, 25 Jun 2015 08:31:15 -0400") References: <87d20k9tj3.fsf@feelingofgreen.ru> <0F217E8E-48F4-4714-91B0-EA2D88F5296B@cis.upenn.edu> Message-ID: <87k2upvsf6.fsf_-_@andromedae.feelingofgreen.ru> Richard Eisenberg writes: > Your second example, though, is ill-formed: you can't have a type variable of kind > `D`, as `D`, by itself, isn't a kind. You could say this, if you wanted, though: > >> class C1 a (b :: D a) > > Do you have an use case for this? I'm always curious to see how Haskellers want to > use these advanced features! You are probably going to be disappointed -- I'm actually trying to model some kind of stereotypical OO type hierarchy. Basically, I have a known finite set of Categories (in a non-mathematical sense) of data, that I insist on modeling as a type class [1]. Each Category has a number of highly-custom Layouts capable of representing its data. Due to my irrational stubbornness, I insist on modeling them as type classes as well. I'm also trying to preserve as much user-extensibility, as I can -- through type class instancing. (Which seemingly inevitably leads to existential wrappers -- which is widely discouraged, but, for now, let's forget about this.) So, two type classes for Categories and Layouts -- this gives rise to two indices, a total of four types. For indexing the Category type class I can use a regular promoted ADT: > data CatName > = Graph > | Dag > | Set > deriving (Eq) > > class Category (a ? CatName) where > data CatX a ? * ..which suddenly allows to do something I couldn't figure out how to do without XDataKinds -- a simple decision procedure over a list of existentials: > data CatEntry where > CatEntry ? Category a ? (a, (CatX a)) ? CatEntry > > data CatAssoc where > CatAssoc ? [CatEntry] ? CatAssoc > > prefer ? Category c ? c ? CatEntry ? CatX c ? CatX c > prefer cat (CatAssoc xs) defx = > case find (\(CatEntry (icat, _)) ? cat == icat) xs of > Just (CatEntry (icat, x)) ? x > Nothing ? defx Basically, DataKinds allows constraining the type class index, so that its members become directly comparable. ..however. There seems to be a need to go further, and to extend the same trick to Layouts -- remember that I need to index them as well -- so let me revisit the definition of Category (and elucidate the nature of CatX along the way): > class Category (a ? CatName) where > data LayoutName a ? * > > class Category cat ? Layout cat (lay ? LayoutName cat) | lay ? cat where ..which suddenly explains the meaning of 'prefer' -- a choice function for layouts: > data CatEntry where > CatEntry ? Category a ? (a, (LayoutName a)) ? CatEntry > > prefer ? Category c ? c ? CatEntry ? LayoutName c ? LayoutName c > prefer cat (CatAssoc xs) deflayout = > case find (\(CatEntry (icat, _)) ? cat == icat) xs of > Just (CatEntry (icat, lay)) ? lay > Nothing ? deflayout ..but, of course, that can't be done yet : -) So, in the end, I'm trading off extensibility for ability to quantify over the type index. I'm not sure if I will need the quantification part in the end, but I sure as hell would like to have the choice : -) -- respectfully, ??????? ?????? -- 1. The why of type class choice is a separate question, and my reasoning is likely highly debatable. Let's assume it's aesthetics/usability, for now. From _deepfire at feelingofgreen.ru Sat Jun 27 19:59:46 2015 From: _deepfire at feelingofgreen.ru (Kosyrev Serge) Date: Sat, 27 Jun 2015 22:59:46 +0300 Subject: [Haskell-cafe] Promoting associated data types In-Reply-To: <87k2upvsf6.fsf_-_@andromedae.feelingofgreen.ru> (Kosyrev Serge's message of "Sat, 27 Jun 2015 22:54:05 +0300") References: <87d20k9tj3.fsf@feelingofgreen.ru> <0F217E8E-48F4-4714-91B0-EA2D88F5296B@cis.upenn.edu> <87k2upvsf6.fsf_-_@andromedae.feelingofgreen.ru> Message-ID: <87fv5cx6q5.fsf@andromedae.feelingofgreen.ru> I'm sorry, I made a mistake in the type signature of 'prefer' -- CatEntry ought to be CatAssoc: > prefer ? Category c ? c ? CatAssoc ? CatX c ? CatX c yielding: > prefer ? Category c ? c ? CatAssoc ? CatX c ? CatX c > prefer cat (CatAssoc xs) defx = > case find (\(CatEntry (icat, _)) ? cat == icat) xs of > Just (CatEntry (icat, x)) ? x > Nothing ? defx ..and > prefer ? Category c ? c ? CatAssoc ? LayoutName c ? LayoutName c > prefer cat (CatAssoc xs) deflayout = > case find (\(CatEntry (icat, _)) ? cat == icat) xs of > Just (CatEntry (icat, lay)) ? lay > Nothing ? deflayout -- respectfully, ??????? ?????? From _deepfire at feelingofgreen.ru Sun Jun 28 23:11:36 2015 From: _deepfire at feelingofgreen.ru (Kosyrev Serge) Date: Mon, 29 Jun 2015 02:11:36 +0300 Subject: [Haskell-cafe] Promoting associated data types In-Reply-To: <87k2upvsf6.fsf_-_@andromedae.feelingofgreen.ru> (Kosyrev Serge's message of "Sat, 27 Jun 2015 22:54:05 +0300") References: <87d20k9tj3.fsf@feelingofgreen.ru> <0F217E8E-48F4-4714-91B0-EA2D88F5296B@cis.upenn.edu> <87k2upvsf6.fsf_-_@andromedae.feelingofgreen.ru> Message-ID: <87r3ovo2c7.fsf@andromedae.feelingofgreen.ru> Kosyrev Serge <_deepfire at feelingofgreen.ru> writes: > So, two type classes for Categories and Layouts -- this gives rise to two indices, > a total of four types. > > For indexing the Category type class I can use a regular promoted ADT: > >> data CatName >> = Graph >> | Dag >> | Set >> deriving (Eq) >> >> class Category (a ? CatName) where >> data CatX a ? * > > ..which suddenly allows to do something I couldn't figure out how to do > without XDataKinds -- a simple decision procedure over a list of existentials: > >> data CatEntry where >> CatEntry ? Category a ? (a, (CatX a)) ? CatEntry >> >> data CatAssoc where >> CatAssoc ? [CatEntry] ? CatAssoc >> >> prefer ? Category c ? c ? CatEntry ? CatX c ? CatX c >> prefer cat (CatAssoc xs) defx = >> case find (\(CatEntry (icat, _)) ? cat == icat) xs of >> Just (CatEntry (icat, x)) ? x >> Nothing ? defx > > Basically, DataKinds allows constraining the type class index, so that its > members become directly comparable. Sadly, even this doesn't fly, because: > The first argument of a tuple should have kind '*', but 'a' has kind 'CatName'. ..which doesn't really change even if I replace the tuple with a product type within the CatEntry itself. Basically GHC refuses to constrain the kind of constructor argument types beyond the granularity provided by '*'. And so I wonder if this is one restriction among those that you aim to remove.. : -) -- respectfully, ??????? ?????? From clintonmead at gmail.com Mon Jun 29 08:19:50 2015 From: clintonmead at gmail.com (Clinton Mead) Date: Mon, 29 Jun 2015 18:19:50 +1000 Subject: [Haskell-cafe] Dealing with invertible functions Message-ID: I was trying to think of a way to deal with invertible functions, say if I want to set up a one-to-one mapping from A<->B without having to maintain two sets of functions (and worry about them getting out of sync). So I thought about making an "invertible" function. This is a function that knows it's own inverse, and you can compose them and get the inverses for free. Of course you need to set up the base functions manually, but then after that the composed functions don't have to be maintained separately both ways. Below I'm going to include some code, and I have a few questions: 1) Am I (badly) reinventing the wheel. 2) Is there otherwise something terrible with this approach. 3) I ended up wanting a function with signature "f a b -> a -> b". This feels strangly like applicative but not exactly. Am I reinventing the wheel here also or should I be doing this differently? Any advise appreciated, the ideone link is here: https://ideone.com/HlUHUd But I've also copied the code below: --- import Prelude hiding ((.)) import Control.Category ((.), (<<<), (>>>), Category) data InvertibleFunction a b = InvertibleFunction (a -> b) (b -> a) instance Category InvertibleFunction where (InvertibleFunction b_c c_b) . (InvertibleFunction a_b b_a) = InvertibleFunction (b_c . a_b) (b_a . c_b) inv (InvertibleFunction x y) = InvertibleFunction y x add :: (Num n) => n -> InvertibleFunction n n add x = InvertibleFunction (+x) (\y -> y - x) class KindaApplicative f where (<$>) :: f a b -> a -> b instance KindaApplicative InvertibleFunction where (InvertibleFunction f _) <$> x = f x main = print $ ((inv (add 2)) <$> 5) -------------- next part -------------- An HTML attachment was scrubbed... URL: From eir at cis.upenn.edu Mon Jun 29 11:44:22 2015 From: eir at cis.upenn.edu (Richard Eisenberg) Date: Mon, 29 Jun 2015 07:44:22 -0400 Subject: [Haskell-cafe] Promoting associated data types In-Reply-To: <87r3ovo2c7.fsf@andromedae.feelingofgreen.ru> References: <87d20k9tj3.fsf@feelingofgreen.ru> <0F217E8E-48F4-4714-91B0-EA2D88F5296B@cis.upenn.edu> <87k2upvsf6.fsf_-_@andromedae.feelingofgreen.ru> <87r3ovo2c7.fsf@andromedae.feelingofgreen.ru> Message-ID: <2A257EC0-4FD3-472C-8900-F37D9EB41100@cis.upenn.edu> On Jun 28, 2015, at 7:11 PM, Kosyrev Serge <_deepfire at feelingofgreen.ru> wrote: > > Sadly, even this doesn't fly, because: > >> The first argument of a tuple should have kind '*', but 'a' has kind 'CatName'. > > ..which doesn't really change even if I replace the tuple with a product type > within the CatEntry itself. > > Basically GHC refuses to constrain the kind of constructor argument types > beyond the granularity provided by '*'. > > And so I wonder if this is one restriction among those that you aim to remove.. : -) No -- this restriction leads to the best definition for tuples, in my opinion. Instead, you probably want a promoted tuple: put a ' before the open-parenthesis, and see if that works for you. Richard From chneukirchen at gmail.com Mon Jun 29 12:09:47 2015 From: chneukirchen at gmail.com (Christian Neukirchen) Date: Mon, 29 Jun 2015 14:09:47 +0200 Subject: [Haskell-cafe] Munich Haskell Meeting, 2015-06-30 @ 19:30 Message-ID: <87mvzizpf8.fsf@gmail.com> Dear all, Next week, our monthly Munich Haskell Meeting will take place again on Monday, June 30 at Cafe Puck at 19h30. For details see here: http://www.haskell-munich.de/dates If you plan to join, please add yourself to this dudle so we can reserve enough seats! It is OK to add yourself to the dudle anonymously or pseudonymously. https://dudle.inf.tu-dresden.de/haskell-munich-jun-2015/ **Please note that I cannot make it tomorrow, but I'll reserve the table for you.** Everybody is welcome! cu, -- Christian Neukirchen http://chneukirchen.org From matthewtpickering at gmail.com Mon Jun 29 12:13:54 2015 From: matthewtpickering at gmail.com (Matthew Pickering) Date: Mon, 29 Jun 2015 13:13:54 +0100 Subject: [Haskell-cafe] haskell-src-exts maintenance Message-ID: Dear List, There are a large number of untriaged pull requests and issues currently open on the issue tracker for haskell-src-exts. The tool is widely used by tool writers but the last commit to the project is now over 6 months ago. I think it is important to get this work merged and update the parser to support modern language features introduced in GHC 7.8 and 7.10. I would personally be capable of helping with this effort but before doing so I would appreciate a comment from the current maintainers as to the current status of the project. So, 1. Does anyone know if Niklas or Peter plan to return to the project? 2. Is there anyone else who is interested in updating the HSE parser? Matt From _deepfire at feelingofgreen.ru Mon Jun 29 12:31:10 2015 From: _deepfire at feelingofgreen.ru (Kosyrev Serge) Date: Mon, 29 Jun 2015 15:31:10 +0300 Subject: [Haskell-cafe] UNS: Re: Promoting associated data types In-Reply-To: <2A257EC0-4FD3-472C-8900-F37D9EB41100@cis.upenn.edu> (sfid-20150629_160108_692625_0A9ED67C) (Richard Eisenberg's message of "Mon, 29 Jun 2015 07:44:22 -0400") References: <87d20k9tj3.fsf@feelingofgreen.ru> <0F217E8E-48F4-4714-91B0-EA2D88F5296B@cis.upenn.edu> <87k2upvsf6.fsf_-_@andromedae.feelingofgreen.ru> <87r3ovo2c7.fsf@andromedae.feelingofgreen.ru> <2A257EC0-4FD3-472C-8900-F37D9EB41100@cis.upenn.edu> Message-ID: <87egkuofw1.fsf@andromedae.feelingofgreen.ru> Richard Eisenberg writes: > On Jun 28, 2015, at 7:11 PM, Kosyrev Serge <_deepfire at feelingofgreen.ru> wrote: >> Sadly, even this doesn't fly, because: >> >>> The first argument of a tuple should have kind '*', but 'a' has kind 'CatName'. >> >> ..which doesn't really change even if I replace the tuple with a product type >> within the CatEntry itself. >> >> Basically GHC refuses to constrain the kind of constructor argument types >> beyond the granularity provided by '*'. >> >> And so I wonder if this is one restriction among those that you aim to remove.. : -) > > No -- this restriction leads to the best definition for tuples, in my > opinion. Instead, you probably want a promoted tuple: put a ' before the > open-parenthesis, and see if that works for you. > data CatEntry where > CatEntry ? Category a ? '(a, CatX a) ? CatEntry yields: > Expected a type, but ?'(a, CatX a)? has kind ?(,) CatName *? > In the type ?'(a, CatX a)? whereas: > data CatEntry where > CatEntry ? Category a ? a ? CatX a ? CatEntry yields: > Expected a type, but ?a? has kind ?CatName? > In the type ?a? -- respectfully, ??????? ?????? From me at lelf.lu Mon Jun 29 15:04:02 2015 From: me at lelf.lu (Antonio Nikishaev) Date: Mon, 29 Jun 2015 19:04:02 +0400 Subject: [Haskell-cafe] Dealing with invertible functions References: Message-ID: Look at Control.Lens.Iso Clinton Mead writes: > I was trying to think of a way to deal with invertible functions, say > if I want to set up a one-to-one mapping from A<->B without having to > maintain two sets of functions (and worry about them getting out of > sync). > > So I thought about making an "invertible" function. This is a function > that knows it's own inverse, and you can compose them and get the > inverses for free. Of course you need to set up the base functions > manually, but then after that the composed functions don't have to be > maintained separately both ways. > > Below I'm going to include some code, and I have a few questions: > > 1) Am I (badly) reinventing the wheel. > 2) Is there otherwise something terrible with this approach. > 3) I ended up wanting a function with signature "f a b -> a -> b". > This feels strangly like applicative but not exactly. Am I reinventing > the wheel here also or should I be doing this differently? > > Any advise appreciated, the ideone link is here: > https://ideone.com/HlUHUd > But I've also copied the code below: > > --- > > import Prelude hiding ((.)) > import Control.Category ((.), (<<<), (>>>), Category) > > data InvertibleFunction a b = InvertibleFunction (a -> b) (b -> a) > > instance Category InvertibleFunction where > (InvertibleFunction b_c c_b) . (InvertibleFunction a_b b_a) = > InvertibleFunction (b_c . a_b) (b_a . c_b) > > inv (InvertibleFunction x y) = InvertibleFunction y x > > add :: (Num n) => n -> InvertibleFunction n n > add x = InvertibleFunction (+x) (\y -> y - x) > > class KindaApplicative f where > (<$>) :: f a b -> a -> b > > instance KindaApplicative InvertibleFunction where > (InvertibleFunction f _) <$> x = f x > main = print $ ((inv (add 2)) <$> 5) > From imz at altlinux.org Mon Jun 29 15:06:42 2015 From: imz at altlinux.org (Ivan Zakharyaschev) Date: Mon, 29 Jun 2015 08:06:42 -0700 (PDT) Subject: [Haskell-cafe] Dealing with invertible functions In-Reply-To: References: Message-ID: <15266968-d448-411c-b3f9-7e7707c12b7d@googlegroups.com> Le lundi 29 juin 2015 11:19:57 UTC+3, Clinton Mead a ?crit : > > I was trying to think of a way to deal with invertible functions, say if I > want to set up a one-to-one mapping from A<->B without having to maintain > two sets of functions (and worry about them getting out of sync). > > So I thought about making an "invertible" function. This is a function > that knows it's own inverse, and you can compose them and get the inverses > for free. Of course you need to set up the base functions manually, but > then after that the composed functions don't have to be maintained > separately both ways. > > Below I'm going to include some code, and I have a few questions: > > 1) Am I (badly) reinventing the wheel. > Perhaps http://hackage.haskell.org/package/TypeCompose-0.9.10/docs/Data-Bijection.html#t::-60--45--62-: 2) Is there otherwise something terrible with this approach. > 3) I ended up wanting a function with signature "f a b -> a -> b". This > feels strangly like applicative but not exactly. Am I reinventing the wheel > here also or should I be doing this differently? > > Perhaps, there is an analogue of your function application (for bijections, <$>) in Arrow, which is a class of Data.Bijection.Bijection. Probably not in Category though. (I've just stumbled upon a similar discussion at http://programmers.stackexchange.com/a/215503/11591 ; with similar requirements: "There's a common reason why I can't use Applicative or Arrow (or Monad) - I can't wrap a normal function (in general) because values of my type *represent* a function but are *represented* by data, and won't support arbitrary functions if if there was a way to translate." You, too, can't inject an arbitrary function because you have to manually write the inverse.) class KindaApplicative f where > (<$>) :: f a b -> a -> b > > instance KindaApplicative InvertibleFunction where > (InvertibleFunction f _) <$> x = f x > Best wishes, Ivan Z. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.abel at ifi.lmu.de Mon Jun 29 16:34:49 2015 From: andreas.abel at ifi.lmu.de (Andreas Abel) Date: Mon, 29 Jun 2015 18:34:49 +0200 Subject: [Haskell-cafe] [high-order-munich] Munich Haskell Meeting, 2015-06-30 @ 19:30 In-Reply-To: <87mvzizpf8.fsf@gmail.com> References: <87mvzizpf8.fsf@gmail.com> Message-ID: <559173A9.4020506@ifi.lmu.de> I guess it means Tuesday, June 30 then... On 29.06.2015 14:09, Christian Neukirchen wrote: > Dear all, > > Next week, our monthly Munich Haskell Meeting will take place again on > Monday, June 30 at Cafe Puck at 19h30. For details see here: > > http://www.haskell-munich.de/dates > > If you plan to join, please add yourself to this dudle so we can > reserve enough seats! It is OK to add yourself to the dudle > anonymously or pseudonymously. > > https://dudle.inf.tu-dresden.de/haskell-munich-jun-2015/ > > **Please note that I cannot make it tomorrow, but I'll reserve the > table for you.** > > Everybody is welcome! > > cu, > -- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel at gu.se http://www2.tcs.ifi.lmu.de/~abel/ From nicholls.mark at vimn.com Tue Jun 30 07:27:33 2015 From: nicholls.mark at vimn.com (Nicholls, Mark) Date: Tue, 30 Jun 2015 07:27:33 +0000 Subject: [Haskell-cafe] Advice gfx library In-Reply-To: <33157124-F2F9-4A63-971E-4E9B2C1C2EC0@vimn.com> References: <33157124-F2F9-4A63-971E-4E9B2C1C2EC0@vimn.com> Message-ID: Hmmmm No response Having dug around a bit, a sensible approach would be to use some sort of html5 library....html isnt my thing...i have a passing knowledge of websharper, something like that would be ideal. Create html5 in haskell Create javascript in haskell Best rendered to standalone client side html, i dont need all the complexity of a server I mildly overwhelmed with options any advice? Books to buy, tutorials to have a go at? Excuse the spelling, sent from a phone with itty bitty keys, it like trying to sow a button on a shirt with a sausage. > On 25 Jun 2015, at 08:55, Nicholls, Mark wrote: > > I am interested in writing some real code now! > > What i could do with is a gfx library that > Can render mpeg/mov files > Scale > Transform etc > Is simple! > Runs on windows in some form > > Ive got hudaks book about multimedia, and understand the general reactive idea behind it....i want to build on top of that > > Ive nosed around gloss and grapefruit, but the mpeg piece seems missing from these > > Any ideas? > > Excuse the spelling, sent from a phone with itty bitty keys, it like trying to sow a button on a shirt with a sausage. > CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. From heraldhoi at gmail.com Tue Jun 30 08:48:00 2015 From: heraldhoi at gmail.com (Geraldus) Date: Tue, 30 Jun 2015 08:48:00 +0000 Subject: [Haskell-cafe] Advice gfx library In-Reply-To: References: <33157124-F2F9-4A63-971E-4E9B2C1C2EC0@vimn.com> Message-ID: Hi Mark! Can you share a book name you mentioned? I'm interested in decoding MP3 to OGG and streaming these two formats online. I'm going to play with this stuff in the near future. ??, 30 ???? 2015 ?. ? 12:28, Nicholls, Mark : > Hmmmm > > No response > > Having dug around a bit, a sensible approach would be to use some sort of > html5 library....html isnt my thing...i have a passing knowledge of > websharper, something like that would be ideal. > > Create html5 in haskell > Create javascript in haskell > > Best rendered to standalone client side html, i dont need all the > complexity of a server > > I mildly overwhelmed with options any advice? Books to buy, tutorials to > have a go at? > > Excuse the spelling, sent from a phone with itty bitty keys, it like > trying to sow a button on a shirt with a sausage. > > > > On 25 Jun 2015, at 08:55, Nicholls, Mark wrote: > > > > I am interested in writing some real code now! > > > > What i could do with is a gfx library that > > Can render mpeg/mov files > > Scale > > Transform etc > > Is simple! > > Runs on windows in some form > > > > Ive got hudaks book about multimedia, and understand the general > reactive idea behind it....i want to build on top of that > > > > Ive nosed around gloss and grapefruit, but the mpeg piece seems missing > from these > > > > Any ideas? > > > > Excuse the spelling, sent from a phone with itty bitty keys, it like > trying to sow a button on a shirt with a sausage. > > > CONFIDENTIALITY NOTICE > > This e-mail (and any attached files) is confidential and protected by > copyright (and other intellectual property rights). If you are not the > intended recipient please e-mail the sender and then delete the email and > any attached files immediately. Any further use or dissemination is > prohibited. > > While MTV Networks Europe has taken steps to ensure that this email and > any attachments are virus free, it is your responsibility to ensure that > this message and any attachments are virus free and do not affect your > systems / data. > > Communicating by email is not 100% secure and carries risks such as delay, > data corruption, non-delivery, wrongful interception and unauthorised > amendment. If you communicate with us by e-mail, you acknowledge and assume > these risks, and you agree to take appropriate measures to minimise these > risks when e-mailing us. > > MTV Networks International, MTV Networks UK & Ireland, Greenhouse, > Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions > International, Be Viacom, Viacom International Media Networks and VIMN and > Comedy Central are all trading names of MTV Networks Europe. MTV Networks > Europe is a partnership between MTV Networks Europe Inc. and Viacom > Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley > Crescent, London, NW1 8TT. > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholls.mark at vimn.com Tue Jun 30 08:56:10 2015 From: nicholls.mark at vimn.com (Nicholls, Mark) Date: Tue, 30 Jun 2015 08:56:10 +0000 Subject: [Haskell-cafe] Advice gfx library In-Reply-To: References: <33157124-F2F9-4A63-971E-4E9B2C1C2EC0@vimn.com> Message-ID: Ah, I was hoping for this the other way around?.i.e. if someone can recommend a book....I just want to create some html with video elements (I think) with some javascript operate on the canvas etc?.but do it in Haskell?I sort of know how to do this in F#. You want to do something much harder. From: Geraldus [mailto:heraldhoi at gmail.com] Sent: 30 June 2015 9:48 AM To: Nicholls, Mark; haskell-cafe at haskell.org Subject: Re: [Haskell-cafe] Advice gfx library Hi Mark! Can you share a book name you mentioned? I'm interested in decoding MP3 to OGG and streaming these two formats online. I'm going to play with this stuff in the near future. ??, 30 ???? 2015 ?. ? 12:28, Nicholls, Mark >: Hmmmm No response Having dug around a bit, a sensible approach would be to use some sort of html5 library....html isnt my thing...i have a passing knowledge of websharper, something like that would be ideal. Create html5 in haskell Create javascript in haskell Best rendered to standalone client side html, i dont need all the complexity of a server I mildly overwhelmed with options any advice? Books to buy, tutorials to have a go at? Excuse the spelling, sent from a phone with itty bitty keys, it like trying to sow a button on a shirt with a sausage. > On 25 Jun 2015, at 08:55, Nicholls, Mark > wrote: > > I am interested in writing some real code now! > > What i could do with is a gfx library that > Can render mpeg/mov files > Scale > Transform etc > Is simple! > Runs on windows in some form > > Ive got hudaks book about multimedia, and understand the general reactive idea behind it....i want to build on top of that > > Ive nosed around gloss and grapefruit, but the mpeg piece seems missing from these > > Any ideas? > > Excuse the spelling, sent from a phone with itty bitty keys, it like trying to sow a button on a shirt with a sausage. > CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe at haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe CONFIDENTIALITY NOTICE This e-mail (and any attached files) is confidential and protected by copyright (and other intellectual property rights). If you are not the intended recipient please e-mail the sender and then delete the email and any attached files immediately. Any further use or dissemination is prohibited. While MTV Networks Europe has taken steps to ensure that this email and any attachments are virus free, it is your responsibility to ensure that this message and any attachments are virus free and do not affect your systems / data. Communicating by email is not 100% secure and carries risks such as delay, data corruption, non-delivery, wrongful interception and unauthorised amendment. If you communicate with us by e-mail, you acknowledge and assume these risks, and you agree to take appropriate measures to minimise these risks when e-mailing us. MTV Networks International, MTV Networks UK & Ireland, Greenhouse, Nickelodeon Viacom Consumer Products, VBSi, Viacom Brand Solutions International, Be Viacom, Viacom International Media Networks and VIMN and Comedy Central are all trading names of MTV Networks Europe. MTV Networks Europe is a partnership between MTV Networks Europe Inc. and Viacom Networks Europe Inc. Address for service in Great Britain is 17-29 Hawley Crescent, London, NW1 8TT. -------------- next part -------------- An HTML attachment was scrubbed... URL: From heraldhoi at gmail.com Tue Jun 30 09:07:16 2015 From: heraldhoi at gmail.com (Geraldus) Date: Tue, 30 Jun 2015 09:07:16 +0000 Subject: [Haskell-cafe] Advice gfx library In-Reply-To: References: <33157124-F2F9-4A63-971E-4E9B2C1C2EC0@vimn.com> Message-ID: If you don't interest in web server stuff I think you can use Lucid [1] or Hakyll [2]. If I'm not mistaken these libraries are static sites generators. To generate JavaScript from Haskell I use GHCJS [3] personally, but there are also Fay [4] and Haste [5]. [1]: http://hackage.haskell.org/package/lucid [2]: http://hackage.haskell.org/package/hakyll [3]: https://github.com/ghcjs [4]: https://github.com/faylang/fay/wiki [5]: http://haste-lang.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From sumit.sahrawat.apm13 at iitbhu.ac.in Tue Jun 30 15:59:58 2015 From: sumit.sahrawat.apm13 at iitbhu.ac.in (Sumit Sahrawat, Maths & Computing, IIT (BHU)) Date: Tue, 30 Jun 2015 21:29:58 +0530 Subject: [Haskell-cafe] Advice gfx library In-Reply-To: References: <33157124-F2F9-4A63-971E-4E9B2C1C2EC0@vimn.com> Message-ID: It seems like the ffmpeg bindings for haskell might work. I'm not sure, but it's worth taking a look. http://hackage.haskell.org/package/ffmpeg-light On 30 June 2015 at 14:37, Geraldus wrote: > > If you don't interest in web server stuff I think you can use > Lucid [1] or Hakyll [2]. If I'm not mistaken these libraries are > static sites generators. > > To generate JavaScript from Haskell I use GHCJS [3] personally, > but there are also Fay [4] and Haste [5]. > > [1]: http://hackage.haskell.org/package/lucid > [2]: http://hackage.haskell.org/package/hakyll > [3]: https://github.com/ghcjs > [4]: https://github.com/faylang/fay/wiki > [5]: http://haste-lang.org/ > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe > > -- Regards Sumit Sahrawat -------------- next part -------------- An HTML attachment was scrubbed... URL: From konn.jinro at gmail.com Tue Jun 30 18:27:46 2015 From: konn.jinro at gmail.com (Hiromi ISHII) Date: Wed, 1 Jul 2015 03:27:46 +0900 Subject: [Haskell-cafe] How to Hijack stdin,err,out, thread safely? Message-ID: <59EC2320-68D4-4921-B815-83B6DA829BD3@gmail.com> Hi, I'm currently writing a web app to check the spec of input code usging QuickCheck. quickCheck* functions writes results to stderr & stdout, but I don't want them written to the app's original stdout/err. (I'm using SafeHaskell features to avoid malicious code executed, so don't worry about that :-)) So I want to execute I/O action hijacking stdout/err in a thread-safe manner. For example, I need function like below: censorHandles :: IO a -> IO (a, String, String) censorHandles = ... or withStd :: Handle -> Handle -> Handle -> IO a -> IO a withStd = ... -- Hiromi ISHII konn.jinro at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 496 bytes Desc: Message signed with OpenPGP using GPGMail URL: From anselm.scholl at tu-harburg.de Tue Jun 30 18:33:51 2015 From: anselm.scholl at tu-harburg.de (Jonas Scholl) Date: Tue, 30 Jun 2015 20:33:51 +0200 Subject: [Haskell-cafe] How to Hijack stdin,err,out, thread safely? In-Reply-To: <59EC2320-68D4-4921-B815-83B6DA829BD3@gmail.com> References: <59EC2320-68D4-4921-B815-83B6DA829BD3@gmail.com> Message-ID: <5592E10F.8020406@tu-harburg.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 https://hackage.haskell.org/package/silently may be of interest to you. Although I do not now whether it is threadsafe. On 06/30/2015 08:27 PM, Hiromi ISHII wrote: > Hi, > > I'm currently writing a web app to check the spec of input code > usging QuickCheck. > quickCheck* functions writes results to stderr & stdout, but I > don't want them written to the app's original stdout/err. > (I'm using SafeHaskell features to avoid malicious code executed, > so don't worry about that :-)) > > So I want to execute I/O action hijacking stdout/err in a thread-safe manner. > For example, I need function like below: > > censorHandles :: IO a -> IO (a, String, String) > censorHandles = ... > > or > > withStd :: Handle -> Handle -> Handle -> IO a -> IO a > withStd = ... > > -- Hiromi ISHII > konn.jinro at gmail.com > > > > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe at haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVkuDxAAoJEM0PYZBmfhoBZUIIALUtTNr760pmWUg1CNXmYAzc /0dh2vVY9aidf7FV9OGlKB2wif1JMLbU7jpY4d0KIkIO4idpMjJXVRjLwiGtJngz 8jwBj2A6Y/uhx3FelJmO7F4m+RdwMGOQHsxTrnZET1HoCy/B+yEftNWAKht+OCA0 UOzWWYlcb2Z+JcLGoSL5xiRjkDhFo6QpdyMAiE9hZ6LzbKG06lQCslz2pRCY2wSx fdPlWzZnZtZVIgpjICe7lrCCT6yynGO4mdPbu3fQ/b3g84qNlsVrpoaAXtOERy7W k5XjpLBcV0qv1+xjlpr6pviQPLRcpod2G8ZxvjuRdTpJXXkJV90nkcMVCPYv244= =yMaF -----END PGP SIGNATURE----- -------------- next part -------------- An HTML attachment was scrubbed... URL: From konn.jinro at gmail.com Tue Jun 30 18:56:00 2015 From: konn.jinro at gmail.com (Hiromi ISHII) Date: Wed, 1 Jul 2015 03:56:00 +0900 Subject: [Haskell-cafe] How to Hijack stdin,err,out, thread safely? In-Reply-To: <5592E10F.8020406@tu-harburg.de> References: <59EC2320-68D4-4921-B815-83B6DA829BD3@gmail.com> <5592E10F.8020406@tu-harburg.de> Message-ID: <217132B6-861B-4631-AF74-844F1017A5E5@gmail.com> Hi, > On 2015/07/01 3:33,Jonas Scholl wrote: > https://hackage.haskell.org/package/silently may be of interest to you. > Although I do not now whether it is threadsafe. Thanks! I didn't know about this package. This package seems great, but after I did some experement, it turns out to be not thread-safe. If we apply capture or silence to time-consuming actions, it eats entire output to stdout even made by other thread. For example, following code does not output anything and captures the output by another thread: ```haskell main :: IO () main = do print =<< (replicateM_ 100 $ do threadDelay (10^5) putStrLn "Hey, I'm here!") `concurrently` (capture_ $ replicateM_ 100 $ do threadDelay (10^5) putStrLn "Hey, You're there!") ``` I'm now suspecting that implementing the thread-safe versions of silently / capture is impossible... -- Hiromi ISHII konn.jinro at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 496 bytes Desc: Message signed with OpenPGP using GPGMail URL: From allbery.b at gmail.com Tue Jun 30 19:00:52 2015 From: allbery.b at gmail.com (Brandon Allbery) Date: Tue, 30 Jun 2015 15:00:52 -0400 Subject: [Haskell-cafe] How to Hijack stdin,err,out, thread safely? In-Reply-To: <59EC2320-68D4-4921-B815-83B6DA829BD3@gmail.com> References: <59EC2320-68D4-4921-B815-83B6DA829BD3@gmail.com> Message-ID: On Tue, Jun 30, 2015 at 2:27 PM, Hiromi ISHII wrote: > quickCheck* functions writes results to stderr & stdout, but I > don't want them written to the app's original stdout/err. > (I'm using SafeHaskell features to avoid malicious code executed, > so don't worry about that :-)) > > So I want to execute I/O action hijacking stdout/err in a thread-safe > manner. > For example, I need function like below: > Handles are process level, not thread level, in all supported operating systems. If something is writing to stderr then it is writing to a process level entity and there is no way to capture it at the level of a thread. -- brandon s allbery kf8nh sine nomine associates allbery.b at gmail.com ballbery at sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From roma at ro-che.info Tue Jun 30 19:02:10 2015 From: roma at ro-che.info (Roman Cheplyaka) Date: Tue, 30 Jun 2015 22:02:10 +0300 Subject: [Haskell-cafe] How to Hijack stdin,err,out, thread safely? In-Reply-To: <59EC2320-68D4-4921-B815-83B6DA829BD3@gmail.com> References: <59EC2320-68D4-4921-B815-83B6DA829BD3@gmail.com> Message-ID: <5592E7B2.2060107@ro-che.info> On 30/06/15 21:27, Hiromi ISHII wrote: > Hi, > > I'm currently writing a web app to check the spec of input code > usging QuickCheck. > quickCheck* functions writes results to stderr & stdout, but I > don't want them written to the app's original stdout/err. > (I'm using SafeHaskell features to avoid malicious code executed, > so don't worry about that :-)) It's not clear from your email whether you are concerned about the output of QuickCheck itself or the functions you're testing. In the former case, there is a way to get the output of QuickCheck as a String without printing it. Take a look at tasty-quickcheck's code for an example. Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: From magnus at therning.org Tue Jun 30 19:04:35 2015 From: magnus at therning.org (Magnus Therning) Date: Tue, 30 Jun 2015 21:04:35 +0200 Subject: [Haskell-cafe] How to Hijack stdin,err,out, thread safely? In-Reply-To: <59EC2320-68D4-4921-B815-83B6DA829BD3@gmail.com> References: <59EC2320-68D4-4921-B815-83B6DA829BD3@gmail.com> Message-ID: <20150630190435.GA1251@tatooine> On Wed, Jul 01, 2015 at 03:27:46AM +0900, Hiromi ISHII wrote: > Hi, > > I'm currently writing a web app to check the spec of input code > usging QuickCheck. > quickCheck* functions writes results to stderr & stdout, but I > don't want them written to the app's original stdout/err. > (I'm using SafeHaskell features to avoid malicious code executed, > so don't worry about that :-)) > > So I want to execute I/O action hijacking stdout/err in a thread-safe manner. > For example, I need function like below: > > censorHandles :: IO a -> IO (a, String, String) > censorHandles = ... > > or > > withStd :: Handle -> Handle -> Handle -> IO a -> IO a > withStd = ... Just to make sure, you have set `chatty` to false and passed it to one of the other QuickCheck runners, right? http://hackage.haskell.org/package/QuickCheck-2.8.1/docs/Test-QuickCheck.html#t:Args I haven't used it myself, but I was under the impression that's how one controls the use of stderr/stdout (well, at least stdout). /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus at therning.org jabber: magnus at therning.org twitter: magthe http://therning.org/magnus Do not meddle in the affairs of Wizards, for they are subtle and quick to anger. -- J.R.R Tolkien -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 163 bytes Desc: not available URL: From konn.jinro at gmail.com Tue Jun 30 19:08:29 2015 From: konn.jinro at gmail.com (Hiromi ISHII) Date: Wed, 1 Jul 2015 04:08:29 +0900 Subject: [Haskell-cafe] How to Hijack stdin,err,out, thread safely? In-Reply-To: <5592E7B2.2060107@ro-che.info> References: <59EC2320-68D4-4921-B815-83B6DA829BD3@gmail.com> <5592E7B2.2060107@ro-che.info> Message-ID: <488A465D-8C1F-48FD-A28D-AA31749AACCB@gmail.com> > On 2015/07/01 4:00, Brandon Allbery wrote: > > Handles are process level, not thread level, in all supported operating systems. If something is writing to stderr then it is writing to a process level entity and there is no way to capture it at the level of a thread. > Oh, yes. I get it. So the way I wanted to take in is completely wrong. > On 2015/07/01 4:02, Roman Cheplyaka wrote: > > It's not clear from your email whether you are concerned about the > output of QuickCheck itself or the functions you're testing. Sorry for my bad writing. I need the former. > In the former case, there is a way to get the output of QuickCheck as a > String without printing it. Take a look at tasty-quickcheck's code for > an example. It seems I can work it out in the same way with tasty-qc. Thanks! -- Hiromi ISHII konn.jinro at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 496 bytes Desc: Message signed with OpenPGP using GPGMail URL: From konn.jinro at gmail.com Tue Jun 30 19:13:23 2015 From: konn.jinro at gmail.com (Hiromi ISHII) Date: Wed, 1 Jul 2015 04:13:23 +0900 Subject: [Haskell-cafe] How to Hijack stdin,err,out, thread safely? In-Reply-To: <20150630190435.GA1251@tatooine> References: <59EC2320-68D4-4921-B815-83B6DA829BD3@gmail.com> <20150630190435.GA1251@tatooine> Message-ID: > On 2015/07/01 4:04, Magnus Therning wrote: > Just to make sure, you have set `chatty` to false and passed it to one > of the other QuickCheck runners, right? > > http://hackage.haskell.org/package/QuickCheck-2.8.1/docs/Test-QuickCheck.html#t:Args > > I haven't used it myself, but I was under the impression that's how > one controls the use of stderr/stdout (well, at least stdout). I overlooked that configuration item. tasty-qc also uses this functionality and I've confirmed that this just works fine for me. Thanks! -- Hiromi ISHII konn.jinro at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 496 bytes Desc: Message signed with OpenPGP using GPGMail URL: From acowley at seas.upenn.edu Tue Jun 30 21:47:26 2015 From: acowley at seas.upenn.edu (Anthony Cowley) Date: Tue, 30 Jun 2015 17:47:26 -0400 Subject: [Haskell-cafe] Advice gfx library In-Reply-To: References: <33157124-F2F9-4A63-971E-4E9B2C1C2EC0@vimn.com> Message-ID: ffmpeg-light would certainly do what's wanted, but I've only tested it on OS X and Linux. To get it working on Windows will require some help in making sure that ffmpeg is installed and linked in properly. Anthony Sumit Sahrawat, Maths & Computing, IIT (BHU) writes: > It seems like the ffmpeg bindings for haskell might work. I'm not sure, but > it's worth taking a look. > > http://hackage.haskell.org/package/ffmpeg-light > > On 30 June 2015 at 14:37, Geraldus wrote: > >> >> If you don't interest in web server stuff I think you can use >> Lucid [1] or Hakyll [2]. If I'm not mistaken these libraries are >> static sites generators. >> >> To generate JavaScript from Haskell I use GHCJS [3] personally, >> but there are also Fay [4] and Haste [5]. >> >> [1]: http://hackage.haskell.org/package/lucid >> [2]: http://hackage.haskell.org/package/hakyll >> [3]: https://github.com/ghcjs >> [4]: https://github.com/faylang/fay/wiki >> [5]: http://haste-lang.org/ >> >> _______________________________________________ >> Haskell-Cafe mailing list >> Haskell-Cafe at haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe >> >>