Re: Importing strategies

2003-12-15 Thread Hans-Wolfgang Loidl
Hi, IIRC, the strategies module is available in the Concurrent package but not in the hierarchical libraries. Using ghc-6.0.1 the following works for me # ghc -package concurrent hiS.hs # ./a.out hi there with the program > import Strategies > main = putStrLn "hi there" Cheers, -- HW On Mon

Re: looking for data structure advice

2003-12-15 Thread Jon Cast
Conor McBride <[EMAIL PROTECTED]> wrote: > I've always been a little bothered by the MonadPlus class: zero and > plus are associated (no pun intended) in my mind with monoidal > structure. Is there more to MonadPlus than a clumsy workaround for > the lack of quantified constraints? Yes. For ev

Re: looking for data structure advice

2003-12-15 Thread Conor McBride
Hi David Roundy wrote: > > On Mon, Dec 15, 2003 at 08:55:10AM +, Graham Klyne wrote: > > I apologize... my question was unclear. > > > > It was not the standard MonadPlus class and functions that I was asking > > about, but the specific instance for Maybe (i.e. or_maybe). As it happens, > >

Re: looking for data structure advice

2003-12-15 Thread Samuel Tardieu
> "David" == David Roundy <[EMAIL PROTECTED]> writes: David> My or_maybe is just defined as David> or_maybe (Just e) _ = Just e or_maybe Nothing f = f David> which is pretty simple, so you can run a series of calculations David> (assuming you want to keep the first that has a non-Nothing Dav

Re: looking for data structure advice

2003-12-15 Thread Samuel Tardieu
> "Graham" == Graham Klyne <[EMAIL PROTECTED]> writes: Graham> I apologize... my question was unclear. It was not the Graham> standard MonadPlus class and functions that I was asking Graham> about, but the specific instance for Maybe (i.e. or_maybe). Graham> As it happens, a couple of times i

Re: looking for data structure advice

2003-12-15 Thread David Roundy
On Mon, Dec 15, 2003 at 08:55:10AM +, Graham Klyne wrote: > I apologize... my question was unclear. > > It was not the standard MonadPlus class and functions that I was asking > about, but the specific instance for Maybe (i.e. or_maybe). As it happens, > a couple of times in the past couple

Re: looking for data structure advice

2003-12-15 Thread Graham Klyne
I apologize... my question was unclear. It was not the standard MonadPlus class and functions that I was asking about, but the specific instance for Maybe (i.e. or_maybe). As it happens, a couple of times in the past couple of weeks, I might have used such a function if it were available in th

Re: homework help: upn parser

2003-12-15 Thread Graham Klyne
At 13:12 14/12/03 +0100, Max Hoffmann wrote: Dear Haskell cafe members, I am somebody one could well call a bloody beginner but the elegance of functional programming and am therefore truly interested to learn more about Haskell. Now I have an assignment to write a parsing function to convert a s

Re: homework help: upn parser

2003-12-15 Thread Leon Smith
Hi Max! This is a type definiton, which says that parsing takes one argument, a String, and gives you back a list of OpTree: parsing :: String->[OpTree] This is a function definition. The part before the = is called the left hand side, while the part after the = is called the right hand sid