Re: [Haskell-cafe] Complete package description list

2011-12-06 Thread Paterson, Ross
Shakthi Kannan writes: > So, how would I know if there is a new package in it, other than > having to compare it to the previous snapshot? Does the filename > (00-index.tar.gz) change? The filename doesn't change. You could use the RSS feed or the upload log (http://hackage.haskell.org/packages/a

Re: [Haskell-cafe] Complete package description list

2011-12-06 Thread Paterson, Ross
Shakthi Kannan writes: > How often does the 00-index.tar.gz file from: > > http://hackage.haskell.org/packages/archive/00-index.tar.gz > > get updated? It is updated each time a new package is uploaded, and contains the .cabal files for all available packages. __

Re: [Haskell-cafe] Const vs Constant types

2011-11-19 Thread Paterson, Ross
Denis Moskvin writes: > Is there any rationale for coexistence of > newtype Const a b = Const { getConst :: a } > from Control.Applicative and > newtype Constant a b = Constant { getConstant :: a } > from Data.Functor.Constant (transformers package)? It was an accident. I think it would make

Re: [Haskell-cafe] Hackage feature request: E-mail author when a package breaks

2011-11-01 Thread Paterson, Ross
Daniel Díaz Casanueva writes: > How about to a new optional Cabal field like "mail-report"? (don't bother > about this name, I chose it randomly) > > If a build failure happens, or there is some relevant information about your > package, Hackage will send a mail to the direction specified in that

Re: [Haskell-cafe] arr considered harmful

2011-10-31 Thread Paterson, Ross
Ryan Ingram writes: > Most of the conversion from arrow syntax into arrows uses 'arr' to move > components around. However, arr is totally opaque to the arrow itself, and > prevents describing some very useful objects as arrows. > For example, I would love to be able to use the arrow syntax to d

Re: [Haskell-cafe] A catch-all MonadIO instance

2011-10-28 Thread Paterson, Ross
Bas van Dijk writes: > Is it unsafe to add the following catch-all MonadIO instance to > transformers' Control.Monad.IO.Class module? > > {-# LANGUAGE FlexibleInstances, FlexibleContexts, UndecidableInstances #-} > > instance (MonadTrans t, Monad (t m), MonadIO m) => MonadIO (t m) where > liftI

Re: [Haskell-cafe] Question, re: using Automaton

2011-10-16 Thread Paterson, Ross
Captain Freako (quoting Control.Arrow.Transformer.Automaton): > Encapsulating an automaton by running it on a stream of inputs, obtaining a > stream of outputs. > Typical usage in arrow notation: > proc p -> do > ... > ys <- (|runAutomaton (\x -> ...)|) xs

Re: [Haskell-cafe] Package documentation complaints -- and a suggestion

2011-10-10 Thread Paterson, Ross
Max Rabkin writes: > But I also have a concrete suggestion for Hackage: include the package > synopsis on the package's page. The distinction between synopsis and > description can be confusing, and sometimes it seems to violate DRY to > have the same info in both. You may have missed the header o

Re: [Haskell-cafe] Proposal: Subcomputations in arrow notation

2011-09-21 Thread Paterson, Ross
Ertugrul Soeylemez writes: > I find myself writing the following very often: > > system :: Wire IO () String > system = > proc _ -> do > botAddPeriod <- succ ^<< noise -< () > botAddSpeed <- noise1 -< () > botAddStart <- noise1 -< () >

Re: [Haskell-cafe] instance Enum Double considered not entirely great?

2011-09-20 Thread Paterson, Ross
Daniel Fischer writes: >> A numeric range [a..a+n] might be expected >> to have a+n+1 elements, but that doesn't hold either for Float and >> Double. I think Enum for floating point values is broken > >Yes, it is. Like Eq and Ord. .. only more so. And the brokenness has infected Rational: try [

Re: [Haskell-cafe] The applicative instances for Either?

2011-09-17 Thread Paterson, Ross
Ketil Malde writes: > I have a program that makes use of the applicative instance for Either > String. I used to define these instances locally, but at some point, > they became part of Control.Applicative. I have limited the > dependencies to 'base >= 4', but apparently, some version 4s of base

Re: [Haskell-cafe] Finger Tree without using Monoid

2011-09-02 Thread Paterson, Ross
Xinyu LIU writes: > I was trying to implement MTF (move-to-front) algorithm, However, neither > Array nor List satisfied all aspects. Array: Although the random access is O(1), However, move an element to front takes O(N) in average; List: Although move to front is O(1), However, random acces

Re: [Haskell-cafe] ANNOUNCE: yap-0.0 - yet another prelude

2011-08-11 Thread Paterson, Ross
Sebastian Fischer [fisc...@nii.ac.jp] wrote: > I'm curious: what laws do you have in mind for '+', '-', and '0' that > do not hold in the multiplicative group of rational numbers with > > (+) = (*); (-) = (/); 0 = 1 > > ? x - x = zero, for one. (with x the other 0) ___

Re: [Haskell-cafe] Baffling Hackage build log

2011-07-13 Thread Paterson, Ross
> This seems to be a general problem with the Hackage server as other > packages uploaded after yours have failed to build with similar > errors... It seems one batch of builds was broken due to some failure in downloading the package index. I've re-run it. __

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-26 Thread Paterson, Ross
> > Still, the clause > > > > b1 contains a free identifier that has no type signature and > > is bound by b2 > > > > applies the phrase "has no type signature" to the identifier, not to > > the binding. Such phrasing does not exclude expression > > type-signatures. > > True. Tha

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-26 Thread Paterson, Ross
> Still, the clause > > b1 contains a free identifier that has no type signature and > is bound by b2 > > applies the phrase "has no type signature" to the identifier, not to > the binding. Such phrasing does not exclude expression > type-signatures. True. That ambiguity could be

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-26 Thread Paterson, Ross
> If this is the case, then multiple sentences in the 2010 report don't > make sense, though the way in which they don't make sense sort of > depends on what "simple pattern binding" means. Indeed, the Report has two problems: Sections 4.4.3.2 and 4.5.5 have different definitions of "simple patte

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-25 Thread Paterson, Ross
> I thought "no type signature" meant no type signature inside b1. No, it means no type signature for the variable. > Otherwise, you are saying nothing could depend on a binding with a > type signature. By that logic, there can be no mutual dependence, > and so every declaration with a type sign

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-25 Thread Paterson, Ross
> > > g1 x y z = if x>y then show x ++ show z else g2 y x > > > > > > g2 :: (Show a, Ord a) => a -> a -> String > > > g2 | False = \p q -> g1 q p () > > >| otherwise = \p q -> g1 q p 'a' > > >where x = True > > > > It appears to me that GHC is justified. Accordin