Re: [Haskell-cafe] expanded standard lib

2007-11-22 Thread Ketil Malde
David Menendez [EMAIL PROTECTED] writes: Someone in a previous thread made an analogy between GHC and the linux kernel. I imagine that third-party Haskell distributions, consisting of GHC/Hugs/whatever and some bundled packages, would meet the desire for a batteries included Haskell

[Haskell-cafe] Problems with do notation

2007-11-22 Thread Peter Verswyvelen
worksFine = if True then putStrLn True else putStrLn False worksNOT = do if True then putStrLn True else putStrLn False worksAgain = do if True then putStrLn True else putStrLn False Of course the worksFine function returns an IO action, so has different behavior, but I mean the

Re: [Haskell-cafe] Problems with do notation

2007-11-22 Thread Thomas Schilling
On Thu, 2007-11-22 at 09:19 +0100, Peter Verswyvelen wrote: worksFine = if True then putStrLn True else putStrLn False worksNOT = do if True then putStrLn True else putStrLn False worksAgain = do if True then putStrLn True else putStrLn False Of course the

[Haskell-cafe] Dynamically find out instances of classes (plugin system for haskell)

2007-11-22 Thread Radosław Grzanka
Hi, Is there any plugin system for haskell? For example, in Java, I can load all compiled classes from given directory, check their interfaces and run some methods through reflection etc. Is it possible in haskell, to load modules from given directory, and if in module there is instance of class

Re: [Haskell-cafe] Problems with do notation

2007-11-22 Thread Luke Palmer
On Nov 22, 2007 8:19 AM, Peter Verswyvelen [EMAIL PROTECTED] wrote: worksFine = if True then putStrLn True else putStrLn False This is just an expression, the indentation is inconsequential. worksNOT = do if True then putStrLn True else putStrLn False The first line,

Re: [Haskell-cafe] expanded standard lib

2007-11-22 Thread Ketil Malde
Duncan Coutts [EMAIL PROTECTED] writes: I did a quick popularity count by wget'ting the whole thing, and looking for hrefs under cgi-bin/packages/archive¹. That's quite fascinating. Thanks. You've convinced me we should add something like that :-). Note that that was only a direct count, I

[Haskell-cafe] Re: expanded standard lib

2007-11-22 Thread apfelmus
Ketil Malde wrote: David Menendez [EMAIL PROTECTED] writes: Someone in a previous thread made an analogy between GHC and the linux kernel. I imagine that third-party Haskell distributions, consisting of GHC/Hugs/whatever and some bundled packages, would meet the desire for a batteries included

RE: [Haskell-cafe] Dynamically find out instances of classes (pluginsystem for haskell)

2007-11-22 Thread Bayley, Alistair
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Radoslaw Grzanka Hi, Is there any plugin system for haskell? For example, in Java, I can load all compiled classes from given directory, check their interfaces and run some methods through reflection etc. Is it possible in

[Haskell-cafe] Re: Over-allocation

2007-11-22 Thread Gracjan Polak
Don Stewart dons at galois.com writes: ByteStrings have all the same operations as lists though, so you can index, compare and take substrings, with the benefit that he underlying string will be shared, not copied. And only use 1 byte per element. Is there any parser built directly over

Re: [Haskell-cafe] More problems [Tetris]

2007-11-22 Thread Bulat Ziganshin
Hello Andrew, Wednesday, November 21, 2007, 9:26:45 PM, you wrote: It seems that the [Haskell] GLUT package isn't installed. at least i remember my own proposal to remove from GHC distribution graphics packages - because they are fat, rarely used and mostly outdated Hackage. ;-) But, alas,

Re: [Haskell-cafe] expanded standard lib

2007-11-22 Thread Vladimir Zlatanov
snip Many other programming languages have packaging strategies that sound very similar. Several of them have managed to have a negative impact on platforms that already have good packaging technologies (i.e. almost every platform apart from Windows ;-). I'd hate to see Haskell go in a

Re: [Haskell-cafe] Dynamically find out instances of classes (pluginsystem for haskell)

2007-11-22 Thread Radosław Grzanka
Hi, Thanks for answer. There are two libs that I'm aware of. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/plugins-1.0 http://hackage.haskell.org/cgi-bin/hackage-scripts/package/metaplug-0.1. 1 Unfortunatly former needs gcc, latter does not compile . I will have to install

