summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/scripts/ghci005.script
blob: e31b6fc9b7d56572fbb5a3d5559a8bbf82ed1e36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
:unset +s +t
-- tests for :def, :undef
:def
let void m = m >> return ""
let echo s = void (putStrLn s)
:def echo echo
:def
:echo hello, world!

let echoupper s = return (":! echo " ++ map Data.Char.toUpper s)
:echo hello, world!
:def echo echoupper
:undef echo
:def echo echoupper
:echo hello, world!
:def! echo echo
:echo hello, world!
:undef f f