
In Chapter 3 of Real World Haskell it is not clear to me how to get the myInfo into the ghci system there appears to be two definitions for ch03/BookStore.hs can anyone help? Alan Cameron

On Thu, 29 Jan 2009 15:21:24 +0000, Alan Cameron
In Chapter 3 of Real World Haskell it is not clear to me how to get the myInfo into the ghci system there appears to be two definitions for ch03/BookStore.hs can anyone help?
Alan Cameron
I assume you are referring to this: -- file: ch03/BookStore.hs data BookInfo = Book Int String [String] deriving show ... Book text here ... -- file: ch03/BookStore.hs data MagazineInfo = Magazine Int String [String] deriving show ... More book text here ... -- file: ch03/BookStore.hs myInfo = Book 9870135072455 "Algebra of Programming" ["Richard Bird", "Oege de Moor"] When the book mentions a filename, that means that what follows is from that file, but may only be a piece of that file. Save all of these pieces into a file named BookStore.hs and then run "ghci BookStore.hs" in the same directory as the file.

When the book mentions a filename, that means that what follows is from that file, but may only be a piece of that file. Save all of these pieces into a file named BookStore.hs and then run "ghci BookStore.hs" in the same directory as the file.
You can find the entire source code from the book here: http://examples.oreilly.com/9780596514983/rwh-examples2.zip Patrick -- ===================== Patrick LeBoutillier Rosemère, Québec, Canada
participants (3)
-
Alan Cameron
-
David Frey
-
Patrick LeBoutillier