[project @ 2001-04-17 06:40:07 by lewie]
[ghc-hetmet.git] / ghc / tests / ghci / ghci005.stdout
1    ___         ___ _
2   / _ \ /\  /\/ __(_)
3  / /_\// /_/ / /  | |      GHC Interactive, version 4.11, For Haskell 98.
4 / /_\\/ __  / /___| |      http://www.haskell.org/ghc/
5 \____/\/ /_/\____/|_|      Type :? for help.
6
7 Loading package std ... linking ... done.
8 Prelude> :unset +s +t
9 Prelude> -- tests for :def, :undef
10 Prelude> let void m = m >> return ""
11 Prelude> let echo s = void (putStrLn s)
12 Prelude> :def echo echo
13 Prelude> :echo hello, world!
14 Prelude> 
15 Prelude> let echo s = return (":! echo " ++ map Char.toUpper s)
16 hello, world!
17 Prelude> :echo hello, world!
18 Prelude> :def echo echo
19 ghc: command `echo' is already defined
20 Prelude> :undef echo
21 Prelude> :def echo echo
22 Prelude> :echo hello, world!
23 HELLO, WORLD!
24 Prelude> Leaving GHCi.
25 hello, world!