unison/unison-src/tests/imports.u
2018-08-03 03:50:54 -04:00

21 lines
466 B
Plaintext

-- This brings `None` into scope unqualified
use Optional.None
-- '.' is optional, this brings `None` and `Some` into
-- scope unqualified
use Optional None Some
-- Can import operators this way also
-- no need to put them in parens
use UInt64.+
-- Later imports shadow earlier ones
use UInt64 - * /
use UInt64. drop *
use UInt64 . drop
-- use Int64 + -- this would cause type error below!
case Some (100 + 200 / 3 * 2) of
Optional.None -> 19
Some 200 -> 20