2014-01-05 20:05:08 +00:00
|
|
|
import Int.
|
2013-12-19 01:40:21 +00:00
|
|
|
|
2014-01-05 20:05:08 +00:00
|
|
|
variable first : Bool
|
2013-12-19 01:40:21 +00:00
|
|
|
|
2014-01-05 20:05:08 +00:00
|
|
|
scope
|
|
|
|
variables a b c : Int
|
|
|
|
variable f : Int -> Int
|
|
|
|
eval f a
|
2014-01-09 16:33:52 +00:00
|
|
|
pop_scope
|
2013-12-19 01:40:21 +00:00
|
|
|
|
2014-01-05 20:05:08 +00:00
|
|
|
eval f a -- should produce an error
|
2013-12-19 01:40:21 +00:00
|
|
|
|
2014-01-05 20:05:08 +00:00
|
|
|
print environment 1
|
2013-12-19 01:40:21 +00:00
|
|
|
|
2014-01-05 20:05:08 +00:00
|
|
|
scope
|
|
|
|
infixl 100 ++ : Int::add
|
|
|
|
check 10 ++ 20
|
2014-01-09 16:33:52 +00:00
|
|
|
pop_scope
|
2013-12-19 01:40:21 +00:00
|
|
|
|
2014-01-05 20:05:08 +00:00
|
|
|
check 10 ++ 20 -- should produce an error
|
2013-12-19 01:40:21 +00:00
|
|
|
|
2014-01-09 16:33:52 +00:00
|
|
|
pop_scope -- should produce an error
|