Re: [Haskell-cafe] The values of infinite lists

2006-05-25 Thread Brian Hulley
Claus Reinke wrote: [snip] (the picture is slightly less simple, as 1/2 are repeated, hence construction and interpretation are interleaved, and later construction may depend on the results of earlier interpretation, but I assume you know that;) This is one of the issues that I was confused

Re: [Haskell-cafe] The values of infinite lists

2006-05-25 Thread Claus Reinke
you don't actually need lazyness. (except if you tried to define directly instead of using = as the primitive because then the second parameter would be an action directly instead of a continuation) yes, you'd want to be non-strict in its second parameter. Thanks! This is *absolutely* the

Re[2]: [Haskell-cafe] Re: [Haskell] installing streams library

2006-05-25 Thread Bulat Ziganshin
Hello Jeremy, Monday, May 22, 2006, 12:20:54 AM, you wrote: For my own needs, I cabalized and debianized the Streams library. It generates binary debs for ghc6 and hugs -- but I think the hugs version is broken. In any case, it is a start, you can download the packaging at:

[Haskell-cafe] UTF-8 Strings and GHC

2006-05-25 Thread Dmitry V'yal
Hi, all. I'm writing a GUI app using Haskell and Gtk2HS. All goes well besides one thing. I need to display some messages in russian and I can't figure out, how to handle that. Gtk uses UTF-8 internally, so i have to pass UTF-8 strings to it somehow. But how to define them in source file? I get

Re: [Haskell-cafe] UTF-8 Strings and GHC

2006-05-25 Thread Duncan Coutts
On Thu, 2006-05-25 at 15:02 +, Dmitry V'yal wrote: Hi, all. I'm writing a GUI app using Haskell and Gtk2HS. All goes well besides one thing. I need to display some messages in russian and I can't figure out, how to handle that. Gtk uses UTF-8 internally, so i have to pass UTF-8

Re[2]: [Haskell-cafe] UTF-8 Strings and GHC

2006-05-25 Thread Bulat Ziganshin
Hello Duncan, Thursday, May 25, 2006, 3:24:35 PM, you wrote: Sorry it's all rather unsatisfactory. The missing pieces here are allowing Unicode string literals and ghc 6.5 support it an IO library that make decoding text files into normal Haskell Strings easy. you can find [Word8]-[Char]

[Haskell-cafe] Editors for Haskell

2006-05-25 Thread Walter Potter
All, I hope that this is the right place for this question. I'm using Haskell (GHC and Hugs) on several different platforms. Windows, OS X and Linux systems. I'd like to have an IDE that works well for medium to large size projects. I know of Eclipse and hIDE. Vim works fine but I'd like

Re: [Haskell-cafe] Editors for Haskell

2006-05-25 Thread Christopher Brown
Hi Walt, For Mac OS X I would strongly recommend using Sub Etha Edit. Its a very simple editor to use, and offers a lot of power and flexibility. It also has a Haskell highlighting mode. You can find it at: http://www.codingmonkeys.de/subethaedit/ Chris. On 25 May 2006, at 16:02, Walter

[Haskell-cafe] QuickChecking IO

