[Haskell-cafe] Can't login to GHC trac

2010-04-13 Thread Erik de Castro Lopo
Hi all, I'm having trouble logging into GHC's Trac bug tracker at: http://hackage.haskell.org/trac/ghc/ I'm using Iceweasel 3.5.8 (Debian's rebranded Firefox) and I've also tried Galeon. The message I get is: Redirect Loop Redirection limit for this URL exceeded. Unable to load t

Re: [Haskell-cafe] problem getting cabal-install to work on CentOS 5.2

2010-04-13 Thread Corey O'Connor
I suspect CentOS might disable execute permissions on anything under /tmp. To verify this just try creating a simple sh script under /tmp and executing it directly with ./test.sh. -Corey O'Connor On Mon, Apr 12, 2010 at 5:05 AM, Chris Dornan wrote: > Hi, > > > > I am trying to install cabal-ins

[Haskell-cafe] a way to convert partial functions to functions with Maybe's

2010-04-13 Thread Ozgur Akgun
Cafe, Is there a way (without going into the IO lands) to achieve this: data T = A | B | C func1 :: T -> T func1 A = B func1Fixed :: T -> Maybe T func1Fixed A = Just B func1Fixed _ = Nothing I want a function to generate func1Fixed, given func1. I guess this is doable with exception handling

Re: [Haskell-cafe] Can't login to GHC trac

2010-04-13 Thread Daniel Fischer
Am Dienstag 13 April 2010 09:29:18 schrieb Erik de Castro Lopo: > Hi all, > > I'm having trouble logging into GHC's Trac bug tracker at: > > http://hackage.haskell.org/trac/ghc/ > > I'm using Iceweasel 3.5.8 (Debian's rebranded Firefox) and I've > also tried Galeon. The message I get is: > >

Re: [Haskell-cafe] Can't login to GHC trac

2010-04-13 Thread Erik de Castro Lopo
Daniel Fischer wrote: > Am Dienstag 13 April 2010 09:29:18 schrieb Erik de Castro Lopo: > > > Anyone else have the same problem? > > I have that problem with my hackage (Cabal/cabal-install) trac account > (Firefox, SeaMonkey, Konqueror). > It started when I forgot the password and had it mail a

Re: [Haskell-cafe] a way to convert partial functions to functions with Maybe's

2010-04-13 Thread Daniel Schoepe
Excerpts from Ozgur Akgun's message of Tue Apr 13 12:02:06 +0200 2010: > Cafe, > > Is there a way (without going into the IO lands) to achieve this: > [..] There's package for that on hackage: http://hackage.haskell.org/packages/archive/spoon/0.3/doc/html/Control-Spoon.html However, this is some

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_zYZGhjanNrdjNfMjkzZjloOWNienY&pageview=1&hgd=1&hl=en > [...] > The work on bringing hackage-server up to feature parity is primary. Absolutely.

[Haskell-cafe] Can't install Criterion package on ghc ..

2010-04-13 Thread Mozhgan kabiri
Hi, I am trying to install Criterion package, but I keep getting an error and I can't figure it out why it is like this !! mozh...@mozhgan-kch:~$ cabal install Criterion Resolving dependencies... Configuring vector-algorithms-0.3... Preprocessing library vector-algorithms-0.3... Building vector-a

Re: [Haskell-cafe] Can't install Criterion package on ghc ..

2010-04-13 Thread Ivan Lazar Miljenovic
Mozhgan kabiri writes: > [8 of 9] Compiling Data.Vector.Algorithms.Intro ( > Data/Vector/Algorithms/Intro.hs, dist/build/Data/Vector/Algorithms/Intro.o ) > ghc: panic! (the 'impossible' happened) > (GHC version 6.10.4 for i386-unknown-linux): > idInfo co{v a9WB} [tv] > > Please report this a

Re: [Haskell-cafe] Can't install Criterion package on ghc ..

2010-04-13 Thread Max Bolingbroke
Someone already did, 2 days ago: http://hackage.haskell.org/trac/ghc/ticket/3978 Cheers, Max On 13 April 2010 13:56, Ivan Lazar Miljenovic wrote: > Mozhgan kabiri writes: >> [8 of 9] Compiling Data.Vector.Algorithms.Intro ( >> Data/Vector/Algorithms/Intro.hs, dist/build/Data/Vector/Algorithms/I

Re: [Haskell-cafe] Simple game: a monad for each player

2010-04-13 Thread Bertram Felgenhauer
Yves Parès wrote: > > I answered my own question by reading this monad-prompt example: > http://paste.lisp.org/display/53766 > > But one issue remains: those examples show how to make play EITHER a human > or an AI. I don't see how to make a human player and an AI play SEQUENTIALLY > (to a TicTac

Re: [Haskell-cafe] Simple game: a monad for each player

2010-04-13 Thread Tillmann Rendel
Yves Parès wrote: data Player m = Player { plName :: String, -- unique for each player plTurn :: GameGrid -> m Move -- called whenever the player must play } What I try to avoid is having every player running in IO monad. One could define the following players. human :: MonadIO

[Haskell-cafe] Vector to Monadic Stream and back, how?

2010-04-13 Thread Xiao-Yong Jin
Dear list, I'm trying to change my code from using Data.Array to Data.Vector. I have some question regarding the monadic use of 'Vector'. Searching through the list couldn't give me enough hints, so I guess I'd try my luck asking on the list. I want to use 'mapM' on Data.Vector.Vector, but it l

[Haskell-cafe] Re: a way to convert partial functions to functions with Maybe's

2010-04-13 Thread Ashley Yakeley
On 2010-04-13 03:02, Ozgur Akgun wrote: I want a function to generate func1Fixed, given func1. Don't do that, it's unHaskellish. Bottom is for non-termination (which you absolutely cannot catch) plus some other conditions to be treated similarly. If the implementer of func1 decided to retu

Re: [Haskell-cafe] a way to convert partial functions to functions with Maybe's

2010-04-13 Thread Ivan Miljenovic
On 13 April 2010 20:02, Ozgur Akgun wrote: > func1 :: T -> T > func1 A = B > > func1Fixed :: T -> Maybe T > func1Fixed A = Just B > func1Fixed _ = Nothing Why not use Maybe for func1 in the first place? Or are you wanting to automagically make all uses of head, tail, etc. safe? -- Ivan Lazar

[Haskell-cafe] Strange error with type classes + associated types

2010-04-13 Thread Brent Yorgey
Hi all, Consider the following declarations. > -- from vector-space package: > (*.*) :: (HasBasis u, HasTrie (Basis u), > HasBasis v, HasTrie (Basis v), > VectorSpace w, > Scalar v ~ Scalar w) > => (v :-* w) -> (u :-* v) -> u :-* w > > -- my co

Re: [Haskell-cafe] What is the consensus about -fwarn-unused-do-bind ?

2010-04-13 Thread Max Cantor
I'm in the camp of adding -fno-warn-unused-do-bind to my cabal files. I hate sacrificing the purity of -Wall but I have so many forkIOs in my code that I think it was the best option. Max On Apr 10, 2010, at 3:08 PM, Ivan Miljenovic wrote: > On 10 April 2010 02:07, Bryan O'Sullivan wrote: >

Re: [Haskell-cafe] Cabal dependency hell

2010-04-13 Thread wren ng thornton
Duncan Coutts wrote: On Sun, 2010-04-11 at 18:43 +0200, Maciej Piechotka wrote: - Privacy problem. I don't want the software to call home with data without asking. Obviously it is important that the data be anonymous and that we do not send stuff without the user's knowledge. While there is n

Re: [Haskell-cafe] Cabal dependency hell

2010-04-13 Thread wren ng thornton
Ketil Malde wrote: Perhaps it would also be possible to suggest library upgrades likely to remedy the problem in case of a build failure? +1 for good error messages. +2 for "should I try upgrading libfoo? [yn]" integration (if configurable as AlwaysYes, AlwaysAsk, or AlwaysNo). -- Live wel

[Haskell-cafe] instance Eq (a -> b)

2010-04-13 Thread Ashley Yakeley
Why isn't there an instance Eq (a -> b) ? allValues :: (Bounded a,Enum a) => [a] allValues = enumFrom minBound instance (Bounded a,Enum a,Eq b) => Eq (a -> b) where p == q = fmap p allValues == fmap q allValues Of course, it's not perfect, since empty types are finite but not Bounded

Re: [Haskell-cafe] instance Eq (a -> b)

2010-04-13 Thread Ivan Miljenovic
On 14 April 2010 16:03, Ashley Yakeley wrote: > Why isn't there an instance Eq (a -> b) ? How do you prove that f = (2*) and g x = x + x are equal? Mathematically, you can; but the only way you can "prove" it in Haskell is by comparing the values for the entire domain (which gets computationally

Re: [Haskell-cafe] instance Eq (a -> b)

2010-04-13 Thread Joe Fredette
Consider the set of all rationals with 1 as a numerator, and positive denominator, eg: S = {1/n, n : Nat} this is bounded, enumerable, but infinite. Which makes the whole checking every value bit somewhat, shall we say, difficult. :) So for instance, we want to show f : S

Re: [Haskell-cafe] instance Eq (a -> b)

2010-04-13 Thread Ashley Yakeley
On Wed, 2010-04-14 at 16:11 +1000, Ivan Miljenovic wrote: > but the only way you can "prove" it in > Haskell is by comparing the values for the entire domain (which gets > computationally expensive)... It's not expensive if the domain is, for instance, Bool. -- Ashley Yakeley _

Re: [Haskell-cafe] instance Eq (a -> b)

2010-04-13 Thread Jonas Almström Duregård
I guess nontermination is a problem (e.g. if one or both functions fail to terminate for some values, equality will be undecidable). /Jonas On 14 April 2010 08:42, Ashley Yakeley wrote: > On Wed, 2010-04-14 at 16:11 +1000, Ivan Miljenovic wrote: >> but the only way you can "prove" it in >> Haske