3 / /_\// /_/ / / | | GHC Interactive, version 5.01, for Haskell 98.
4 / /_\\/ __ / /___| | http://www.haskell.org/ghc/
5 \____/\/ /_/\____/|_| Type :? for help.
7 Loading package std ... linking ... done.
8 *** WARNING: . is writable by someone else, IGNORING!
9 *** WARNING: ./.ghci is writable by someone else, IGNORING!
11 Prelude> -- tests for :def, :undef
12 Prelude> let void m = m >> return ""
13 Prelude> let echo s = void (putStrLn s)
14 Prelude> :def echo echo
15 Prelude> :echo hello, world!
17 Prelude> let echo s = return (":! echo " ++ map Char.toUpper s)
19 Prelude> :echo hello, world!
20 Prelude> :def echo echo
21 command `echo' is already defined
23 Prelude> :def echo echo
24 Prelude> :echo hello, world!
26 Prelude> Leaving GHCi.