Re: [Haskell-cafe] Re: More problems [Tetris]

2007-11-22 Thread Lennart Augustsson
IMHO, no one in the right mind uses Windows voluntarily. :) I'm forced to use it at work, and it's a pain. But since many are forced to use Windows it would be nice if ghc was as well supported on Windows and Unix. On Nov 22, 2007 12:11 AM, Aaron Denney [EMAIL PROTECTED] wrote: On 2007-11-21,

Re: [Haskell-cafe] More problems [Tetris]

2007-11-22 Thread Jules Bean
Peter Verswyvelen wrote: No GLUT is not bundled with GHC 6.8.1 anymore. Yes, that is weird. I think it's weird too, so I bug reported it: http://hackage.haskell.org/trac/ghc/ticket/1917 Jules ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Problems with do notation

2007-11-22 Thread Henning Thielemann
On Thu, 22 Nov 2007, Peter Verswyvelen wrote: worksFine = if True then putStrLn True else putStrLn False worksNOT = do if True then putStrLn True else putStrLn False worksAgain = do if True then putStrLn True else putStrLn False Of course the worksFine

Re: [Haskell-cafe] Problems with do notation

2007-11-22 Thread Bulat Ziganshin
Hello Peter, Thursday, November 22, 2007, 11:19:20 AM, you wrote: Of course the worksFine function returns an IO action, so has different behavior, but I mean the indentation is different. Is this by design? to be exact, Haskell procedure is just a function returning an action. i recommend

Re[4]: [Haskell-cafe] expanded standard lib

2007-11-22 Thread Bulat Ziganshin
Hello Thomas, Wednesday, November 21, 2007, 6:30:17 PM, you wrote: zoho writer: online, not xml editor, but at least able to export into pdf/html/doc/.. It's not open source + it doesn't do what we need - Bang! \also they host stuff for you, and only have limited room for free usage.

[Haskell-cafe] Re: Over-allocation

2007-11-22 Thread Gracjan Polak
Gracjan Polak gracjanpolak at gmail.com writes: Don Stewart dons at galois.com writes: ByteStrings have all the same operations as lists though, so you can index, compare and take substrings, with the benefit that he underlying string will be shared, not copied. And only use 1 byte

Re: [Haskell-cafe] Dynamically find out instances of classes (plugin system for haskell)

2007-11-22 Thread Bulat Ziganshin
Hello Radoslaw, Thursday, November 22, 2007, 11:34:56 AM, you wrote: Is there any plugin system for haskell? For example, in Java, I can there is also ghc-as-a-library shortly said, ghc doesn't have dynamic abilities, so providing features you need without compiling the whole program on the

Re: [Haskell-cafe] Dynamically find out instances of classes (pluginsystem for haskell)

2007-11-22 Thread Claus Reinke
Is there any plugin system for haskell? For example, in Java, I can load all compiled classes from given directory, check their interfaces and run some methods through reflection etc. Is it possible in haskell, to load modules from given directory, and if in module there is instance of class

Re: [Haskell-cafe] Dynamically find out instances of classes (pluginsystem for haskell)

2007-11-22 Thread Radosław Grzanka
2007/11/22, Claus Reinke [EMAIL PROTECTED]: Is there any plugin system for haskell? For example, in Java, I can load all compiled classes from given directory, check their interfaces and run some methods through reflection etc. Is it possible in haskell, to load modules from given

[Haskell-cafe] Searched for mdo on haskell.org. Found nothing.

2007-11-22 Thread Richard Kelsall
I was reading the 'Problems with do notation' thread and Thomas Schilling suggested reading about mdo. Not knowing mdo I thought that sounds interesting and went to http://haskell.org/ which redirects you to http://haskell.org/haskellwiki/Haskell and gives you a search box. Typing mdo and

Re: [Haskell-cafe] Searched for mdo on haskell.org. Found nothing.

