Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
8889d5c0
Commit
8889d5c0
authored
Mar 23, 2001
by
simonmar
Browse files
[project @ 2001-03-23 12:29:07 by simonmar]
Add test for :def, :undef
parent
ef46487b
Changes
2
Hide whitespace changes
Inline
Side-by-side
ghc/tests/ghci/ghci005.script
0 → 100644
View file @
8889d5c0
:unset +s +t
-- tests for :def, :undef
let void m = m >> return ""
let echo s = void (putStrLn s)
:def echo echo
:echo hello, world!
let echo s = return (":! echo " ++ map Char.toUpper s)
:echo hello, world!
:def echo echo
:undef echo
:def echo echo
:echo hello, world!
ghc/tests/ghci/ghci005.stdout
0 → 100644
View file @
8889d5c0
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 4.11, For Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package std ... linking ... done.
Prelude> :unset +s +t
Prelude> -- tests for :def, :undef
Prelude> let void m = m >> return ""
Prelude> let echo s = void (putStrLn s)
Prelude> :def echo echo
Prelude> :echo hello, world!
Prelude>
Prelude> let echo s = return (":! echo " ++ map Char.toUpper s)
hello, world!
Prelude> :echo hello, world!
Prelude> :def echo echo
ghc: command `echo' is already defined
Prelude> :undef echo
Prelude> :def echo echo
Prelude> :echo hello, world!
HELLO, WORLD!
Prelude> Leaving GHCi.
hello, world!
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment