[Haskell-cafe] extreme newbie: hugs prompt vs load module
robdockins at fastmail.fm
Wed Aug 23 12:09:53 EDT 2006
On Aug 23, 2006, at 10:16 AM, George Young wrote:
> [linux, ghci 184.108.40.20660820, hugs May 2006]
> I have just started learning Haskell. I have hugs and ghci under
> linux, and I'm going through the Gentle Introduction to
> Haskell<http://www.haskell.org/tutorial>, so far through section 4,
> "case expressions and pattern matching". I'm a python programmer,
> background in maclisp, scheme, T, C, C++, and a little J.
> I'm confused about what sort of things I can type at the interpreter
> prompt, and what things have to be loaded as a module. I keep trying
> to treat the prompt like a lisp or python REPL, which is obviously
> wrong. Can someone set me straight?
For the most part, the things you can enter at the GHCi or Hugs
prompt are _expressions_. This mostly* excludes _declarations_,
which are things like function definitions, datatype declarations,
class and instance declarations, etc. Those things need to go into a
(*) 'let' expressions will allow you to define local functions as
part of an expression, however. GHCi also has a slight variation of
'let' that allows you to define functions for the session.
> Is there another tutorial that might be more appropriate for me?
The following tutorial is generally recognized as one of the better
> I am finding haskell quite appealing. I hope to start writing real
> small) applications to do some data analysis from our Postgres DB.
There are several haskell database layers. I've had some luck with
HDBC, which has a PostgreSQL driver.
> --George Young
> "Are the gods not just?" "Oh no, child.
> What would become of us if they were?" (C.S. Lewis)
Speak softly and drive a Sherman tank.
Laugh hard; it's a long way to the bank.
More information about the Haskell-Cafe