2007-11-22 Thread Dougal Stanton
On 22/11/2007, Richard Kelsall [EMAIL PROTECTED] wrote: Did I do something wrong when searching haskell.org? You didn't use Google first? ;-) Seriously though, using the search box at haskell.org seems to be a dead loss. I'm sure this has come up in the past. D. -- Dougal Stanton [EMAIL

Re: [Haskell-cafe] Searched for mdo on haskell.org. Found nothing.

2007-11-22 Thread Mads Lindstrøm
Hi All Richard Kelsall wrote: I was reading the 'Problems with do notation' thread and Thomas Schilling suggested reading about mdo. Not knowing mdo I thought that sounds interesting and went to http://haskell.org/ which redirects you to http://haskell.org/haskellwiki/Haskell and

RE: [Haskell-cafe] Dynamically find out instances of classes (pluginsystem for haskell)

2007-11-22 Thread Grzegorz Chrupala
Bayley, Alistair-2 wrote: There are two libs that I'm aware of. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/plugins-1.0 http://hackage.haskell.org/cgi-bin/hackage-scripts/package/metaplug-0.1. 1 There is also

Re: [Haskell-cafe] Searched for mdo on haskell.org. Found nothing.

2007-11-22 Thread Richard Kelsall
Thomas Schilling wrote: On Thu, 2007-11-22 at 13:23 +, Richard Kelsall wrote: I was reading the 'Problems with do notation' thread and Thomas Schilling suggested reading about mdo. Not knowing mdo I thought that sounds interesting and went to Gah, I was too lazy to add the proper

Re: [Haskell-cafe] The Yampa Arcade: source code available?

2007-11-22 Thread Bit Connor
I am also happy to hear this. When will the new version be released? Thanks, Bit On Nov 21, 2007 7:11 PM, Paul L [EMAIL PROTECTED] wrote: Just to echo back to the question whether Yampa/AFRP is still being developed, the answer is YES. We are working on an updated version at Yale. But

Re: [Haskell-cafe] Searched for mdo on haskell.org. Found nothing.

2007-11-22 Thread Richard Kelsall
Mads Lindstrøm wrote: ... Did I do something wrong when searching haskell.org? Properly not. I think the problem is that haskell.org do not index words, that have length = 3. MediaWiki (which I think haskell.org uses) do not by default index short words (length = 3 or length = 4 - can't

[Haskell-cafe] Call external program and get stdout

2007-11-22 Thread Maurí­cio
Hi, How can I call a program (like, for instance, 'grep text *') and get the standard output? All actions I found (executeFile, system) do not give me the output of the program. Thanks, Maurício ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Tetris

2007-11-22 Thread Bit Connor
On Nov 21, 2007 5:00 PM, Peter Verswyvelen [EMAIL PROTECTED] wrote: Last time I checked the SDL binding did not work properly on Windows when using GHCi. The next version of hsSDL (current darcs) has documentation that explains how to get ghci working. The trick is to make copies of the

Re: [Haskell-cafe] Call external program and get stdout

2007-11-22 Thread Jules Bean
Maurí­cio wrote: Hi, How can I call a program (like, for instance, 'grep text *') and get the standard output? All actions I found (executeFile, system) do not give me the output of the program. http://haskell.org/ghc/docs/latest/html/libraries/process-1.0.0.0/System-Process.html

[Haskell-cafe] Re: Dynamically find out instances of classes (pluginsystem for haskell)

2007-11-22 Thread ChrisK
the standard way to do that is use an existential wrapper: (This needs -fglasgow-exts or some flags) module Main where class Interface x where withName :: x - String data A = A String instance Interface A where withName (A string) = Interface A with ++ string ++ data B = B

Re: [Haskell-cafe] Re: Dynamically find out instances of classes (pluginsystem for haskell)

2007-11-22 Thread Jason Dusek
ChrisK [EMAIL PROTECTED] wrote: the standard way to do that is use an existential wrapper: Does this relate to the basket of fruit problem in object oriented languages? You created the existential wrapper to allow a multimorphic list type? -- _jsn

[Haskell-cafe] Composing monads

2007-11-22 Thread Maurí­cio
Hi, If I have two computations a-IO b and b-IO c, can I join them to get an a-IO c computation? I imagine something like a liftM dot operator. Thanks, Maurício ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Composing monads

2007-11-22 Thread Jonathan Cast
On 22 Nov 2007, at 10:17 AM, Maurí cio wrote: Hi, If I have two computations a-IO b and b-IO c, can I join them to get an a-IO c computation? I imagine something like a liftM dot operator. This is called Kleisli composition, by the way; it's defined as (=) in Control.Monad. jcc

Re: [Haskell-cafe] How to abort a computation within Continuation Monad?

2007-11-22 Thread Derek Elkins
On Thu, 2007-11-22 at 01:01 -0500, Dimitry Golubovsky wrote: Hi, I finally was able to write a function which grabs the remainder of the computation in Cont monad and passes it to some function, in the same time forcing the whole computation to finish by returning a final value. I am not

Re: [Haskell-cafe] Call external program and get stdout

2007-11-22 Thread Allan Clark
Jules Bean wrote: Maurí­cio wrote: Hi, How can I call a program (like, for instance, 'grep text *') and get the standard output? All actions I found (executeFile, system) do not give me the output of the program.

Re: [Haskell-cafe] Re: More problems [Tetris]

2007-11-22 Thread Andrew Coppin
Lennart Augustsson wrote: IMHO, no one in the right mind uses Windows voluntarily. :) I'm forced to use it at work, and it's a pain. But since many are forced to use Windows it would be nice if ghc was as well supported on Windows and Unix. What he said. ;-) I will say this: GHC itself

