Re: [Haskell-cafe] Tetris

2007-11-23 Thread Laurent Deniau
Conal Elliott wrote: On Nov 21, 2007 3:49 AM, Laurent Deniau [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Peter Verswyvelen wrote: Conal Elliott wrote: Moreover, functional programming makes it easy to have much more state than imperative programming, namely state over

Re[2]: [Haskell-cafe] http/ftp library

2007-11-23 Thread Bulat Ziganshin
Hello brad, Friday, November 23, 2007, 10:10:41 AM, you wrote: 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 1. Haskell binding is not mentioned at http://curl.haxx.se/libcurl/ can we do something to fix it? 2.

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

2007-11-23 Thread Maurí­cio
Hi, How can I call a program (like, for instance, 'grep text *') and get the standard output? (...) http://haskell.org/ghc/docs/latest/html/libraries/process-1.0.0.0/System-Process.html I was using the following: (...) do (_pIn, pOut, pErr, handle) - runInteractiveCommand command

Re: [Haskell-cafe] Polymorphic dynamic typing

2007-11-23 Thread Derek Elkins
On Fri, 2007-11-23 at 18:45 +, Paulo Silva wrote: Hello, Type representations using GADTs are being used to achieve dynamic typing in Haskell. However, representing polymorphic types is problematic. Does anyone know any work about including polymorphism in dynamic typing? Look at

Re: [Haskell-cafe] Haskell code in Wordpress

2007-11-23 Thread Dougal Stanton
On 23/11/2007, Paulo J. Matos [EMAIL PROTECTED] wrote: Hi all, I'm curious about the best way to typeset haskell code in a wordpress blog. Using blockquote removes all indentation. :-( There is a code highlighter for wordpress that works for Haskell code, but it's a bit of a pain to use,

Re: [Haskell-cafe] Haskell code in Wordpress

2007-11-23 Thread Radosław Grzanka
2007/11/23, Paulo J. Matos [EMAIL PROTECTED]: Hi all, I'm curious about the best way to typeset haskell code in a wordpress blog. Using blockquote removes all indentation. :-( I'm using geshi with wordpress on my blog (codeside.org) and drupal (upcoming haskell.pl page). But you have to

Re: [Haskell-cafe] Haskell code in Wordpress

2007-11-23 Thread Claude Heiland-Allen
Paulo J. Matos wrote: Hi all, I'm curious about the best way to typeset haskell code in a wordpress blog. Using blockquote removes all indentation. :-( Cheers, Probably HsColour: http://www.cs.york.ac.uk/fp/darcs/hscolour/ --8-- hscolour is a small Haskell script to colourise Haskell code.

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

2007-11-23 Thread Roberto Zunino
Allan Clark wrote: -- Create the process do (_pIn, pOut, pErr, handle) - runInteractiveCommand command -- Wait for the process to finish and store its exit code exitCode - waitForProcess handle Warning: this will get stuck if the command output is so big that it fills the SO

Re: [Haskell-cafe] Unix (Posix) low-level device driver functionality?

2007-11-23 Thread Bryan O'Sullivan
Galchin Vasili wrote: In any case, it seems like the GHC documentation allows raw driver I/Obut when I look at the actual GHC 6.8.1 libraries I don't see low level driver functionailty. On Unix, at least, you don't need anything special to write userspace device drivers. You normally open

Re: [Haskell-cafe] Unix (Posix) low-level device driver functionality?

2007-11-23 Thread Don Stewart
vigalchin: Hello, I am seriously trying to push the mainstream computer industry. I am a kernel developer for POSIX OS's (e.g. Linux) and Windows. I would at the very least be able to write test/correctness software in Haskell where I am able to open Unix/Windows drivers

Re: [Haskell-cafe] Re: An interesting monad: Prompt

2007-11-23 Thread Ryan Ingram
On 11/22/07, apfelmus [EMAIL PROTECTED] wrote: A context passing implementation (yielding the ContT monad transformer) will remedy this. Wait, are you saying that if you apply ContT to any monad that has the left recursion on = takes quadratic time problem, and represent all primitive

Re: [Haskell-cafe] Re: An interesting monad: Prompt

2007-11-23 Thread Derek Elkins
On Fri, 2007-11-23 at 21:11 -0800, Ryan Ingram wrote: On 11/22/07, apfelmus [EMAIL PROTECTED] wrote: A context passing implementation (yielding the ContT monad transformer) will remedy this. Wait, are you saying that if you apply ContT to any monad that has the

[Haskell-cafe] Unix (Posix) low-level device driver functionality?

2007-11-23 Thread Galchin Vasili
Hello, I am seriously trying to push the mainstream computer industry. I am a kernel developer for POSIX OS's (e.g. Linux) and Windows. I would at the very least be able to write test/correctness software in Haskell where I am able to open Unix/Windows drivers and test storage firmware. The

Re: [Haskell-cafe] Re: Composing monads

2007-11-23 Thread Luke Palmer
On Nov 23, 2007 6:24 PM, Jules Bean [EMAIL PROTECTED] wrote: ...i.e. I wouldn't be afraid of a lambda in a case like that. IME it's moderately common to have to do: mapM_ (\a - some stuff something_with a some stuff) ll This has terrible endweight. In this imperativesque case, I'd write:

Re: [Haskell-cafe] Polymorphic dynamic typing

2007-11-23 Thread Roberto Zunino
Paulo Silva wrote: Type representations using GADTs are being used to achieve dynamic typing in Haskell. However, representing polymorphic types is problematic. Does anyone know any work about including polymorphism in dynamic typing? First, a warning: fragile code follows, possibly

Re: [Haskell-cafe] very elementary import problem .. help

2007-11-23 Thread Adam Langley
On Nov 23, 2007 1:43 PM, Galchin Vasili [EMAIL PROTECTED] wrote: I am loading the above script in ghci. However, System.Posix, System.Process and STM cannot be found. Network and Directory are found. I assume when ghc is installed on Windows that the Windows registry get populated with paths

Re: [Haskell-cafe] Re: Composing monads

2007-11-23 Thread Thomas Schilling
On Fri, 2007-11-23 at 23:01 +0100, Roberto Zunino wrote: Maurí­cio wrote: main = mapM_ ((putStrLn ) * putStrLn) $ map show [1,2,3] Using only standard combinators: main = mapM_ ((putStrLn ) . putStrLn) $ map show [1,2,3] == mapM_ ((putStrLn ) . putStrLn . show) [1,2,3]

Re: [Haskell-cafe] Re: Composing monads

2007-11-23 Thread Roberto Zunino
Maurí­cio wrote: main = mapM_ ((putStrLn ) * putStrLn) $ map show [1,2,3] Using only standard combinators: main = mapM_ ((putStrLn ) . putStrLn) $ map show [1,2,3] Zun. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] very elementary import problem .. help

