Re: [Haskell-cafe] [Haskell] Hackage 2 now available for beta testing

2013-09-10 Thread Ross Paterson
On Mon, Sep 09, 2013 at 07:23:59PM +0100, Duncan Coutts wrote: Well-Typed and the Industrial Haskell Group (IHG) are very pleased to announce that Hackage 2 is now available for public beta testing. The plan is to do the final switchover in late September, to coincide with ICFP.

Re: [Haskell-cafe] Best practices for Arrows?

2013-06-22 Thread Ross Paterson
On Sat, Jun 22, 2013 at 07:05:09PM +0100, Tom Ellis wrote: On Sat, Jun 22, 2013 at 03:36:15PM +0200, Ertugrul Söylemez wrote: If the interface is not under your control, make yourself comfortable with the complete arrow syntax, most notably how it handles operators, combinators and the `(|

Re: [Haskell-cafe] Why isn't ArrowChoice a parent of of ArrowApply?

2013-06-20 Thread Ross Paterson
On Thu, Jun 20, 2013 at 09:02:48AM +0200, Petr Pudlák wrote: In Control.Arrow we have: leftApp :: ArrowApply a = a b c - a (Either b d) (Either c d) Any instance of ArrowApply can be made into an instance of ArrowChoice by defining left = leftApp. So why isn't ArrowChoice a

Re: [Haskell-cafe] ANN: rematch, an library for composable assertions with human readable failure messages

2013-04-16 Thread Ross Paterson
On Tue, Apr 16, 2013 at 10:17:48AM +0100, Tom Crayford wrote: The core API is very simple: data Matcher a = Matcher { match :: a - Bool -- ^ A function that returns True if the matcher should pass, False if it should fail , description :: String -- ^ A description of the

Re: [Haskell-cafe] arrow notation

2013-02-12 Thread Ross Paterson
On Mon, Feb 11, 2013 at 09:32:25AM +0100, Petr Pudlák wrote: While the implementation of Applicative can be defined without actually using `delay`: newtype ArrowApp a b c = ArrowApp (a b c) instance Arrow a = Functor (ArrowApp a b) where fmap f (ArrowApp a) = ArrowApp (a ^

Re: [Haskell-cafe] arrow notation

2013-02-11 Thread Ross Paterson
On Sun, Feb 10, 2013 at 09:28:12PM +0100, Petr Pudlák wrote: 2013/2/9 Conal Elliott co...@conal.net wrote: What I have in mind is a small collection of methods including fst snd (and similarly for sums) that could be defined via arr but could instead form the basis of translating

Re: [Haskell-cafe] arrow notation

2013-02-08 Thread Ross Paterson
The proposed changes are described here: http://hackage.haskell.org/trac/ghc/wiki/ArrowNotation ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] arrow notation

2013-02-07 Thread Ross Paterson
I'd like to hear from anyone who's using arrow notation as supported by GHC, because I'm planning a couple of changes to parts of it. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] arrow notation

2013-02-07 Thread Ross Paterson
On Thu, Feb 07, 2013 at 02:49:40PM -0800, Conal Elliott wrote: I make some use of arrow notation, though sadly I often have to avoid it because my (pseudo-)arrows don't have arr. I'd love to see a variant that has restricted expressiveness in exchange for arr-freeness. It's hard to imagine

Re: [Haskell-cafe] catamorphisms and attribute grammars

2013-01-29 Thread Ross Paterson
On Sun, Jan 27, 2013 at 12:20:25AM +, Roman Cheplyaka wrote: Very nice! This can be generalized to arbitrary arrows: {-# LANGUAGE ExistentialQuantification #-} import Prelude hiding (id) import Control.Arrow import Control.Applicative import Control.Category data F

Re: [Haskell-cafe] foldr (.) id

2012-10-27 Thread Ross Paterson
On Fri, Oct 26, 2012 at 07:41:18PM +0100, Greg Fitzgerald wrote: I've recently found myself using the expression: foldr (.) id to compose a list (or Foldable) of functions.  It's especially useful when I need to map a function over the list before composing.  Does this function, or the more

Re: [Haskell-cafe] Sliding Window functional data structure

2012-08-31 Thread Ross Paterson
On Fri, Aug 31, 2012 at 05:45:27AM +0100, Richard O'Keefe wrote: Consider the following interface type Ord k = Sliding_Window k v entries :: Sliding_Window k v - [(k,v)] The cost is expected to be linear in the length of the result. The pairs are listed in

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

2012-08-27 Thread Ross Paterson
On Mon, Aug 27, 2012 at 07:39:39PM +0100, Erik Hesselink wrote: If we do agree that we want to prevent this problem for a while (which I'm not sure about), we should probably do it by preventing uploads for packages like this. That way, package maintainers will know what is going on, just like

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

2012-08-27 Thread Ross Paterson
On Mon, Aug 27, 2012 at 09:03:18PM +0100, Brent Yorgey wrote: On Mon, Aug 27, 2012 at 10:52:59AM -0700, Bryan O'Sullivan wrote: On Mon, Aug 27, 2012 at 9:57 AM, Erik Hesselink hessel...@gmail.com wrote: I'm seeing this again, on abstract-deque-0.1.6. Ross, can you fix it again?

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

2012-07-30 Thread Ross Paterson
On Mon, Jul 30, 2012 at 01:46:24PM +0100, Niklas Broberg wrote: On Wed, Jul 25, 2012 at 12:22 PM, Ross Paterson r...@soi.city.ac.uk wrote: As I understand it, the plan is to modify the following packages in hackage in-situ to remove the test sections (which contain the troublesome

Re: [Haskell-cafe] Reddy on Referential Transparency

2012-07-27 Thread Ross Paterson
On Fri, Jul 27, 2012 at 01:08:31PM +0100, Chris Dornan wrote: For those who haven’t seen it Uday Reddy has a comprehensive answer to a request to explain referential transparency on Stack Overflow. http://stackoverflow.com/questions/210835/what-is-referential-transparency/9 859966#9859966

Re: [Haskell-cafe] Reddy on Referential Transparency

2012-07-27 Thread Ross Paterson
On Fri, Jul 27, 2012 at 07:19:40PM +0100, Chris Dornan wrote: So a language is referentially transparent if replacing a sub-term with another with the same denotation doesn't change the overall meaning? Isn't this just summarizing the distinguishing characteristic of a denotational

Re: [Haskell-cafe] Applicative functors with branch/choice ?

2012-07-26 Thread Ross Paterson
On Wed, Jul 25, 2012 at 09:22:23PM +0100, Евгений Пермяков wrote: So, it seems for me, that Applicative API should be extended with typeclass for making choice what actions to execute depending on result of some test (pattern matching). Is there any reasonable definition of such typeclass

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

2012-07-25 Thread Ross Paterson
On Wed, Jul 25, 2012 at 09:43:48AM +0100, Simon Hengel wrote: On Fri, Jul 20, 2012 at 10:02:18AM +0100, Ross Paterson wrote: On Fri, Jul 20, 2012 at 09:34:16AM +0100, Simon Hengel wrote: Hi Ross, can you fix this on Hackage? My suggested solution is to again just remove the test-suite

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

2012-07-20 Thread Ross Paterson
On Fri, Jul 20, 2012 at 09:34:16AM +0100, Simon Hengel wrote: Hi Ross, can you fix this on Hackage? My suggested solution is to again just remove the test-suite sections from the cabal file, if that is fine with Richard. I'll modify the packages in-place if there's a consensus on what to do.

Re: [Haskell-cafe] Fwd: hackage compile failure with QuickCheck 2.5

2012-07-19 Thread Ross Paterson
On Wed, Jul 18, 2012 at 09:35:52AM +0100, Erik Hesselink wrote: I don't think you can install this package on 7.4. As Andres said, it requires containers 0.5, but ghc 7.4's base libraries (in this case, template-haskell) use containers 0.4, and can't be reinstalled. I guess your best bet is to

Re: [Haskell-cafe] Fwd: hackage compile failure with QuickCheck 2.5

2012-07-18 Thread Ross Paterson
On Wed, Jul 18, 2012 at 06:50:31AM +0100, Andres Löh wrote: Using --avoid-reinstalls blindly or as a default flag is also unfortunately not a good idea in general. There are simply too many cases where installing older versions of packages (which is often the only thing that helps) is not

Re: [Haskell-cafe] Fwd: hackage compile failure with QuickCheck 2.5

2012-07-18 Thread Ross Paterson
On Wed, Jul 18, 2012 at 09:35:52AM +0100, Erik Hesselink wrote: I don't think you can install this package on 7.4. As Andres said, it requires containers 0.5, but ghc 7.4's base libraries (in this case, template-haskell) use containers 0.4, and can't be reinstalled. I guess your best bet is to

Re: [Haskell-cafe] Fwd: hackage compile failure with QuickCheck 2.5

2012-07-18 Thread Ross Paterson
On Wed, Jul 18, 2012 at 10:37:31AM +0100, Gregory Collins wrote: Is there any reason QuickCheck specifically requires containers = 0.5? Perhaps its lower bound could be relaxed. It is sbv-2.2 that has that constraint. On Wed, Jul 18, 2012 at 11:29 AM, Ross Paterson r...@soi.city.ac.uk wrote

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

2012-07-18 Thread Ross Paterson
On Wed, Jul 18, 2012 at 05:16:19PM +0100, Simon Hengel wrote: CCing: Ross Paterson and Richard G. On Wed, Jul 18, 2012 at 05:54:44PM +0200, Martijn Schrage wrote: On 18-07-12 17:37, Erik Hesselink wrote: Hi Martijn, Yes, upgrading will obviously fix things (we do use 0.14 on our

Re: [Haskell-cafe] Fwd: hackage compile failure with QuickCheck 2.5

2012-07-17 Thread Ross Paterson
With ghc 7.4.1, cabal-install 0.13.3 and Cabal 1.14.0, % cabal install --avoid-reinstalls sbv-2.2 fails to find a plan without reinstalls, and recommends --solver=modular. % cabal install --solver=modular --avoid-reinstalls sbv-2.2 reinstalls template-haskell-2.6.0.0, which breaks the GHC

Re: [Haskell-cafe] Fwd: hackage compile failure with QuickCheck 2.5

2012-07-17 Thread Ross Paterson
On Wed, Jul 18, 2012 at 12:14:12AM +0100, Antoine Latter wrote: Cabal doesn't play well with version constraints on the template-haskell package - it doesn't know it can't reinstall template-haskell. The workaround is to figure out why QuickCheck has version constraints on template-haskell

Re: [Haskell-cafe] Plain lambda inside banana brackets in the arrow notation

2012-07-15 Thread Ross Paterson
On Sun, Jul 15, 2012 at 06:51:07PM +0100, Tsuyoshi Ito wrote: Thank you for the response. This sounds exciting, but sadly, I must admit that it is a little (?) above my head, and I cannot relate this extension to my original question…. Sorry about that -- I got a bit side-tracked. The

Re: [Haskell-cafe] Plain lambda inside banana brackets in the arrow notation

2012-07-15 Thread Ross Paterson
Silly me -- that code works with the current GHC (module attached). I still think the generalization is worth doing, though. - {-# LANGUAGE Arrows #-} module ArrowTest where import Control.Applicative import Control.Arrow

Re: [Haskell-cafe] Plain lambda inside banana brackets in the arrow notation

2012-07-13 Thread Ross Paterson
On Thu, Jul 12, 2012 at 02:47:57PM +0100, Ross Paterson wrote: Though one possibility that might get us most of the way there would be to refactor the Arrow class as class PreArrow a where premap :: (b - b') - a b' c - a b c class (Category a, PreArrow a) = Arrow a where arr

Re: [Haskell-cafe] Plain lambda inside banana brackets in the arrow notation

2012-07-12 Thread Ross Paterson
On Thu, Jul 05, 2012 at 10:55:07PM +0100, Tsuyoshi Ito wrote: In a program, I have an arrow MyArr and a combinator called repeat of the following type: repeat :: Int - (Int - MyArr e a) - MyArr e a My problem is that the code becomes messy when I use this combinator inside the arrow

Re: [Haskell-cafe] hackage hackage accounts

2012-05-15 Thread Ross Paterson
On Tue, May 15, 2012 at 08:11:05PM +0100, Dmitry Malikov wrote: 1) Did anyone successfully get their hackage account in last 2 months? About 40 of them. But I slipped up with two of you, I think. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Fail-back monad

2012-03-31 Thread Ross Paterson
On Wed, Mar 28, 2012 at 01:34:29AM +0100, Alberto G. Corona wrote: In my package MFlow [1] I program an entire web navigation in a single procedure. That happened in the good-old WASH web application framework. The problem is the back button in the Browser. To go back in the code to the

Re: [Haskell-cafe] Hackage 2 maintainership

2012-02-13 Thread Ross Paterson
On Mon, Feb 13, 2012 at 11:44:18PM +, Ben Gamari wrote: Those of you who follow the Haskell subreddit no doubt saw today's post regarding the status of Hackage 2. As has been said many times in the past, the primary blocker at this point to the adoption of Hackage 2 appears to be the lack

Re: [Haskell-cafe] Is the haddock generator on Hackage down?

2012-01-03 Thread Ross Paterson
On Tue, Jan 03, 2012 at 07:14:58PM +, Bardur Arantsson wrote: No Haddock documentation seems to have been generated on Hackage in the past few days. The machine's down, I think. I'll give it a kick tomorrow. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Splitting off many/some from Alternative

2011-12-14 Thread Ross Paterson
The current definition says that some and many should be the least solutions of the equations some v = (:) $ v * many v many v = some v | pure [] We could relax that to just requiring that they satisfy these equations (which I think is what John wants). In that case there would be

Re: [Haskell-cafe] Splitting off many/some from Alternative

2011-12-14 Thread Ross Paterson
On Thu, Dec 15, 2011 at 02:19:34AM +, Gregory Crosswhite wrote: On Dec 15, 2011, at 12:03 PM, Ross Paterson wrote: The current definition says that some and many should be the least solutions of the equations some v = (:) $ v * many v many v = some v | pure

Re: [Haskell-cafe] Splitting off many/some from Alternative

2011-12-14 Thread Ross Paterson
On Thu, Dec 15, 2011 at 02:36:52AM +, Antoine Latter wrote: This seems to generalize to list: some [] = [] some xs = [cycle xs] many [] = [[]] many xs = [cycle xs] More like some [] = [] some (x:xs) = repeat (repeat x) many [] = [[]] many (x:xs) =

Re: [Haskell-cafe] Cabal upload failure

2011-05-24 Thread Ross Paterson
Version skew problem -- I hope it's fixed now. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Hackage build failure

2011-05-10 Thread Ross Paterson
On Tue, May 10, 2011 at 10:46:53AM +0200, Jonas Almström Duregård wrote: Is there something wrong with the Hackage build system? It fails to build BNFC-meta: http://hackage.haskell.org/package/BNFC-meta It complains about a missing dep even though it (the dependency) has been built

Re: [Haskell-cafe] how to force hackage to use ghc 6.12.3

2011-05-09 Thread Ross Paterson
On Mon, May 09, 2011 at 11:38:47AM +0200, Daniel Fischer wrote: On Monday 09 May 2011 08:54:49, Michal Konečný wrote: I was hoping hackage will try also ghc 6.12.3 but it does not. Is there some way I can change the cabal file to help hackage to compile it with 6.12.3 and generate haddock?

Re: [Haskell-cafe] ANN: unordered-containers - a new, faster hashing-based containers library

2011-02-24 Thread Ross Paterson
On Wed, Feb 23, 2011 at 08:45:47AM +, Max Bolingbroke wrote: 3. Some map combining algorithms work more efficiently when one of their two arguments are smaller. For example, Data.Map.union is most efficient for (bigmap `union` smallmap). If you don't care about which of the two input maps

Re: [Haskell-cafe] upgrading mtl1 to mtl2

2011-02-16 Thread Ross Paterson
On Tue, Feb 15, 2011 at 07:46:29PM -0800, Evan Laforge wrote: Do I really have to add (Functor m) to the 300 or so functions with (Monad m) on them? Or just not use fmap or applicative? If you're using Monad m to get Functor or Applicative instances for a functor built from m, then I'm afraid

Re: [Haskell-cafe] Byte Histogram

2011-02-07 Thread Ross Paterson
On Mon, Feb 07, 2011 at 11:05:53AM +, John Lato wrote: From: Ivan Lazar Miljenovic ivan.miljeno...@gmail.com On 7 February 2011 12:30, wren ng thornton w...@freegeek.org wrote: On 2/6/11 4:53 PM, Ivan Lazar Miljenovic wrote: On 7 February 2011 08:12, Alexey

Re: [Haskell-cafe] Incrementially updating an array

2010-12-28 Thread Ross Paterson
On Tue, Dec 28, 2010 at 08:46:24PM +0800, Robert Clausecker wrote: I have the following problem. As code is most time easier to understand, let give an example what I try to do in C: unsigned int i,j; unsigned int r[100]; for (i = 0; i 100; i++) { j = makeResult(); //j is known to

Re: [Haskell-cafe] List of numbers to list of ranges

2010-12-23 Thread Ross Paterson
On Thu, Dec 23, 2010 at 10:57:43PM +0530, C K Kashyap wrote: Here's my attempt to convert a list of integers to a list of range tuples - Given [1,2,3,6,8,9,10], I need [(1,3),(6,6),8,10)] import Data.Function import Data.List ranges ns = [(head gp, last gp) | gp - map

Re: [Haskell-cafe] Problem with class Control.Monad.Error noMsg usage

2010-12-21 Thread Ross Paterson
On Tue, Dec 21, 2010 at 03:28:22PM +, Aaron Gray wrote: I have been trying to build the Scheme in 24 Hours on WikiBooks :- http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours http://jonathan.tang.name/files/scheme_in_48/code/listing10.hs But I am getting an error

Re: [Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Ross Paterson
On Wed, Dec 15, 2010 at 09:01:49AM -0500, Dimitry Golubovsky wrote: HTML (a small piece of it): provides the classes div class=inline-codediv dir=ltr style=text-align: left;div class=source-haskell style=font-family: monospace;MonadTrans/div/div/div Words MonadTrans, MonadIO, StateT etc

Re: [Haskell-cafe] Hackage down?

2010-12-04 Thread Ross Paterson
On Sat, Dec 04, 2010 at 02:01:44PM +, Ozgur Akgun wrote: http://downforeveryoneorjustme.com/http://hackage.haskell.org Apparently {darcs,hackage}.haskell.org is out for the day -- announced on Reddit but not here. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] category-extras clash with transformers

2010-11-20 Thread Ross Paterson
On Sat, Nov 20, 2010 at 10:58:44PM +1000, Tony Morris wrote: I have installed mtl-1.1.1.0 so that xmonad-contrib-0.9.1 would compile with GHC 6.12.1. http://permalink.gmane.org/gmane.comp.lang.haskell.xmonad/10603 Then I tried to installed category-extras-0.53.5, which clashed with

Re: [Haskell-cafe] cabal update error

2010-11-13 Thread Ross Paterson
On Sat, Nov 13, 2010 at 08:33:18PM +1100, Ivan Lazar Miljenovic wrote: I would guess that it's related to http://www.reddit.com/r/haskell/comments/e5db7/alert_hackage_downtime_tomorrow_0600_1200_pst/ That would be 14:00 - 20:00 UTC, wouldn't it? ___

[Haskell-cafe] new version of the mtl package

2010-11-08 Thread Ross Paterson
After lengthy discussion on the libraries list, the mtl package has been updated to depend on the transformers package, from which mtl re-exports the monad transformers and the MonadTrans and MonadIO classes. This makes the two packages compatible. The monads-fd package is now a deprecated stub

Re: [Haskell-cafe] What do you call Applicative Functor Morphism?

2010-11-06 Thread Ross Paterson
On Fri, Nov 05, 2010 at 11:49:27PM -0400, rocon...@theorem.ca wrote: An applicative functor morphism is a polymorphic function, eta : forall a. A1 a - A2 a between two applicative functors A1 and A2 that preserve pure and *: eta (pure c) = pure c eta (f * x) = eta f * eta x What do you

Re: [Haskell-cafe] Is Curry alive?

2010-11-05 Thread Ross Paterson
On Thu, Nov 04, 2010 at 06:06:40PM -0400, Dan Doel wrote: Implementing type inference can be very easy in a logic language, because most of the work in a non-logic language is implementing unification: Provided the implementation includes the occurs check.

Re: [Haskell-cafe] Red links in the new haskell theme

2010-10-30 Thread Ross Paterson
On Sat, Oct 30, 2010 at 05:26:33PM +0200, Henning Thielemann wrote: Two notes on the Classic style: The package field names like Version, Dependencies, License are centered, which was not the case in the original style. Also in the original style the table cells had a grey background, what I

Re: [Haskell-cafe] Red links in the new haskell theme

2010-10-30 Thread Ross Paterson
On Sat, Oct 30, 2010 at 06:39:00PM +0200, Henning Thielemann wrote: It's still vertically centered, which makes it difficult to see, e.g. where the dependency list starts and where it ends if it is several lines long. Not any more. ___ Haskell-Cafe

Re: [Haskell-cafe] HackageDB: Haddock parse failure

2010-09-27 Thread Ross Paterson
On Mon, Sep 27, 2010 at 06:22:09PM +0200, Jonas Almström Duregård wrote: Also, perhaps HackageDB should ignore errors in building the documentation? Currently the reported build failure propagates to the dependencies of the library... The only reason it's building is to generate the

Re: [Haskell-cafe] ANN: happstack-auth-0.2

2010-09-18 Thread Ross Paterson
On Sat, Sep 18, 2010 at 08:19:33PM +0200, Nils Schweinsberg wrote: Am 17.09.2010 22:06, schrieb Nils Schweinsberg: [1] http://hackage.haskell.org/package/happstack-auth Hackage fails to build this package: http://hackage.haskell.org/packages/archive/happstack-auth/0.2/logs/failure/ghc-6.12

Re: [Haskell-cafe] A new cabal odissey: cabal-1.8 breaking its own neck by updating its dependencies

2010-09-13 Thread Ross Paterson
On Sat, Sep 11, 2010 at 12:17:27PM -0700, Jason Dagit wrote: From the FAQ linked by Paolo: http://www.haskell.org/cabal/FAQ.html#dependencies-conflict To avoid this problem in the future, avoid upgrading core packages. The latest version of cabal-install has disabled the upgrade command

Re: [Haskell-cafe] Combining applicative with arrows?

2010-09-10 Thread Ross Paterson
On Fri, Sep 10, 2010 at 10:34:04AM +0200, Nils Schweinsberg wrote: I just wondered if you can define Applicative instances for arrows? Basicly what I thought of is: I have a type for my arrow which is CollectA (using HXT here): type CollectA a = SomeArrow XmlTree a If you do import

Re: [Haskell-cafe] Is bumping the version number evil, if it's not mandated by the PVP?

2010-08-14 Thread Ross Paterson
On Sat, Aug 14, 2010 at 11:13:19AM +0200, Sebastian Fischer wrote: I wonder whether (and how) I should increase the version number of a library when the API does not change but the implementation gets more efficient. Should I bump a.b.C or even a.B to signal that it's worth using the new

Re: [Haskell-cafe] dear traversable

2010-07-31 Thread Ross Paterson
On Fri, Jul 30, 2010 at 08:13:43PM -0700, Ben wrote: dear traversable geniuses -- i am looking for better implementations of unzipMap :: M.Map a (b, c) - (M.Map a b, M.Map a c) unzipMap m = (M.map fst m, M.map snd m) unliftMap :: (Ord a) = M.Map a (b - c) - M.Map a b - M.Map a c

Re: [Haskell-cafe] Monad transformers, design

2010-07-31 Thread Ross Paterson
On Sat, Jul 31, 2010 at 10:56:31PM +1000, Tony Morris wrote: -- Suppose some data type newtype Inter a = Inter (Int - a) -- and a monad transformer for that data type. newtype InterT m a = InterT (m (Inter a)) The monad transformer should be Inter (m a).

Re: [Haskell-cafe] Weird behavior with arrow commands

2010-07-24 Thread Ross Paterson
On Sat, Jul 24, 2010 at 01:10:56PM +0200, Jürgen Doser wrote: This seems to be a bug in ghc. First, let's fix bar to give the full three arguments (Int, Float, Double) to g: bar f g = proc x - do (f - x) `foo` (\n m k - g - (n,m,k)) ghc infers the type: bar :: (t - String) -

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-22 Thread Ross Paterson
On Wed, Jul 21, 2010 at 09:43:16AM -0700, Rogan Creswick wrote: On Wed, Jul 21, 2010 at 3:00 AM, Magnus Therning mag...@therning.org wrote: I am successfully using hooks with the following in my .cabal file:    Build-Type    : Simple I've been unable to reproduce this -- flipping the

Re: [Haskell-cafe] cabal, Setup.lhs example

2010-07-22 Thread Ross Paterson
On Thu, Jul 22, 2010 at 11:31:21AM +0100, Magnus Therning wrote: On Thu, Jul 22, 2010 at 10:59, Ross Paterson r...@soi.city.ac.uk wrote: Magnus is building by directly running the Setup.hs himself, which ignores the Build-Type.  To get cabal-install to use his Setup.hs, the Build-Type must

Re: [Haskell-cafe] Re: Transformers versus monadLib versus...

2010-07-09 Thread Ross Paterson
On Fri, Jul 09, 2010 at 03:13:19PM -0400, Edward Kmett wrote: On Thu, Jul 8, 2010 at 12:37 PM, Yitzchak Gale g...@sefer.org wrote: btw, does this overhaul include adding Applicative instances, perchance? They are already part of monads-fd and would, I presume, come along for the

Re: [Haskell-cafe] Build problems on Hackage server

2010-07-08 Thread Ross Paterson
On Wed, Jul 07, 2010 at 10:22:25AM +0200, Emil Axelsson wrote: Last week I uploaded new versions of feldspar-language and feldspar-compiler. Both packages build just fine on our local machines with GHC 6.10 and 6.12. But Hackage reports the following build failure: cabal: dependencies

Re: [Haskell-cafe] Type classes

2010-07-04 Thread Ross Paterson
On Sun, Jul 04, 2010 at 09:55:53PM +1000, Ivan Lazar Miljenovic wrote: Andrew Coppin andrewcop...@btinternet.com writes: In summary, I think we need to devise a way of better-documenting class instances. Haddock 2.7 supports documenting instance implementations; I don't know how this

Re: [Haskell-cafe] Type classes

2010-07-04 Thread Ross Paterson
On Sun, Jul 04, 2010 at 02:32:35PM +0200, Daniel Fischer wrote: On Sunday 04 July 2010 14:07:03, Ivan Lazar Miljenovic wrote: Ross Paterson r...@soi.city.ac.uk writes: Hmm, it seems only partial: documentation attached to an instance is shown in the list of instances under a type

Re: [Haskell-cafe] Call for comments: neither package

2010-06-29 Thread Ross Paterson
On Tue, Jun 29, 2010 at 02:56:18PM -0500, Jeremy Shaw wrote: On Jun 29, 2010, at 6:02 AM, Stephen Tetley wrote: The Applicative Programming with Effects Paper has the monodial accumulating applicative instance on a sum type Conor McBride and Ross Paterson call Except: data Except err a = OK

Re: [Haskell-cafe] IO (Either a Error) question

2010-05-07 Thread Ross Paterson
On Sat, May 08, 2010 at 07:49:57AM +1000, Ivan Lazar Miljenovic wrote: Limestraël limestr...@gmail.com writes: 2010/5/1 John Millikin jmilli...@gmail.com You might want to make a local version of ErrorT in your library, to avoid the silly 'Error' class restriction. This is pretty easy;

Re: [Haskell-cafe] IO (Either a Error) question

2010-05-07 Thread Ross Paterson
On Sat, May 08, 2010 at 01:54:21AM +0200, Limestraël wrote: Personally I think fail is a terrible wart, and should be shunned. So do I. I can't understand its purpose since monads which can fail can be implemented through MonadPlus. It was introduced to implement pattern match failure in

Re: [Haskell-cafe] The instability of Haskell libraries

2010-04-25 Thread Ross Paterson
On Mon, Apr 26, 2010 at 06:47:27AM +1000, Ivan Lazar Miljenovic wrote: My main problem with this is if you want a custom variant of that instance. Let's take FGL graphs for example with instances for QuickCheck's Arbitrary class. Maybe you want arbitrary graphs that are simple, or maybe

Re: [Haskell-cafe] The instability of Haskell libraries

2010-04-24 Thread Ross Paterson
On Sat, Apr 24, 2010 at 08:21:04PM +1000, Ivan Lazar Miljenovic wrote: Mads Lindstrøm mads.lindstr...@gmail.com writes: But that would be an API change. It is of cause a question of how strict we want to be. I have seen several times that commercial software developers denies changes bugs,

Re: [Haskell-cafe] The instability of Haskell libraries

2010-04-24 Thread Ross Paterson
On Sat, Apr 24, 2010 at 08:48:07PM +1000, Ivan Lazar Miljenovic wrote: Ross Paterson r...@soi.city.ac.uk writes: Same major version: any code using fully explicit imports that worked with the old version will work with the new version, in the same way. By this you mean that additions have

Re: [Haskell-cafe] ANN: haskell-src-exts 1.9.0

2010-04-15 Thread Ross Paterson
On Thu, Apr 15, 2010 at 10:52:51AM +0200, Sean Leather wrote: Any idea why the Haddock docs have not been generated for this version? There's also no built on available. Is it an issue with the server? A glitch when I was switching the builds to use cabal install --dry-run.

Re: [Haskell-cafe] Re: GSoC: Hackage 2.0

2010-04-13 Thread Ross Paterson
On Fri, Apr 09, 2010 at 09:23:51PM -0400, Matthew Gruen wrote: The proposal as I submitted it is here: http://docs.google.com/View?docid=0Afa5MxwyB_zYZGhjanNrdjNfMjkzZjloOWNienYpageview=1hgd=1hl=en [...] The work on bringing hackage-server up to feature parity is primary. Absolutely. I

Re: [Haskell-cafe] Re: Hackage accounts and real names

2010-04-06 Thread Ross Paterson
On Tue, Apr 06, 2010 at 10:10:09AM +0100, David House wrote: 3. Privacy issues. Some people simply cannot reveal their real names. I've already said I was prepared to make exceptions in such cases, but perhaps you missed that. ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Why does Haskell not infer most general type?

2010-04-06 Thread Ross Paterson
On Tue, Apr 06, 2010 at 03:56:32PM -0400, Job Vranish wrote: f _ = undefined where _ = y :: Int - Int y x = undefined where _ = f x Because f and y are mutually recursive, their types are inferred together, so y gets the type Int - Int (as given), which forces f :: Int - a.

Re: [Haskell-cafe] Why does Haskell not infer most general type?

2010-04-06 Thread Ross Paterson
On Tue, Apr 06, 2010 at 05:18:34PM -0400, Job Vranish wrote: So in Haskell 98, would the added constraints result in a type error? Yes, because the types of the mutually recursive identifiers would be inferred together without using the type signatures, and then would fail to match the declared

Re: [Haskell-cafe] Hackage accounts and real names

2010-04-05 Thread Ross Paterson
On Sun, Apr 04, 2010 at 10:28:26PM +0100, David House wrote: An issue came up on #haskell recently with Hackage accounts requiring real names. The person in question (who didn't send this email as he's wishing to remain anonymous) applied for a Hackage account and was turned down, as he

Re: [Haskell-cafe] Re: ANN: data-category, restricted categories

2010-03-30 Thread Ross Paterson
On Tue, Mar 30, 2010 at 11:26:39PM +0100, Conor McBride wrote: Getting back to the question, whatever happened to empty case expressions? We should not need bottom to write total functions from empty types. Empty types? Toto, I've a feeling we're not in Haskell anymore.

Re: [Haskell-cafe] breadth first search one-liner?

2010-03-22 Thread Ross Paterson
On Mon, Mar 22, 2010 at 11:02:32AM +0100, Johannes Waldmann wrote: Dear all, there is this neat one-line BFS implementation bfs :: Eq a = ( a - [a] ) - a - [a] bfs next start = let xs = nub $ start : ( xs = next ) in xs but it has a problem: it only works for infinite

Re: [Haskell-cafe] Re: breadth first search one-liner?

2010-03-22 Thread Ross Paterson
On Mon, Mar 22, 2010 at 10:30:32AM +, Johannes Waldmann wrote: Nice! - Where's the 'nub'? A bit longer: bfs :: Eq a = (a - [a]) - a - [a] bfs f s = concat $ takeWhile (not . null) $ map snd $ iterate step ([], [s]) where step (seen, xs) = let seen' = xs++seen in (seen', nub $ [y | x - xs,

Re: [Haskell-cafe] Re: breadth first search one-liner?

2010-03-22 Thread Ross Paterson
A bit closer to the original: bfs :: Eq a = (a - [a]) - a - [a] bfs f s = concat $ takeWhile (not . null) levels where levels = foldr trim [] $ [s] : map (nub . (= f)) levels trim xs xss = xs : map (\\ xs) xss ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Seen on reddit: or, foldl and foldr considered slightly harmful

2010-02-11 Thread Ross Paterson
On Thu, Feb 11, 2010 at 11:00:51AM +0100, Ketil Malde wrote: Johann Höchtl johann.hoec...@gmail.com writes: In a presentation of Guy Steele for ICFP 2009 in Edinburgh: http://www.vimeo.com/6624203 he considers foldl and foldr harmful as they hinder parallelism because of Process first

Re: [Haskell-cafe] ANN: data-ordlist-0.2

2010-02-07 Thread Ross Paterson
Why not wrap lists as Set and Bag abstract datatypes? An added bonus is that you could make them instances of Monoid. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] HList darcs repo missing?

2010-01-25 Thread Ross Paterson
On Mon, Jan 25, 2010 at 05:27:57PM -0500, Gwern Branwen wrote: It was there as of 15 September 2009 when I sent Oleg my last patch. Maybe some of the server changes since messed around with it? Most things that could be moved to community.haskell.org weren't moved across to the new machine:

Re: [Haskell-cafe] Non-termination due to context

2010-01-22 Thread Ross Paterson
On Fri, Jan 22, 2010 at 12:24:37PM +0100, Emil Axelsson wrote: Consider the following program: {-# LANGUAGE FlexibleInstances, OverlappingInstances, UndecidableInstances #-} class B a = A a instance A Int class Eq a = B a instance (A a, Eq a) = B a [...] Although I don't know all

Re: [Haskell-cafe] Non-ASCII characters in .cabal files break Haddock?

2010-01-20 Thread Ross Paterson
On Tue, Jan 19, 2010 at 01:00:07PM -0800, John Millikin wrote: I recently uploaded a package to Hackage[1], which contains a non-ASCII character in the .cabal file. That file is encoded with UTF-8, and it displays fine in Vim, Firefox, and even the Hackage package landing page. However,

Re: [Haskell-cafe] Parse error

2010-01-17 Thread Ross Paterson
On Sun, Jan 17, 2010 at 10:33:45AM +, Andrew Coppin wrote: Tony Morris wrote: main = do putStrLn Line 1 putStrLn Line 2 let xs = do x - [1..10] y - [1..10] return (x+y) print xs Urg, but that's *ugly*. Is there no way I can reduce the amount of

Re: [Haskell-cafe] ANN: amqp-0.1

2010-01-17 Thread Ross Paterson
On Sun, Jan 17, 2010 at 12:35:08PM +0100, Holger Reinhardt wrote: Get it here: http://hackage.haskell.org/package/amqp For some reason it doesn't compile on Hackage. It says At least the following dependencies are missing: network-bytestring =0.1.2. Is there a way to solve this? Sorry, that

Re: [Haskell-cafe] Hackage strangeness

2010-01-15 Thread Ross Paterson
On Fri, Jan 15, 2010 at 03:45:56PM +0100, Roel van Dijk wrote: I wrote a small cronjob to update my hackage reverse-deps. When checking if it worked I noticed that my hackage appears to be more up-to-date than the real thing! [...] Is this a case of data loss or something else? It's in

Re: [Haskell-cafe] Hackage strangeness

2010-01-15 Thread Ross Paterson
On Fri, Jan 15, 2010 at 03:08:36PM +, Ross Paterson wrote: It's in the process of moving to a new (and hopefully more reliable) host. Done. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Haddock question: hiding internal instances

2010-01-15 Thread Ross Paterson
On Fri, Jan 15, 2010 at 09:16:03PM +0100, Niklas Broberg wrote: The question I have is this: How can I get Haddock to omit listing instances of package-internal data types for exported classes? It's a known limitation: http://trac.haskell.org/haddock/ticket/37

Re: [Haskell-cafe] HackageDB Question

2010-01-09 Thread Ross Paterson
On Sat, Jan 09, 2010 at 01:44:03PM -0800, Gregory Crosswhite wrote: How does HackageDB generate the documentation for uploaded packages? Specifically, if I am using my own build system rather than Cabal, then what do I need to do (e.g., what interface do I need to supply) for HackageDB to

Re: [Haskell-cafe] ANNOUNCE: error-message

2009-12-06 Thread Ross Paterson
On Sun, Dec 06, 2009 at 03:50:55PM -0500, Brent Yorgey wrote: So what we have here, it seems, is a type with at least two reasonable Applicative instances, one of which does *not* correspond to a Monad instance. My argument is that it is very strange (I might even go so far as to call it a

Re: [Haskell-cafe] New Hackage category: Error Handling

2009-12-05 Thread Ross Paterson
On Sat, Dec 05, 2009 at 05:52:11PM +0200, Michael Snoyman wrote: For the record, I find this pedanticism misplaced, ... I think you'll find that's pedantry. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] module export question

2009-12-01 Thread Ross Paterson
On Tue, Dec 01, 2009 at 05:11:42PM -0500, Sean McLaughlin wrote: The problem is that I explicitly didn't export 't' as an element of T (by not writing T(..)). Am I just misunderstanding how exports work? I couldn't figure out what the correct behavior should be by looking at the 98 report.

  1   2   3   4   >