Simple compiler question

Ken Shan ken@digitas.harvard.edu
Wed, 25 Jul 2001 14:41:30 -0400


--0F1p//8PRICkK4MW
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2001-07-25T14:39:06-0400, Mark Carroll wrote:
> Do any of the decent Haskell compilers allow you to just type function
> definitions at an interpreter prompt and use them in subsequent
> interactions, as you'd expect from a Lisp environment? I'm fed up of
> editing a tiny file separately and typing :reload each time, etc. Surely
> I'm missing something obvious?

GHCi is what you want:

$ ghci
   ___         ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |      GHC Interactive, version 5.00.2, For Haskell 98.
/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :? for help.

Loading package std ... linking ... done.
Prelude> let f x =3D x + x
Prelude> f 3
6
Prelude>

--=20
Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig
=AB ne g=E2che pas ta vie pour leur id=E9e de patrie =BB le bouton me dit

--0F1p//8PRICkK4MW
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7XxLZzjAc4f+uuBURAnIdAKD2gjUGqnZ6EEyoKi6g+hg21V4ikgCgu2BI
qcuNvfBbsLlFrdxOmbLvVm4=
=iyI2
-----END PGP SIGNATURE-----

--0F1p//8PRICkK4MW--