2007-11-23 Thread Galchin Vasili
Hello, import System.Posix --import Network import System.Process --import Directory import STM I am loading the above script in ghci. However, System.Posix, System.Processand STM cannot be found. Network and Directory are found. I assume when ghc is installed on Windows that the Windows

Re: [Haskell-cafe] Haskell code in Wordpress

2007-11-23 Thread Neil Mitchell
Hi I'm curious about the best way to typeset haskell code in a wordpress blog. Using blockquote removes all indentation. :-( pre should work Thanks Neil ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Haskell code in Wordpress

2007-11-23 Thread Paulo J. Matos
Hi all, I'm curious about the best way to typeset haskell code in a wordpress blog. Using blockquote removes all indentation. :-( Cheers, -- Paulo Jorge Matos - pocm at soton.ac.uk http://www.personal.soton.ac.uk/pocm PhD Student @ ECS University of Southampton, UK

Re: [Haskell-cafe] Re: Composing monads

2007-11-23 Thread Jules Bean
module Main (Main.main) where import Control.Monad import System.IO (*) :: Monad m = m () - (a - m ()) - (a - m ()) (*) f f' = \a - do{ f; f' a; } main :: IO () main = mapM_ ((putStrLn ) * putStrLn) $ map show [1,2,3] There is nothing wrong with that, but I would normally write:

Re: {SPAM 04.4} Re[2]: [Haskell-cafe] http/ftp library

