Re: [Haskell-cafe] problem with type equality constraints

2008-03-17 Thread Ganesh Sittampalam
On Tue, 18 Mar 2008, Manuel M T Chakravarty wrote: Ganesh Sittampalam: On Mon, 17 Mar 2008, Manuel M T Chakravarty wrote: Your are completely right. Unfortunately, superclass equalities (ie, the Id a ~ ida in the class declaration of Foo) aren't fully implemented yet. OK, thanks. Is there a

Re: [Haskell-cafe] Network.Browser and getCookies

2008-03-17 Thread Adam Smyczek
Thanks for the tip. Turned out to be a server problem. Adam On Mar 17, 2008, at 8:55 AM, Justin Bailey wrote: On Sun, Mar 16, 2008 at 10:21 AM, Adam Smyczek <[EMAIL PROTECTED]> wrote: Somehow I cannot get cookies from the Response using Network.Browser module (HTTP 3001.0.4). The cookie h

Re: [Haskell-cafe] problem with type equality constraints

2008-03-17 Thread Manuel M T Chakravarty
Ganesh Sittampalam: On Mon, 17 Mar 2008, Manuel M T Chakravarty wrote: Your are completely right. Unfortunately, superclass equalities (ie, the Id a ~ ida in the class declaration of Foo) aren't fully implemented yet. OK, thanks. Is there any rough idea of when they will be? That's a bit

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

2008-03-17 Thread Thomas Davie
On 17 Mar 2008, at 23:41, Niklas Broberg wrote: Could this be used to add support for refactoring of source files containing language extensions? Because if I'm correct, the current most popular refactoring solution (I forgot the name) for Haskell does not support extensions. I supppose y

Re: [Haskell-cafe] Type parameters in type families

