Re: [Haskell-cafe] FGL instance constraint

2010-04-30 Thread Ivan Lazar Miljenovic
Jason Dagit writes: > On Fri, Apr 30, 2010 at 11:30 PM, Jason Dagit wrote: > Looking over this real quick, I think the Graph class should be changed to > mention a and b: > > class Graph (gr a b) where ... Won't work: you need to specify that gr has kind * -> * -> *; this is exactly the same a

Re: [Haskell-cafe] FGL instance constraint

2010-04-30 Thread Ivan Lazar Miljenovic
Jason Dagit writes: > On Fri, Apr 30, 2010 at 11:08 PM, Ivan Lazar Miljenovic < > ivan.miljeno...@gmail.com> wrote: >> >> >> You're putting the constraint in the wrong places: put the "(Cls a) => " >> in the actual functions where you need it. >> > > That's solid advice in general, but it's still

Re: [Haskell-cafe] FGL instance constraint

2010-04-30 Thread Brandon S. Allbery KF8NH
On May 1, 2010, at 02:38 , Jason Dagit wrote: Why wasn't the Graph class designed this way? My guess: It was probably a decision that predated multiparameter type classes. Or a specific decision was made to stick to Haskell'98 compatibility. -- brandon s. allbery [solaris,freebsd,perl,pugs

Re: [Haskell-cafe] Build problems (hsp, trhsx, ultimately Happstack)

2010-04-30 Thread Warren Harris
I thought I'd install happstack to give it a try, but immediately hit the following build problem: $ cabal install happstack Resolving dependencies... cabal: cannot configure HJScript-0.5.0. It requires hsx >=0.7.0 For the dependency on hsx >=0.7.0 there are these packages: hsx-0.7.0. However

Re: [Haskell-cafe] FGL instance constraint

2010-04-30 Thread Jason Dagit
On Fri, Apr 30, 2010 at 11:30 PM, Jason Dagit wrote: > > > On Fri, Apr 30, 2010 at 11:08 PM, Ivan Lazar Miljenovic < > ivan.miljeno...@gmail.com> wrote: >> >> >> You're putting the constraint in the wrong places: put the "(Cls a) => " >> in the actual functions where you need it. >> > > That's so

Re: [Haskell-cafe] FGL instance constraint

2010-04-30 Thread Jason Dagit
On Fri, Apr 30, 2010 at 11:08 PM, Ivan Lazar Miljenovic < ivan.miljeno...@gmail.com> wrote: > > > You're putting the constraint in the wrong places: put the "(Cls a) => " > in the actual functions where you need it. > That's solid advice in general, but it's still not going to work here if any of

Re: [Haskell-cafe] FGL instance constraint

2010-04-30 Thread Ivan Lazar Miljenovic
"Kevin Quick" writes: > I need help understanding how to express the following: > > >> data (Cls a) => B a = B [a] I think this only works if you have a forall in there. > >> data GrB a b = GrB (B a) > >> instance Graph GrB where ... > > In the methods for the instance specification, I need

[Haskell-cafe] FGL instance constraint

2010-04-30 Thread Kevin Quick
I need help understanding how to express the following: data (Cls a) => B a = B [a] data GrB a b = GrB (B a) instance Graph GrB where ... In the methods for the instance specification, I need to perform Cls a operations on a. * As shown, the compiler complains that it cannot dedu

Re: [Haskell-cafe] How to make way into a hadoop infrastructure

2010-04-30 Thread C K Kashyap
Thanks Mike. I'll look at the pointers you've given. Regards, Kashyap On Fri, Apr 30, 2010 at 8:01 PM, Mike Dillon wrote: > I think you'll want to look at the Hadoop Streaming or Hadoop Pipes API. > > Further down the line, I think somebody will want to implement a Haskell > library to deal with

[Haskell-cafe] Re: Functional Dependencies Help

2010-04-30 Thread John Creighton
On Apr 29, 7:47 am, John Creighton wrote: > I've been trying to apply some stuff I learned about functional > dependencies, but I run into one of two problems. I either end up with > inconsistent dependencies (OverlappingInstances doesn't seem to > apply) or I end up with infinite recursion. I w

Re: [Haskell-cafe] why does Data.Text.Lazy.IO.readFile return the internal type Data.Text.Lazy.Internal.Text, when Data.Text.IO.readFile returns plain IO Data.Text.Text?

