[Haskell-cafe] Seen in ACM technews...

2004-03-23 Thread Graham Klyne
[[ # "Learning Functional Programming Through Multimedia" Slashdot (03/16/04); Jones, Isaac Haskell is a purely functional programming language and the book, "The Haskell School of Expression: Learning Functional Programming Through Multimedia," is a great introduction to the platform now being u

[Haskell-cafe] haskell idiom for reversible computations

2004-03-23 Thread S. Alexander Jacobson
If I am writing a rener/parser for e.g. HTTP Requests and Responses, I would like to be able to guarantee that the parser really is the inverse of the generator. I assume that if I define a pair of computations as reversible then I can put those computations in some monad such that I can do: pa

[Haskell-cafe] class Runnable vs fromJust (was Re: haskell idiom for reversible computations)

2004-03-23 Thread S. Alexander Jacobson
I think I just figured it out. Answering my own question and asking another: The property we want to fulfill is: prop_reverse forward reverse thing = roundtrip thing == thing where roundtrip = reverse . forward Since a function is a value that produces a computation (when evaluated) and a mo

[Haskell-cafe] asking for a favor

2004-03-23 Thread garroyo
Hi, Does someone has the Haskell XML Toolbox, lets say working in Windows environment?. I have tried install them in Hugs 98 for Windows but there are Hexadecimal characters escape out of range. One choice, I know, is go to LINUX. I am working in CNC programming and I am in the begining of the

Re: [Haskell-cafe] class Runnable vs fromJust (was Re: haskell idiom for reversible computations)

2004-03-23 Thread MR K P SCHUPKE
The problem with Runnable is that it is not ewasily implementable for all monads... So purists rather than implement it for some don't implement it at all. Here's some examples: class Runnable x y where run :: x -> y instance Runnable (m a) (m a) where run = id instance Runnable (s -> m

[Haskell-cafe] What are Kind errors and how do you fix them?

2004-03-23 Thread S. Alexander Jacobson
Implementing Reverse from before, I am running into this weird error: type ReverseType a string = (string ->(string,a)) data Reverse a string = Reverse (ReverseType a string) instance Monad (Reverse a s) where return x = Reverse (\text -> (text,x)) (Reverse p) >>= k = Revers

Re: [Haskell-cafe] What are Kind errors and how do you fix them?

2004-03-23 Thread Jon Fairbairn
On 2004-03-23 at 16:58EST "S. Alexander Jacobson" wrote: > Implementing Reverse from before, I am running > into this weird error: > > type ReverseType a string = (string ->(string,a)) > data Reverse a string = Reverse (ReverseType a string) > > instance Monad (Reverse a s) where > re

Re: [Haskell-cafe] What are Kind errors and how do you fix them?

2004-03-23 Thread S. Alexander Jacobson
So if I want to use Monad, I have to have Reverse only work with Strings and not some data type that might be a String? Is there a workaround that would allow me to preserve flexibility around the target datatype? Otherwise I'll rename Forward and Reverse to toString and fromString, but the notio