2006-05-25 Thread Mike Gunter
I'd like to use QuickCheck on IO code. For instance, I'd like to check a property of type String - IO Bool. Using unsafePerformIO seems straightforward (though I haven't written the code, so I may be wrong about that) and it might be possible to make a solution involving unsafeInterleaveIO

Re: [Haskell-cafe] QuickChecking IO

2006-05-25 Thread Twan van Laarhoven
Mike Gunter wrote: I'd like to use QuickCheck on IO code. For instance, I'd like to check a property of type String - IO Bool. Using unsafePerformIO seems straightforward (though I haven't written the code, so I may be wrong about that) and it might be possible to make a solution involving

Re: [Haskell-cafe] QuickChecking IO

2006-05-25 Thread Malcolm Wallace
Mike Gunter [EMAIL PROTECTED] wrote: I'd like to use QuickCheck on IO code. For instance, I'd like to check a property of type String - IO Bool. Barring that, I suspect it's possible modify QuickCheck to accommodate IO code (or perhaps, general monadic code). Has anyone done this? Yes,

[Haskell-cafe] Linking to third party libraries in windows

2006-05-25 Thread SevenThunders
Has anyone actually seen ghc link successfully to third party libraries on windows? While I have been able to link to C object code compiled by ghc (and thus gcc by proxy), I have not been able to actually link against any substantial third party library or dll in windows. I am currently

[Haskell-cafe] Re: Editors for Haskell

2006-05-25 Thread Jeremy O'Donoghue
Hi Walt, I'm using Haskell (GHC and Hugs) on several different platforms. Windows, OS X and Linux systems. Assuming that you want your students to be able to use any of the above platforms, the only options I know of which work well on all of the platforms are Emacsen, Vim, hIDE, Eclipse and

Re: [Haskell-cafe] Linking to third party libraries in windows

2006-05-25 Thread Brian Hulley
SevenThunders wrote: Has anyone actually seen ghc link successfully to third party libraries on windows? Yes - I'm currently writing a Haskell app that uses a Visual C++ DLL that I'm also writing. It is quite complicated to link Haskell to Windows DLLs, so I made a page describing how to do

Re: [Haskell-cafe] QuickChecking IO

2006-05-25 Thread Mike Gunter
I found the code at: http://www.cs.chalmers.se/~rjmh/QuickCheck/QuickCheckM.hs The only deconstructor there for PropertyM requires a run function of type m Property - Property. For IO, run is unsafePerformIO. -m Malcolm Wallace [EMAIL PROTECTED] writes: Mike Gunter [EMAIL PROTECTED]

[Haskell-cafe] Haskell RPC

2006-05-25 Thread Joel Reymont
Folks, I'm curious about how the following bit of Lisp code would translate to Haskell. This is my implementation of Lisp RPC and it basically sends strings around, printed readably and read on the other end by the Lisp reader. If I have a list '(1 2) it prints as (1 2) and becomes '(1

Re: [Haskell-cafe] Haskell RPC

2006-05-25 Thread Jason Dagit
On 5/25/06, Joel Reymont [EMAIL PROTECTED] wrote: This is an example from my test harness: (define-test remote-basic (def-remote-class remote (server) ()) (def-remote-method sum :sync ((self remote) (a fixnum) (b integer)) (declare (ignorable ip port))

Re: [Haskell-cafe] Haskell RPC

2006-05-25 Thread Robert Dockins
On May 25, 2006, at 2:25 PM, Jason Dagit wrote: On 5/25/06, Joel Reymont [EMAIL PROTECTED] wrote: This is an example from my test harness: (define-test remote-basic (def-remote-class remote (server) ()) (def-remote-method sum :sync ((self remote) (a fixnum) (b integer))

Re: [Haskell-cafe] Re: Editors for Haskell

2006-05-25 Thread Thomas Davie
On May 25, 2006, at 6:14 PM, Jeremy O'Donoghue wrote: Hi Walt, I'm using Haskell (GHC and Hugs) on several different platforms. Windows, OS X and Linux systems. Assuming that you want your students to be able to use any of the above platforms, the only options I know of which work well on

Re: [Haskell-cafe] Re: Editors for Haskell

2006-05-25 Thread Brian Hulley
Thomas Davie wrote: When working on Macs I've found SubEthaEdit to be by far the best Haskell editor, emailing the guy tends to have quite good results in terms of getting it free if you say you're involved in education. Although I do hope that some people choose to pay for the software so

Re: [Haskell-cafe] The values of infinite lists

2006-05-25 Thread Paul Hudak
I agree with most of your comments Claus. I think that the remaining difference of opinion is just how much of the I/O semantics one might expect to see in a textbook on FP (more specifically, Haskell). My concern is two-fold: First, to cover ALL of I/O would be an enormous undertaking; at

Re: [Haskell-cafe] Haskell RPC

2006-05-25 Thread S. Alexander Jacobson
Given that we have no easy way to serialize thunks, the whole RPC approach just seems wrong for Haskell. RPC in general is pretty old school. REST seems to have worked better in practice (e.g. HTTP GET/POST!). For a general description of REST see

Re: [Haskell-cafe] Linking to third party libraries in windows

2006-05-25 Thread Matthew Bromberg
OK I'm punting on the AMD libraries for now and will just use the Atlas libraries until I can get to the bottom of this. However, for me, it seems the rabbit hole goes a little deeper on the issue of array copies. Consider this code snippet import Matrix main = do print Matrices let