[Haskell-cafe] Re: [Haskell] [newbye] 'Just a'

2005-02-07 Thread Graham Klyne
[I've switched my response to the Haskell-cafe list] What do you intend if both (get a) and (get b) return Nothing? You might also be interested in the library function 'maybe': http://www.haskell.org/onlinereport/standard-prelude.html#$vmaybe or maybe (sic) Maybe.fromMaybe in:

[Haskell-cafe] Top 20 ``things'' to know in Haskell

2005-02-07 Thread Jacques Carette
The recent post of Graham Klyne (below) reminds me that I have meant to ask: is there a ``top 20'' things a serious programmer should know when writing code in Haskell? Of course there is a lot of programming language theory that would be great to know, but I mean really down-to-earth things like

[Haskell-cafe] Re: [Haskell] [newbye] 'Just a'

2005-02-07 Thread Yuri D'Elia
On Mon, 07 Feb 2005 15:08:56 +, Graham Klyne wrote: [I've switched my response to the Haskell-cafe list] I'm following all lists through gmane, hoping the post will work. I've received a double-ack first from gmane and then from the mailing-list manager. What do you intend if both (get a)

[Haskell-cafe] How to write (FxF' . delta) AxB -- F A

2005-02-07 Thread Johan Glimming
Hello This might be a trivial question, but I wonder if anybody knows how to write a function proj :: (Functor f, Functor f') = (f:*:f') (a,b) - f a where data a:*:b o = Pair (a o) (b o) I think I really want to project out a component of F (AxB) x F' (AxB). However, this seems harder

[Haskell-cafe] how to name third party libraries?

2005-02-07 Thread S. Alexander Jacobson
Is there documentation somewhere about how to name third party libraries? For example, if I have HTTP and SMTP libraries, what should I call them? -alex- __ S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com

[Haskell-cafe] help with some code. it doesn't whant to compile.

2005-02-07 Thread pablo daniel rey
hello i'm new to haskell so i'm sorry if this is a stupid question, but i'm having problems with some basic code. the code : data Maybe Dir = Just Dir | Nothing data Dir = Left | Right | Up | Down data Piece = Vertical | Horizontal | CodeA | CodeB flow = [(Horizontal, Left, Left),

[Haskell-cafe] Re: [Haskell] help with some basic code that doesn't work

2005-02-07 Thread Cale Gibbard
Delete data Maybe Dir = Just Dir | Nothing as it is unnecessary Maybe a is defined already for any type a (and doesn't make sense, Dir occuring before the = sign would indicate that it is a type variable, but it is uppercase), and also change data Dir = Left | Right | Up | Down data Piece =

Re: [Haskell-cafe] how to name third party libraries?

2005-02-07 Thread Ben Horsfall
On Mon, 7 Feb 2005 17:54:46 -0500 (Eastern Standard Time), S. Alexander Jacobson [EMAIL PROTECTED] wrote: Is there documentation somewhere about how to name third party libraries? For example, if I have HTTP and SMTP libraries, what should I call them? See

[Haskell-cafe] Name My Functor Classes

2005-02-07 Thread Ashley Yakeley
These classes seem like they might correspond to concepts in category theory: class Functor f where fmap :: (a - b) - f a - f b -- must satisfy: -- fmap id = id -- fmap (p . q) = (fmap p) . (fmap q) class (Functor f) = C1 f where f1 :: f (a - b) - f a - f