Re: [Haskell-cafe] question about ghci on windows ...

2007-11-22 Thread Andrew Coppin
Brandon S. Allbery KF8NH wrote: On Nov 21, 2007, at 19:57 , Galchin Vasili wrote: Hi Ian, I am trying to dump out all function signatures exported from System.Directory. I just tried inside ghci: :! ghc --show-iface System.Directory. This is getting closer ... thank you! However, now

Re: [Haskell-cafe] Composing monads

2007-11-22 Thread Brandon S. Allbery KF8NH
On Nov 22, 2007, at 13:17 , Maurí cio wrote: If I have two computations a-IO b and b-IO c, can I join them to get an a-IO c computation? I imagine something like a liftM dot operator. If you have GHC 6.8.1, this is the Kleisli composition operator (=) in Control.Monad. (There is also (=)

[Haskell-cafe] Re: Dynamically find out instances of classes (pluginsystem for haskell)

2007-11-22 Thread ChrisK
Jason Dusek wrote: ChrisK [EMAIL PROTECTED] wrote: the standard way to do that is use an existential wrapper: Does this relate to the basket of fruit problem in object oriented languages? You created the existential wrapper to allow a multimorphic list type? When you access the

Re: [Haskell-cafe] libSDL [Tetris]

2007-11-22 Thread Andrew Coppin
Bit Connor wrote: Hello Andrew, ...yep, configure fails because it can't find sh. (Again.) This error can safely be ignored on windows. Apparently so. (A bit confusing then, no?) I'm rather loathed to install a Unix emulator just so I can install things from Hackage.

Re: [Haskell-cafe] Re: More problems [Tetris]

2007-11-22 Thread Andrew Coppin
Brandon S. Allbery KF8NH wrote: On Nov 22, 2007, at 14:25 , Andrew Coppin wrote: It's just installing anything from Hackage which turns out to be really difficult. I understand Windows developers are a tad rare round here, so maybe that's understandable. I'd certainly be interested in

Re: [Haskell-cafe] Re: More problems [Tetris]

2007-11-22 Thread Jonathan Cast
On 22 Nov 2007, at 11:16 AM, Andrew Coppin wrote: Aaron Denney wrote: On 2007-11-21, Andrew Coppin [EMAIL PROTECTED] wrote: In short, lots of Haskell-related things seem to be extremely Unix-centric and downright unfriendly towards anybody trying to set things up on Windows. If I didn't

Re: [Haskell-cafe] More problems [Tetris]

2007-11-22 Thread Andrew Coppin
Bulat Ziganshin wrote: Hello Andrew, Wednesday, November 21, 2007, 9:26:45 PM, you wrote: Hackage. ;-) But, alas, no. That doesn't work either. The reason? Well, apparently Cabal can't find sh. cabal by itself doesn't need sh. it's either required by library installation or it as

Re: [Haskell-cafe] Re: More problems [Tetris]

2007-11-22 Thread Andrew Coppin
Aaron Denney wrote: On 2007-11-21, Andrew Coppin [EMAIL PROTECTED] wrote: In short, lots of Haskell-related things seem to be extremely Unix-centric and downright unfriendly towards anybody trying to set things up on Windows. If I didn't already know a bit about Unix, I'd be *really* stuck!

