On Dec 4, 2007 1:28 AM, Don Stewart [EMAIL PROTECTED] wrote:
-- How to display results
instance Show Action where
show MoveOutOfBounds= Sorry you can't move in that direction.
show (MoveBadTerrain a) = case a of
Wall - You
On 04/12/2007, Felipe Lessa [EMAIL PROTECTED] wrote:
I always thought show was meant for returning a String that could be
used to recreate the original data if you copy-pasted it in your code
or if you used read (i.e. read . show == id). Reading the
documentation more carefully, I see that
On Tue, 4 Dec 2007, Dougal Stanton wrote:
On 04/12/2007, Felipe Lessa [EMAIL PROTECTED] wrote:
I always thought show was meant for returning a String that could be
used to recreate the original data if you copy-pasted it in your code
or if you used read (i.e. read . show == id). Reading
Felipe Lessa wrote:
On Dec 4, 2007 1:28 AM, Don Stewart [EMAIL PROTECTED] wrote:
-- How to display results
instance Show Action where
show MoveOutOfBounds= Sorry you can't move in that direction.
show (MoveBadTerrain a) = case a of
jules:
Felipe Lessa wrote:
On Dec 4, 2007 1:28 AM, Don Stewart [EMAIL PROTECTED] wrote:
-- How to display results
instance Show Action where
show MoveOutOfBounds= Sorry you can't move in that
direction.
show (MoveBadTerrain a) = case a of
I am still in the early stages learning haskell, which is my first foray
into functional programming. Well there's no better way to learn than
to write something, so I started writing a game.
Mostly the thing looks good so far, far better than the C version did.
However, my problem is that
stefanor:
On Mon, Dec 03, 2007 at 08:47:48PM -0600, David McBride wrote:
I am still in the early stages learning haskell, which is my first foray
into functional programming. Well there's no better way to learn than to
write something, so I started writing a game.
Mostly the thing
On Mon, Dec 03, 2007 at 08:47:48PM -0600, David McBride wrote:
I am still in the early stages learning haskell, which is my first foray
into functional programming. Well there's no better way to learn than to
write something, so I started writing a game.
Mostly the thing looks good so far,
Don's code intrigued me, so I fired up my trusty emacs and ghci, and
turned it into actual code, which type-checks. Well, ok, I kind of
randomly poked at it, while begging for help, which I received in
abundance from #haskell, particularly oerjan, and Don himself. Anyway,
here's the code:
{-#