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
|
|
|
|
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
|
|
|
|
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-05 20:05:08 +00:00
|
|
|
pop::scope -- should produce an error
|