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

2011-05-08 Thread Michal Konečný
Hi, I have been releasing packages on hackage that do not build with ghc 7.0.* due to a bug that will be fixed in ghc 7.2.1. (One of the packages is http://hackage.haskell.org/package/AERN-Basics) I was hoping hackage will try also ghc 6.12.3 but it does not. Is there some way I can change

Re: [Haskell-cafe] ANN: Newt - command-line template instantiation tool & library

2011-05-08 Thread briand
On Sun, 8 May 2011 16:23:59 -0700 Rogan Creswick wrote: > Newt scans the input (either a file, directory or stdin) for tags > marked with "<<>>" [1], then replaces those entries with > values specified on the command line, producing either a new file, > modifying the input template in place (--in

[Haskell-cafe] repa Shape help

2011-05-08 Thread briand
Howdy, as usual, the haskell type system complete defeats me in the simplest of applications: import Data.Array.Repa as A import Data.Array.Repa.Index import Data.Array.Repa.Shape as AS main = do let x = A.fromList (AS.shapeOfList [2, 2]) ([1.0, 2.0, 3.0, 4.0]::[Double]) putStrLn $ show x

Re: [Haskell-cafe] ANNOUNCE: iterIO-0.1 - iteratee-based IO with pipe operators

2011-05-08 Thread Richard O'Keefe
On 7/05/2011, at 2:44 PM, Mario Blažević wrote: > As I said, the most usual name for the Enumerator concept would be Generator. > That term is already used in several languages to signify this kind of > restricted coroutine. I'm not aware of any good alternative naming for > Iteratee. This being

[Haskell-cafe] ANN: Newt - command-line template instantiation tool & library

2011-05-08 Thread Rogan Creswick
I'm happy to announce Newt: a trivial tool for creating boilerplate. I frequently need to create projects with slight customizations -- I have a particular layout for cabal projects, and make files for LaTeX papers, etc... However, there are often fields that need to be updated in many places. (

Re: [Haskell-cafe] For Project Euler #24 you don't need to generate all the lexicographic permutations

2011-05-08 Thread KC
I see from the solutions on Project Euler others did think of this way but at least on my last IQ test I did get an 'A'; 95. I am a jenius. :D -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/lis

Re: [Haskell-cafe] trying to cabal install lambdabot, failure on 'random' package

2011-05-08 Thread Albert Y. C. Lai
On 11-05-08 03:24 AM, Sean Perry wrote: package random-1.0.0.3 requires time-1.2.0.3 package random-1.0.0.3 requires time-1.2.0.4 In addition to unregistering --user random-1.0.0.3, also unregister --user time-1.2.0.4, the real culprit. The real culprit is why you are infected with a duplicat

[Haskell-cafe] Apache license, any drawbacks for Haskell packages?

2011-05-08 Thread Magnus Therning
Are there any drawbacks to using the Apache license for Haskell packages? /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org twitter: magthe http://therning.org/magnus I invented the term Object-Oriented, and I

Re: [Haskell-cafe] For Project Euler #24 you don't need to generate all the lexicographic permutations

2011-05-08 Thread Jeff Wheeler
On Sun, May 8, 2011 at 10:41 AM, wrote: > For Project Euler #24 you don't need to generate all the lexicographic > permutations by Knuth's method or any other. This is a clever, smart solution. You should post it to the Haskell Wiki page [0]. [0] http://haskell.org/haskellwiki/Euler_problems/21

[Haskell-cafe] For Project Euler #24 you don't need to generate all the lexicographic permutations

2011-05-08 Thread caseyh
For Project Euler #24 you don't need to generate all the lexicographic permutations by Knuth's method or any other. You're only looking for the millionth lexicographic permutation of "0123456789" Problem 24 A permutation is an ordered arrangement of objects. For example, 3124 is one pos

Re: [Haskell-cafe] Type-class conditional behavior

2011-05-08 Thread dm-list-haskell-cafe
At Sat, 7 May 2011 22:14:27 -0700, Nicholas Tung wrote: > > Dear all, > >     I'd like to write a function "maybeShow :: a -> Maybe String", which runs > "show" if its argument is of class Show. You can't do this, because in general there is no way to know whether an arbitrary object a is of cla

Re: [Haskell-cafe] trying to cabal install lambdabot, failure on 'random' package

2011-05-08 Thread Daniel Fischer
On Sunday 08 May 2011 09:24:50, Sean Perry wrote: > package random-1.0.0.3 requires time-1.2.0.3 > package random-1.0.0.3 requires time-1.2.0.4 > Preprocessing library show-0.4.1.1... > Building show-0.4.1.1... > : cannot satisfy -package-id > random-1.0.0.3-749b78c54a8a1b32dbb45d98a91b: > ran

Re: [Haskell-cafe] trying to cabal install lambdabot, failure on 'random' package

2011-05-08 Thread Stephen Tetley
It looks like cabal-install is wanting to do wacky things to the GHC boot libraries, which means something is seriously astray. What happens when you run `ghc-pkg check` ? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mai

Re: [Haskell-cafe] no time profiling on my MacBookPro8,1

2011-05-08 Thread Malcolm Wallace
On 6 May 2011, at 23:07, Nicolas Frisby wrote: > all of the %time cells in the generated Main.prof file are 0.0, as is > the total time count (0.00 secs and 0 ticks). The %alloc cells seem > normal. See http://hackage.haskell.org/trac/ghc/ticket/5137 Regards, Malcolm _

Re: [Haskell-cafe] Type-class conditional behavior

2011-05-08 Thread Gábor Lehel
On Sun, May 8, 2011 at 7:14 AM, Nicholas Tung wrote: > Dear all, >     I'd like to write a function "maybeShow :: a -> Maybe String", which > runs "show" if its argument is of class Show. >     The context and motivation for this are as follows. I have a GADT type > which encapsulates abstract-val

Re: [Haskell-cafe] trying to cabal install lambdabot, failure on 'random' package

2011-05-08 Thread Sean Perry
On May 7, 2011, at 12:41 AM, Stephen Tetley wrote: > "show" is the failing package > > A look on Hackage suggests that "show" had problems with its cabal > file at versions 0.4 & 0.4.1 and was fixed at 0.4.1.1. > > Can you try installing "show" individually at 0.4.1.1 the try > installing the r

Re: [Haskell-cafe] Type-class conditional behavior

2011-05-08 Thread Ryan Ingram
The behavior you are asking for "maybeShow" violates parametricity, so it can't exist without some sort of typeclass constraint. That said, in your particular situation, it's an interesting question. The Show instance for Either is instance (Show a, Show b) => Show (Either a b) where ... so we

Re: [Haskell-cafe] Type-class conditional behavior

2011-05-08 Thread Stephen Tetley
On 8 May 2011 06:14, Nicholas Tung wrote: > Dear all, >     I'd like to write a function "maybeShow :: a -> Maybe String", which > runs "show" if its argument is of class Show. I'm pretty sure this is not readily possible - there might be some hack through Typeable but that would oblige but Show