2007-11-23 Thread brad clawsie
On Fri, Nov 23, 2007 at 10:59:55AM +0300, Bulat Ziganshin wrote: Hello brad, Friday, November 23, 2007, 10:10:41 AM, you wrote: 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 1. Haskell binding is not

[Haskell-cafe] ANN: Dimensional 0.7.1 (GHC 6.8.1 compatibility)

2007-11-23 Thread Bjorn Buckwalter
Dear all, The Dimensional library has been ported to GHC 6.8.1 (it remains backwards-compatible with GHC 6.6.1, and also with Cabal 1.1.6 I believe). The new version number is 0.7.1. Due to a GHC 6.8.1 bug (#1919) the CGS module will not compile and has been disabled. Thanks, Bjorn Buckwalter

[Haskell-cafe] Re: Source code for Visual Haskell

2007-11-23 Thread Benedikt Schmidt
Felix Martini [EMAIL PROTECTED] writes: 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? There is a

[Haskell-cafe] Digest size

2007-11-23 Thread Simon Marlow
[ with mailing list maintainer's hat on ] Someone asked me if they could get fewer digests per day from haskell-cafe. The threshold for sending out a digest is currently 30k, which is probably the default, but seems a bit small to me. Any objections to bumping it, to say 100k? Cheers,

Re: [Haskell-cafe] Composing monads

2007-11-23 Thread Jules Bean
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. You've already been shown the = operator and how to define it from = by other answers. Just for variety, here is how you would

Re: [Haskell-cafe] Tetris

2007-11-23 Thread Laurent Deniau
Peter Verswyvelen wrote: Laurent Deniau wrote: Peter Verswyvelen wrote: And you still need to think about where you have to introduce delays to avoid infinite loops? I don't see why, unless you want to have a memory or explicitly stop the time which means it's a parameter of the transition as

[Haskell-cafe] Re: Composing monads

2007-11-23 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. This is called Kleisli composition, by the way; it's defined as (=) in Control.Monad. jcc Even if you didn't know about (=)(...):

Re: [Haskell-cafe] c2hs on Windows?

2007-11-23 Thread Duncan Coutts
On Sun, 2007-11-11 at 21:36 +, Alex Young wrote: Hi all, Does anyone know if c2hs should be working on Windows? I'm trying to build it under ghc 6.8.0, but this happens: I just uploaded c2hs-0.15.1 which builds with all recent versions of ghc 6.4-6.8. I also tested that it builds on

[Haskell-cafe] Polymorphic dynamic typing

2007-11-23 Thread Paulo Silva
Hello, Type representations using GADTs are being used to achieve dynamic typing in Haskell. However, representing polymorphic types is problematic. Does anyone know any work about including polymorphism in dynamic typing? Best regards, Paulo

Re: [Haskell-cafe] Polymorphic dynamic typing

2007-11-23 Thread Don Stewart
derek.a.elkins: On Fri, 2007-11-23 at 18:45 +, Paulo Silva wrote: Hello, Type representations using GADTs are being used to achieve dynamic typing in Haskell. However, representing polymorphic types is problematic. Does anyone know any work about including polymorphism in

[Haskell-cafe] Re: Composing monads

2007-11-23 Thread Hitesh
main :: IO () main = mapM_ ((putStrLn ) * putStrLn) $ map show [1,2,3] A couple other ways to do this code. Without monad combinators main = mapM_ putStrLn . (:) . intersperse . map show $ [1..3] With your combinator, but collapsing it so we don't map over the collection

Re: [Haskell-cafe] Haskell code in Wordpress

2007-11-23 Thread Duncan Coutts
On Fri, 2007-11-23 at 20:22 +, Paulo J. Matos wrote: Hi all, I'm curious about the best way to typeset haskell code in a wordpress blog. Using blockquote removes all indentation. :-( For the Gtk2Hs website I used a program (partly derived from hscolour) to highlight and adds links to

[Haskell-cafe] nhc vs ghc

2007-11-23 Thread brad clawsie
can anyone provide a concise list of the major differences between nhc98 and ghc? for example, can i build a cabal package with nhc98? i get that ghc and nhc98 are not interchangeable, otherwise i am not sure thanks pgpIGhA0uHtR7.pgp Description: PGP signature