[Haskell-beginners] Questions on set up on OSX

Chaddaï Fouché chaddai.fouche at gmail.com
Wed Nov 16 15:38:16 CET 2011


On Tue, Nov 15, 2011 at 9:24 PM, Sophie <itsme213 at hotmail.com> wrote:
> I have the basic install, ghci working, going through the Real World book, and have some set up questions:
>
> - Is there any REPL which will take (close to) full Haskell syntax, including function definitions?

GHCI already accepts function definitions, you just have to keep in
mind that writing in GHCI is close to writing code in a do-block, so
you must precede definitions with "let ", you can also use multiline
(space based syntax) on recent ghci by enclosing your code in ":{"
commands. You can import with "import Module" and have access to the
full range of import syntax (qualified, as, ...). The only things that
are still missing are data definitions and typeclass definitions and
instances, though they should be possible in the next GHC release ! :)

-- 
Jedaï



More information about the Beginners mailing list