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