Re: [Haskell-cafe] Re: More problems [Tetris]

2007-11-22 Thread Brandon S. Allbery KF8NH
On Nov 22, 2007, at 14:25 , Andrew Coppin wrote: It's just installing anything from Hackage which turns out to be really difficult. I understand Windows developers are a tad rare round here, so maybe that's understandable. I'd certainly be interested in hearing about anything practical

Re: [Haskell-cafe] Dynamically find out instances of classes (pluginsystem for haskell)

2007-11-22 Thread Andrew Coppin
Claus Reinke wrote: I hope this is understandable what I'm trying to achieve here. not really: the only classes in haskell are type classes, and if there is any class instance missing at compile time, you won't even get to runtime, so you don't have to worry about loading instances at

Re: [Haskell-cafe] More problems [Tetris]

2007-11-22 Thread Brandon S. Allbery KF8NH
On Nov 22, 2007, at 14:22 , Andrew Coppin wrote: My first question would be: - Is there a viable alternative to sh scripts for installing packages? If there is, it would seem it's just an issue of getting everybody to migrate to it. If there isn't, it looks like we need to make one...

Re: [Haskell-cafe] Dynamically find out instances of classes (pluginsystem for haskell)

2007-11-22 Thread Leif Frenzel
I'm not 100% sure, but I think hsplugins can dynamically load compiled *.o files in this way. Correct. Not sure whether this requires the person running the main program to have GHC installed though. Yes, it does. Thanks ciao, Leif Unlike Java, there's no reflection capabilities. This

Re: [Haskell-cafe] Composing monads

2007-11-22 Thread Brent Yorgey
On Nov 22, 2007 1:22 PM, Jonathan Cast [EMAIL PROTECTED] wrote: On 22 Nov 2007, at 10:17 AM, Maurí cio wrote: Hi, If I have two computations a-IO b and b-IO c, can I join them to get an a-IO c computation? I imagine something like a liftM dot operator. This is called Kleisli

[Haskell-cafe] Source code for Visual Haskell

2007-11-22 Thread Felix Martini
Hi all, The documentation of Visual Haskell mentions that the source code is available under a BSD license. The code is not available from the download page (http://www.haskell.org/visualhaskell/downloads.html). Does anone know where to get it? ___

Re: [Haskell-cafe] libSDL [Tetris]

2007-11-22 Thread Bit Connor
On Nov 22, 2007 9:39 PM, Andrew Coppin [EMAIL PROTECTED] wrote: Editing the cabal config file is necessary so that the SDL include files and libs can be found. ...because Windows uses DLLs instead of [whatever it is that Unix does]? The reason is that on Unix, there are standard location

Re: [Haskell-cafe] Searched for mdo on haskell.org. Found nothing.

2007-11-22 Thread Tillmann Rendel
Hi Andrew, Andrew Coppin wrote: In general, I find *most* search functions to be fairly unhelpful. Google is the shining exception to this rule; it almost always seems to figure out what you're after. I guess doing text searching is just a fundamentally difficult problem, and the guys at

[Haskell-cafe] http/ftp library

2007-11-22 Thread Bulat Ziganshin
Hello Haskell-Cafe, i write a file-processing utility and want to allow users open URLs like the usual files. for this, i need a library with minimum the following http functionality: getFileSize url readBuf url bufPtr offset size ideally, it should also support ftp and allow to create ftp

Re: [Haskell-cafe] emacs haskellers: r-stripping files becomes popular

2007-11-22 Thread Greg Heartsfield
Additionally, I find this to be helpful for keeping out trailing whitespace: ;; Highlight trailing whitespace in haskell files (add-hook 'haskell-mode-hook '(lambda () (setq show-trailing-whitespace t))) Cheers, -Greg Heartsfield On Fri, Nov 16, 2007 at 06:14:57PM +0200,

Re: [Haskell-cafe] http/ftp library

2007-11-22 Thread brad clawsie
if you need comprehensive support of http and ftp in one api/library, as far as i know, the curl bindings are your only choice related...i promised a while back to support packaging and documentation of the curl bindings. this work is now delayed until freebsd 7 gains haskell support (due to