2008-03-17 Thread Hugo Pacheco
But by doing so I am changing type equality to the same as having "type family F a :: * -> *" F' a x ~ F' b y <=> F' a ~ F' b /\ x ~ y (equality for ADTs) and I would like this "decomposition rule not to apply" so. Thanks though, hugo On Tue, Mar 18, 2008 at 1:12 AM, Ryan Ingram <[EMAIL PROTEC

Re: [Haskell-cafe] Type parameters in type families

2008-03-17 Thread Ryan Ingram
On 3/17/08, Hugo Pacheco <[EMAIL PROTECTED]> wrote: > type family G a :: * -> * > type instance G Int = Either () -- you forgot this line > > instance Functor (G Int) where >fmap f (Left ()) = Left () >fmap f (Right x) = Right (f x) One thing that you don't seem to be clear about is that t

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

2008-03-17 Thread Niklas Broberg
> Could this be used to add support for refactoring of source files > containing language extensions? > > Because if I'm correct, the current most popular refactoring solution (I > forgot the name) for Haskell does not support extensions. I supppose you're talking about HaRe, that Thomas Schilli

[Haskell-cafe] Re: Type parameters in type families

2008-03-17 Thread Hugo Pacheco
I wonder if I am dealing with bugs in the type checker (replying to myself). Curiously if I have class FunctorF d where fmapF :: d -> (x -> y) -> F d x -> F d y fff a = fmapF a id it compiles correctly. If I infer the type signature of fff I get fff :: forall d x. (FunctorF d) => d -> F d x

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

2008-03-17 Thread Thomas Schilling
On 17 mar 2008, at 23.53, Peter Verswyvelen wrote: Could this be used to add support for refactoring of source files containing language extensions? Because if I'm correct, the current most popular refactoring solution (I forgot the name) for Haskell does not support extensions. HaRe - h

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

2008-03-17 Thread Peter Verswyvelen
Could this be used to add support for refactoring of source files containing language extensions? Because if I'm correct, the current most popular refactoring solution (I forgot the name) for Haskell does not support extensions. It would also be nice to add support for the arrows syntax :-)

[Haskell-cafe] Type parameters in type families

2008-03-17 Thread Hugo Pacheco
Hi, I am trying to understand some differences of parameterizing or not some arguments of type families. I have some code such as *type family G a :: * -> * instance Functor (G Int) where fmap f (Left ()) = Left () fmap f (Right x) = Right (f x) ggg :: Functor (G a) => G a x -> G a x ggg

Re: [Haskell-cafe] problem with type equality constraints

2008-03-17 Thread Ganesh Sittampalam
On Mon, 17 Mar 2008, Manuel M T Chakravarty wrote: Your are completely right. Unfortunately, superclass equalities (ie, the Id a ~ ida in the class declaration of Foo) aren't fully implemented yet. OK, thanks. Is there any rough idea of when they will be? If I am not mistaken, superclass equ

Re: [Haskell-cafe] Need Cabal/library building help for windows

2008-03-17 Thread Ryan Ingram
Thanks, I was hoping it would be something simple like that! I'll give it a try when I get home. -- ryan On 3/17/08, Felix Martini <[EMAIL PROTECTED]> wrote: > Ryan Ingram wrote: > > For reference, I'm using GHC6.8.1 on WinXP. > > > setup.hs: ld is required but it could not be found. > > I di

Re: [Haskell-cafe] Need Cabal/library building help for windows

2008-03-17 Thread Felix Martini
Ryan Ingram wrote: > For reference, I'm using GHC6.8.1 on WinXP. > setup.hs: ld is required but it could not be found. I did have the same issue with GHC 6.8.1 on Windows. It is fixed in version 6.8.2. http://haskell.org/ghc/download_ghc_682.html#windows Regards, Felix

Re: [Haskell-cafe] 2-level type analysis of introducing naming into data types

2008-03-17 Thread Greg Meredith
Justin, Thanks for the query. Here are the considerations/concerns i with which i was working. - Data is *not* native to either lambda or pi-calculi - operational encodings for simple types (Bool and Nat) were given near the inception of these calculi - embeddings of these ty

[Haskell-cafe] Re: floating point operations and representation

2008-03-17 Thread Aaron Denney
On 2008-03-17, John Meacham <[EMAIL PROTECTED]> wrote: > On Mon, Mar 17, 2008 at 12:59:09PM -0400, David Roundy wrote: >> foreign import ccall unsafe "math.h log10" log10 :: Double -> Double >> >> since in ghc CDouble and Double are identical. >> >> It's a bit sloppier, but shouldn't cause any tr

Re: [Haskell-cafe] STM example code

2008-03-17 Thread Josef Svenningsson
2008/3/9 Galchin Vasili <[EMAIL PROTECTED]>: > I am playing around with the STM API. I would like to see examples of > STM other than the Santa.hs as I am having problems with STM vs IO. > Here's my implementation of the Dining Philosophers in STM: http://computationalthoughts.blogspot.com/20

Re: [Haskell-cafe] floating point operations and representation

2008-03-17 Thread John Meacham
On Mon, Mar 17, 2008 at 12:59:09PM -0400, David Roundy wrote: > foreign import ccall unsafe "math.h log10" log10 :: Double -> Double > > since in ghc CDouble and Double are identical. > > It's a bit sloppier, but shouldn't cause any trouble. And I've no > idea how realToFrac is implemented, but

Re: [Haskell-cafe] QuickCheck

2008-03-17 Thread Sebastian Sylvan
On Mon, Mar 17, 2008 at 1:54 PM, Thomas Schilling <[EMAIL PROTECTED]> wrote: > > On 17 mar 2008, at 14.37, rodrigo.bonifacio wrote: > > > Hi all, > > > > Is it possible to define a limit for the size of children list bellow? > > > > I've tried: > > > > children <- resize (10 (listGen featureGenNor

Re: [Haskell-cafe] floating point operations and representation

2008-03-17 Thread Don Stewart
daveroundy: > On Wed, Mar 12, 2008 at 9:27 PM, Don Stewart <[EMAIL PROTECTED]> wrote: > > You could consider binding directly to the C functions, if needed, > > > > {-# OPTIONS -fffi -#include "math.h" #-} > > > > import Foreign.C.Types > > > > foreign import ccall unsafe "math.h log10

Re: [Haskell-cafe] floating point operations and representation

2008-03-17 Thread Jed Brown
On 17 Mar 2008, [EMAIL PROTECTED] wrote: > Hello David, > > Monday, March 17, 2008, 7:59:09 PM, you wrote: > >>> foreign import ccall unsafe "math.h log10" >>> c_log10 :: CDouble -> CDouble >>> >>> log10 :: Double -> Double >>> log10 x = realToFrac (c_log10 (realToFrac x)) > >> It's a bit sloppier

Re: [Haskell-cafe] Re: all threads are blocked by recvFrom

2008-03-17 Thread Adam Langley
On Mon, Mar 17, 2008 at 2:29 AM, Vitaliy Akimov <[EMAIL PROTECTED]> wrote: > Hi Adam, sorry for late answer. Here is my example [1], but yours > doesn't work on my PC too. And it's strange it works on yours. Are you running Windows? Because you're hpaste example works, nonblocking for me too. >

Re[2]: [Haskell-cafe] floating point operations and representation

2008-03-17 Thread Bulat Ziganshin
Hello David, Monday, March 17, 2008, 7:59:09 PM, you wrote: >> foreign import ccall unsafe "math.h log10" >> c_log10 :: CDouble -> CDouble >> >> log10 :: Double -> Double >> log10 x = realToFrac (c_log10 (realToFrac x)) > It's a bit sloppier, but shouldn't cause any trouble.

Re: [Haskell-cafe] floating point operations and representation

2008-03-17 Thread David Roundy
On Wed, Mar 12, 2008 at 9:27 PM, Don Stewart <[EMAIL PROTECTED]> wrote: > You could consider binding directly to the C functions, if needed, > > {-# OPTIONS -fffi -#include "math.h" #-} > > import Foreign.C.Types > > foreign import ccall unsafe "math.h log10" > c_log10 :: CDoub

[Haskell-cafe] Need Cabal/library building help for windows

2008-03-17 Thread Ryan Ingram
For reference, I'm using GHC6.8.1 on WinXP. I'm trying to package up some code into a library. But cabal fails to configure my project: >runhaskell setup.hs configure Configuring Prompt-1.0... setup.hs: ld is required but it could not be found. Prompt.cabal contains: name:Prompt

Re: [Haskell-cafe] Network.Browser and getCookies

2008-03-17 Thread Justin Bailey
On Sun, Mar 16, 2008 at 10:21 AM, Adam Smyczek <[EMAIL PROTECTED]> wrote: > Somehow I cannot get cookies from the Response > using Network.Browser module (HTTP 3001.0.4). > The cookie header part seams to be empty and > getCookies returns empty list as well. Network.Browser comes with a built-

Re: [Haskell-cafe] 2-level type analysis of introducing naming into data types

2008-03-17 Thread Justin Bailey
2008/3/15 Greg Meredith <[EMAIL PROTECTED]>: > All, > > > The following Haskell code gives a 2-level type analysis of a > functorial approach to introducing naming and name management into a > given (recursive) data type. The analysis is performed by means of an What's the upshot of this? That i

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

2008-03-17 Thread Niklas Broberg
> I'm pleased to announce a new release for the haskell-src-exts package. Twice in two days even. :-) haskell-src-exts 0.3.3 - now with support for type equality constraints. cabal sdist: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/haskell-src-exts-0.3.3 darcs repo: http://code.

[Haskell-cafe] Re: Haskell-Cafe Digest, Vol 55, Issue 20

2008-03-17 Thread Maverick
Thanks Sterl, you're right, this was because I have don“t compiled with the -threaded flag, this works fine now. > This answer may be way off base, but if differences appear between > ghci and compiled versions, I've often found its as simple as > remembering to compile with the -threaded fla

Re: [Haskell-cafe] QuickCheck

2008-03-17 Thread Thomas Schilling
On 17 mar 2008, at 14.37, rodrigo.bonifacio wrote: Hi all, Is it possible to define a limit for the size of children list bellow? I've tried: children <- resize (10 (listGen featureGenNormal)) You are calling a number as a function. Also, listGen has to use the size argument. Try somet

Re: [Haskell-cafe] QuickCheck

2008-03-17 Thread Henning Thielemann
On Mon, 17 Mar 2008, rodrigo.bonifacio wrote: Hi all, Is it possible to define a limit for the size of children list bellow? take 10 ? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] QuickCheck

2008-03-17 Thread rodrigo.bonifacio
Hi all, Is it possible to define a limit for the size of children list bellow? I've tried: children <- resize (10 (listGen featureGenNormal)) But it didn't work. Thanks a lot, Rodrigo. > Sebastian Sylvan: > >> featureGenNormal = do > >> id <- stringGen > >> name <- stringGen > >>

Re: [Haskell-cafe] QuickCheck

2008-03-17 Thread Yitzchak Gale
Sebastian Sylvan: >> featureGenNormal = do >> id <- stringGen >> name <- stringGen >> featuretype <- arbitrary >> grouptype <- arbitrary >> children <- arbitrary >> properties <- listGen stringGen >> return (Feature id name featuretype grouptype children properties) Rya

Re: [Haskell-cafe] Building HaXML 1.13.3 on Windows fails

2008-03-17 Thread Malcolm Wallace
Dusan Kolar <[EMAIL PROTECTED]> wrote: > I'm trying to build HaXML 1.13.3 on Windows using build.bat > > $ ghc-pkg register pkg.conf > Reading package info from "pkg.conf" ... ghc-pkg.exe: Line 68: The > field main-is was already defined on line 62 > > Taking a look into the pkg.conf says the

Re: [Haskell-cafe] Re: all threads are blocked by recvFrom

2008-03-17 Thread Vitaliy Akimov
Hi Adam, sorry for late answer. Here is my example [1], but yours doesn't work on my PC too. And it's strange it works on yours. According to documentation for Control.Concurrent module [2] every other thread should be blocked. > With the -threaded option, only foreign calls with the unsafe attribu

[Haskell-cafe] Building HaXML 1.13.3 on Windows fails

2008-03-17 Thread Dusan Kolar
Hello all, I'm trying to build HaXML 1.13.3 on Windows using build.bat - I have modified it even on places referred as "should work" (SRCS and OBJS variables); now it works till the last command: ghc-pkg register pkg.conf The error is: Reading package info from "pkg.conf" ... ghc-pkg.exe: L

Re: [Haskell-cafe] QuickCheck

2008-03-17 Thread Ryan Ingram
2008/3/16 Sebastian Sylvan <[EMAIL PROTECTED]>: > featureGenNormal = do > id <- stringGen > name <- stringGen > featuretype <- arbitrary > grouptype <- arbitrary > children <- arbitrary > properties <- listGen stringGen > return (Feature id name featuretype grouptype ch