2010-04-30 Thread Daniel Fischer
Am Samstag 01 Mai 2010 00:58:23 schrieb Felipe Lessa: > > It depends on what is on your scope: > > Prelude> :t Data.Text.Lazy.IO.readFile > Data.Text.Lazy.IO.readFile > > :: FilePath -> IO text-0.7.1.0:Data.Text.Lazy.Internal.Text > > Prelude> :m Data.Text.Lazy > Prelude Data.Text.Lazy>

Re: [Haskell-cafe] why does Data.Text.Lazy.IO.readFile return the internal type Data.Text.Lazy.Internal.Text, when Data.Text.IO.readFile returns plain IO Data.Text.Text?

2010-04-30 Thread Felipe Lessa
On Fri, Apr 30, 2010 at 11:09:05PM +0200, Daniel Fischer wrote: > Hmm, > > Prelude> :t Data.Text.Lazy.IO.readFile > Data.Text.Lazy.IO.readFile > :: FilePath -> IO text-0.7.1.0:Data.Text.Lazy.Internal.Text > Prelude> :t Data.Text.IO.readFile > Data.Text.IO.readFile > :: FilePath -> IO text-0.7.1

Re: [Haskell-cafe] why does Data.Text.Lazy.IO.readFile return the internal type Data.Text.Lazy.Internal.Text, when Data.Text.IO.readFile returns plain IO Data.Text.Text?

2010-04-30 Thread Daniel Fischer
Am Samstag 01 Mai 2010 00:26:26 schrieb Bryan O'Sullivan: > On Fri, Apr 30, 2010 at 3:14 PM, Daniel Fischer wrote: > > Yes, I understood it so that he wanted to convert from > > Data.Text.Lazy.Internal.Text to Data.Text.Lazy.Text. > > It's the same type. That's why I suggested id. ___

Re: [Haskell-cafe] why does Data.Text.Lazy.IO.readFile return the internal type Data.Text.Lazy.Internal.Text, when Data.Text.IO.readFile returns plain IO Data.Text.Text?

2010-04-30 Thread Bryan O'Sullivan
On Fri, Apr 30, 2010 at 3:14 PM, Daniel Fischer wrote: > > Yes, I understood it so that he wanted to convert from > Data.Text.Lazy.Internal.Text to Data.Text.Lazy.Text. > It's the same type. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://

Re: [Haskell-cafe] why does Data.Text.Lazy.IO.readFile return the internal type Data.Text.Lazy.Internal.Text, when Data.Text.IO.readFile returns plain IO Data.Text.Text?

2010-04-30 Thread Daniel Fischer
Am Freitag 30 April 2010 23:20:59 schrieb Edward Kmett: > On Fri, Apr 30, 2010 at 5:09 PM, Daniel Fischer wrote: > > and how can I get from internal type to regular type when using > > > > > Data.Text? > > > > Use id :: a -> a > > ;) > > > > Not quite, there is still a distinction between > > Data

Re: [Haskell-cafe] why does Data.Text.Lazy.IO.readFile return the internal type Data.Text.Lazy.Internal.Text, when Data.Text.IO.readFile returns plain IO Data.Text.Text?

2010-04-30 Thread Edward Kmett
On Fri, Apr 30, 2010 at 5:09 PM, Daniel Fischer wrote: > and how can I get from internal type to regular type when using > > > Data.Text? > > Use id :: a -> a > ;) > > Not quite, there is still a distinction between Data.Text(.Internal).Text and Data.Text.Lazy(.Internal).Text. but the machinery to

Re: [Haskell-cafe] Re: FRP for game programming / artifical life simulation

