-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Simon Marlow
committed
Nov 7, 2007
1 parent
58e8f7a
commit 89bc82e
Showing
2 changed files
with
14 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,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 echo s = return (":! echo " ++ map Char.toUpper s) | ||
let echoupper s = return (":! echo " ++ map Char.toUpper s) | ||
:echo hello, world! | ||
:def echo echo | ||
:def echo echoupper | ||
:undef echo | ||
:def echo echo | ||
:def echo echoupper | ||
:echo hello, world! | ||
:def! echo echo | ||
:echo hello, world! | ||
:undef f f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
no macros defined | ||
the following macros are defined: | ||
echo | ||
hello, world! | ||
hello, world! | ||
command 'echo' is already defined | ||
macro 'echo' is already defined | ||
HELLO, WORLD! | ||
hello, world! | ||
macro 'f' is not defined |