Re: [Haskell-cafe] type-level integers for GHC

2013-05-18 Thread Takayuki Muranushi
Hey thanks Simon and Levor, I've reported the problem month ago, and I see today the commit-id for type-nats is still not changed. So I thought the problem remains. Let me first try the compile process again tonight, and report the compile process in more detail. 2013/5/17 Simon Peyton-Jones

Re: [Haskell-cafe] A use case for *real* existential types

2013-05-18 Thread oleg
I must say though that I'd rather prefer Adres solution because his init init :: (forall a. Inotify a - IO b) - IO b ensures that Inotify does not leak, and so can be disposed of at the end. So his init enforces the region discipline and could, after a It's probably not easy to do

[Haskell-cafe] Extensible Records using Implicit Parameters

2013-05-18 Thread Thomas Jaeger
Hello, Records in Haskell are somewhat of a contentious issue and many proposals have been put forth to address the shortcomings of the current record system [1]. Below, I introduce a small library relying on several GHC extensions, crucially Implicit Parameters and Constraint Kinds, which

Re: [Haskell-cafe] question about GADT and deriving automatically a Show instance

2013-05-18 Thread TP
Chris Wong wrote: data Person :: Gender - * where Dead :: Person Gender -- WHAT DO I PUT HERE Alive :: { name :: String , weight :: Float , father :: Person Gender } - Person Gender Here's the problem. In the line: Dead :: Person Gender you

Re: [Haskell-cafe] question about GADT and deriving automatically a Show instance

2013-05-18 Thread Denis Kasak
On 18 May 2013 11:16, TP paratribulati...@free.fr wrote: snip However, I have not managed to make the version with forall work. Below, the first occurrence of forall is ok, but the three following yield error. {-# LANGUAGE GADTs #-} {-# LANGUAGE

[Haskell-cafe] Compiler error in Parsec using ByteString

2013-05-18 Thread mukesh tiwari
Hello all, I am trying to write a small calculator using Parsec. Every thing went fine and I wrote this [1] and now I am trying to use ByteString to make it more faster but getting compiler error which I am not able to figure out. Could some one please tell me what is wrong with this code. In case

Re: [Haskell-cafe] Compiler error in Parsec using ByteString

2013-05-18 Thread Roman Cheplyaka
Hi, General advice here is to put type signatures for all non-trivial definitions. This way you can see exactly where compiler and you disagree on what the type of something should be. In this particular case, by following the above recipe, I see that one problem is that `emptyDef` has type

Re: [Haskell-cafe] Compiler error in Parsec using ByteString

2013-05-18 Thread mukesh tiwari
Hi Roman, Thank you. Now I can see what was going under the hood. I was passing the ByteString and functions were expecting String. Working solution using ByteString[1] Regards, Mukesh Tiwari [1] http://hpaste.org/88156 On Sat, May 18, 2013 at 6:16 PM, Roman Cheplyaka r...@ro-che.info wrote:

Re: [Haskell-cafe] question about GADT and deriving automatically a Show instance

2013-05-18 Thread TP
Denis Kasak wrote: Note that all of this would work even without explicit quantification since you have already specified that Person accepts an argument of kind Gender. In other words, this works as expected: data Person :: Gender - * where Dead :: Person a Alive :: { name ::

[Haskell-cafe] Non-deterministic behaviour of aeson's parser

2013-05-18 Thread Roman Cheplyaka
I am observing a non-deterministic behaviour of aeson's parser. I'm writing here in addition to filing a bug report [1] to draw attention to this (pretty scary) problem. To try to reproduce this problem, do this: git clone https://gist.github.com/5604887.git aeson cd aeson ghc aeson.hs

Re: [Haskell-cafe] Non-deterministic behaviour of aeson's parser

2013-05-18 Thread Mateusz Kowalczyk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 18/05/13 17:25, Roman Cheplyaka wrote: I am observing a non-deterministic behaviour of aeson's parser. I'm writing here in addition to filing a bug report [1] to draw attention to this (pretty scary) problem. To try to reproduce this

Re: [Haskell-cafe] Non-deterministic behaviour of aeson's parser

2013-05-18 Thread MigMit
My result: 2000 lines of Right () ghc-pkg list aeson says aeson-0.6.1.0 On May 18, 2013, at 8:25 PM, Roman Cheplyaka r...@ro-che.info wrote: I am observing a non-deterministic behaviour of aeson's parser. I'm writing here in addition to filing a bug report [1] to draw attention to this

Re: [Haskell-cafe] Non-deterministic behaviour of aeson's parser

2013-05-18 Thread Niklas Hambüchen
Can't reproduce: % ./aeson | sort | uniq -c 2000 Right () % ./aeson | sort | uniq -c 2000 Right () % ./aeson | sort | uniq -c 2000 Right () % ./aeson | sort | uniq -c 2000 Right () % ./aeson | sort | uniq -c 2000 Right () Time 100: % ./aeson | sort | uniq -c 20 Right () My

Re: [Haskell-cafe] Non-deterministic behaviour of aeson's parser

2013-05-18 Thread Clark Gaebel
CNR with aeson 0.6.1.0 and ghc 7.6.3. pkg-list output can be found at http://pastebin.com/Zuuujcaz On Saturday, May 18, 2013, Niklas Hambüchen wrote: Can't reproduce: % ./aeson | sort | uniq -c 2000 Right () % ./aeson | sort | uniq -c 2000 Right () % ./aeson | sort | uniq -c

Re: [Haskell-cafe] Infrastructure for testing the impact of a Functor/Applicative/Monad hierarchy

2013-05-18 Thread harry
Niklas Hambüchen mail at nh2.me writes: Reading the other thread (Adding Applicative/Functor instances to all Monads in GHC) I was wondering if there was infrastructure for testing what effect making the often-discussed Functor/Monad change would have: How many packages on hackage would break

Re: [Haskell-cafe] Non-deterministic behaviour of aeson's parser

2013-05-18 Thread Gregory Collins
First off, everyone reporting results to this thread: your bug report would be much more helpful if you included your OS/architecture/GHC version combo, as well as the results of re-running the tests if you build hashable with cabal install -f-sse2. I have a funny feeling that this is a bug in

Re: [Haskell-cafe] Non-deterministic behaviour of aeson's parser

2013-05-18 Thread Clark Gaebel
$ uname -a Linux clark-laptop 3.9.0-2-ARCH #1 SMP PREEMPT Tue Apr 30 09:48:29 CEST 2013 x86_64 GNU/Linux It'd take too long for my helpfulness to build with cabal install -fsse2 hashable and rebuild an environment. If someone writes a bash script to do it (using cabal-dev please!), I'd be more

Re: [Haskell-cafe] Non-deterministic behaviour of aeson's parser

2013-05-18 Thread Roman Cheplyaka
Indeed it looks like a bug in hashable — it goes away with hashable-1.1.2.5. Building with -f-sse2 results in a linker error Loading package hashable-1.2.0.7 ... linking ... ghc: /home/feuerbach/tmp/aeson/.cabal-sandbox/lib/i386-linux-ghc-7.6.3/hashable-1.2.0.7/libHShashable-1.2.0.7.a: unknown

Re: [Haskell-cafe] partially applied data constructor and corresponding type

2013-05-18 Thread TP
Richard Eisenberg wrote: There's a lot of recent work on GHC that might be helpful to you. Is it possible for your application to use GHC 7.6.x? If so, you could so something like this: {-# LANGUAGE DataKinds, GADTs, KindSignatures #-} data Nat = Zero | Succ Nat type One = Succ Zero