2010-04-30 Thread Ben
FYI i got the lazy pattern match from Patterson's "Programming with Arrows," so I'm assuming it makes a difference. (I'll work out a real example later.) B On Fri, Apr 30, 2010 at 8:45 AM, Daniel Fischer wrote: > Am Freitag 30 April 2010 17:23:19 schrieb Antoine Latter: >> On Fri, Apr 30, 2010

Re: [Haskell-cafe] why does Data.Text.Lazy.IO.readFile return the internal type Data.Text.Lazy.Internal.Text, when Data.Text.IO.readFile returns plain IO Data.Text.Text?

2010-04-30 Thread Bryan O'Sullivan
On Fri, Apr 30, 2010 at 1:37 PM, Thomas Hartman wrote: > > why does the lazy version use the internal type, whereas the strict > version of Text IO just using plain Data.Text type? > That's just ghci playing display games with you, based on the names under which you imported the modules. There

Re: [Haskell-cafe] why does Data.Text.Lazy.IO.readFile return the internal type Data.Text.Lazy.Internal.Text, when Data.Text.IO.readFile returns plain IO Data.Text.Text?

2010-04-30 Thread Daniel Fischer
Am Freitag 30 April 2010 22:37:38 schrieb Thomas Hartman: > *Main> :t Data.Text.IO.readFile > Data.Text.IO.readFile :: FilePath -> IO T.Text > > but > > *Main> :t Data.Text.Lazy.IO.readFile > Data.Text.Lazy.IO.readFile > > :: FilePath -> IO text-0.7.1.0:Data.Text.Lazy.Internal.Text > Hmm, Prelu

Re: [Haskell-cafe] why does Data.Text.Lazy.IO.readFile return the internal type Data.Text.Lazy.Internal.Text, when Data.Text.IO.readFile returns plain IO Data.Text.Text?

2010-04-30 Thread Edward Kmett
Data.Text.Lazy.Internal.Text = Data.Text.Lazy.Text Data.Text.Internal.Text = Data.Text.Text You can use fromChunks/toChunks from Data.Text.Lazy to break it up into strict Text fragments. The lazy version returns a Lazy Text value, which is isomorphic to [Data.Text.Text]. The strict version just r

[Haskell-cafe] why does Data.Text.Lazy.IO.readFile return the internal type Data.Text.Lazy.Internal.Text, when Data.Text.IO.readFile returns plain IO Data.Text.Text?

2010-04-30 Thread Thomas Hartman
*Main> :t Data.Text.IO.readFile Data.Text.IO.readFile :: FilePath -> IO T.Text but *Main> :t Data.Text.Lazy.IO.readFile Data.Text.Lazy.IO.readFile :: FilePath -> IO text-0.7.1.0:Data.Text.Lazy.Internal.Text why does the lazy version use the internal type, whereas the strict version of Text IO

Re: [Haskell-cafe] Benchmarks game updated to ghc 6.12.2

2010-04-30 Thread Don Stewart
ketil: > > Don Stewart writes: > > > http://shootout.alioth.debian.org/u64q/haskell.php > > Observations: > > Although we're mostly beaten on speed, and about the same on code size, > we're using a lot less memory than Java. Prior to the upgrade we weren't mostly beaten on speed, so I think a

Re: [Haskell-cafe] are forkIO threads event-driven?

2010-04-30 Thread Aran Donohue
Thanks for the excellent links, that's exactly what I wanted. It's interesting that they've chosen not to base the new work on libevent. As an aside, I really don't think that the case study should be given any more linkjuice as a response to GHC/Haskell IO concurrency questions. While it's a wond

[Haskell-cafe] 64-bit code on OSX?

2010-04-30 Thread Gregory Crosswhite
Hey everyone, Just out of curiosity, does anyone know the story on what is holding up the ability of GHC to generate 64-bit code on OSX? Cheers, Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskel

[Haskell-cafe] ANN: Combinatorrent v0.3.0

2010-04-30 Thread Jesper Louis Andersen
We are pleased to announce Combinatorrent v0.3.0 Combinatorrent is a bittorrent client, written in Haskell and with an emphasis on concurrency. This version has the following changes from v0.2.0: - Numerous space leak fixes. The client doesn't leak memory anymore for typical runs. - A number o

Re: [Haskell-cafe] Downloading Haskell repos from GitHub

2010-04-30 Thread Jesper Louis Andersen
On Fri, Apr 30, 2010 at 6:02 PM, Gwern Branwen wrote: >> >> Github has a REST API for accessing data. Unfortunately it can't give >> you the wanted >> breakdown, but I would ask them for it. It is much simpler for you, > > You mean ask for a new feature? (Just a one-time list is no good since > I

Re: [Haskell-cafe] Downloading Haskell repos from GitHub

2010-04-30 Thread Gwern Branwen
On Fri, Apr 30, 2010 at 11:51 AM, Jesper Louis Andersen wrote: > On Fri, Apr 30, 2010 at 5:38 PM, Gwern Branwen wrote: >> Nothing in http://develop.github.com/ seems especially useful for >> grabbing the git:// URLs of all repos by language - just by user. >> >> The only real list of repos by lan

Re: [Haskell-cafe] Downloading Haskell repos from GitHub

2010-04-30 Thread Jesper Louis Andersen
On Fri, Apr 30, 2010 at 5:38 PM, Gwern Branwen wrote: > Nothing in http://develop.github.com/ seems especially useful for > grabbing the git:// URLs of all repos by language - just by user. > > The only real list of repos by language seems to be gotten at via > http://github.com/languages/Haskell/

Re: [Haskell-cafe] Re: FRP for game programming / artifical life simulation

2010-04-30 Thread Daniel Fischer
Am Freitag 30 April 2010 17:23:19 schrieb Antoine Latter: > On Fri, Apr 30, 2010 at 3:37 AM, Daniel Fischer > > wrote: > > Am Donnerstag 29 April 2010 20:08:00 schrieb Ben: > >> A technical question: it seems like the instance of ArrowLoop is too > >> strict (this is something I've wondered about

[Haskell-cafe] Downloading Haskell repos from GitHub

2010-04-30 Thread Gwern Branwen
Along the lines of http://blog.patch-tag.com/2010/03/13/mirroring-patch-tag/ for downloading all patch-tag.com repositories, I've begun to wonder how to download all Github repositories since more and more people seem to be using it. Nothing in http://develop.github.com/ seems especially useful fo

Re: [Haskell-cafe] Re: FRP for game programming / artifical life simulation

2010-04-30 Thread Antoine Latter
On Fri, Apr 30, 2010 at 3:37 AM, Daniel Fischer wrote: > Am Donnerstag 29 April 2010 20:08:00 schrieb Ben: >> A technical question: it seems like the instance of ArrowLoop is too >> strict (this is something I've wondered about in Liu's paper too.) >> Shouldn't it be >> >>  instance ArrowLoop SFAu

Re: [Haskell-cafe] How to make way into a hadoop infrastructure

2010-04-30 Thread Mike Dillon
I think you'll want to look at the Hadoop Streaming or Hadoop Pipes API. Further down the line, I think somebody will want to implement a Haskell library to deal with the Avro serialization protocol when it becomes possible to write non-JVM mappers and reducers directly. This JIRA issue covers the

Re: [Haskell-cafe] Using the Clipboard under Windows

2010-04-30 Thread Günther Schmidt
Hello all, the application from which I wish to copy (text) data to the clipboard is not a GUI app, it's more of a simple test-script. So I'd like to do it without having to install wxHaskell. I guess I'll just have to bite my way through the Win32 API. Right now I'm dumping the text output

Re: [Haskell-cafe] Haskell XML Parsers

2010-04-30 Thread Malcolm Wallace
I have been looking at using XML for a little program I have been writing. The file I am currently trying to load is about 9MB, and I have now tried to use HaXml and HST. Without any of my own code, just a simple call to the basic parsers, they both use huge amount of memory. HST is the wors

[Haskell-cafe] Haskell XML Parsers

2010-04-30 Thread R Senington
Dear all, I have been looking at using XML for a little program I have been writing. The file I am currently trying to load is about 9MB, and I have now tried to use HaXml and HST. Without any of my own code, just a simple call to the basic parsers, they both use huge amount of memory. HST is

Re: [Haskell-cafe] Using the Clipboard under Windows

2010-04-30 Thread Henk-Jan van Tuyl
On Fri, 30 Apr 2010 08:21:11 +0300, Jason Dagit wrote: As far as I can tell from google wxwidgets does have clipboard support. Perhaps wxHaskell can do it or needs to be extended? Jason I searched with Hayoo for clipboard wx and found Graphics.UI.WXCore.Controls.execClipBoardData [1];

Re: [Haskell-cafe] maling-list manager in haskell?

2010-04-30 Thread Lars Kotthoff
Hi, I've just uploaded mhailist, a mailing list manager a friend and I started working on a while ago, to hackage [1]. It's very much experimental and an alpha release, but it does the job for some mailing lists we have. We're also looking for people who'd like to join us developing it; if you'r