2014-01-05 20:05:08 +00:00
|
|
|
import Int.
|
2013-09-06 18:02:00 +00:00
|
|
|
|
2014-01-05 19:03:35 +00:00
|
|
|
print
|
2013-09-06 18:02:00 +00:00
|
|
|
let b := true,
|
|
|
|
a : Int := b
|
|
|
|
in a
|
|
|
|
|
2014-01-05 20:05:08 +00:00
|
|
|
variable vector : Type -> Nat -> Type
|
|
|
|
variable const {A : Type} (n : Nat) (a : A) : vector A n
|
2013-09-06 18:02:00 +00:00
|
|
|
|
2014-01-05 20:05:08 +00:00
|
|
|
check
|
2013-09-06 18:02:00 +00:00
|
|
|
let a := 10,
|
|
|
|
v1 := const a true,
|
|
|
|
v2 := v1
|
|
|
|
in v2
|
|
|
|
|
2014-01-05 19:03:35 +00:00
|
|
|
print
|
2013-09-06 18:02:00 +00:00
|
|
|
let a := 10,
|
|
|
|
v1 : vector Bool a := const a true,
|
|
|
|
v2 : vector Bool a := v1
|
|
|
|
in v2
|
|
|
|
|
2014-01-05 20:05:08 +00:00
|
|
|
check
|
2013-09-06 18:02:00 +00:00
|
|
|
let a := 10,
|
|
|
|
v1 : vector Bool a := const a true,
|
|
|
|
v2 : vector Bool a := v1
|
|
|
|
in v2
|
|
|
|
|
2014-01-05 20:05:08 +00:00
|
|
|
check
|
2013-09-06 18:02:00 +00:00
|
|
|
let a := 10,
|
|
|
|
v1 : vector Bool a := const a true,
|
|
|
|
v2 : vector Int a := v1
|
|
|
|
in v2
|
|
|
|
|
2014-01-05 20:05:08 +00:00
|
|
|
variable foo : (vector Bool 10) -> (vector Int 10)
|
|
|
|
coercion foo
|
2013-09-06 18:02:00 +00:00
|
|
|
|
2014-01-05 20:05:08 +00:00
|
|
|
check
|
2013-09-06 18:02:00 +00:00
|
|
|
let a := 10,
|
|
|
|
v1 : vector Bool a := const a true,
|
|
|
|
v2 : vector Int a := v1
|
|
|
|
in v2
|
|
|
|
|
2014-01-06 05:45:31 +00:00
|
|
|
set::option pp::coercion true
|
2013-09-06 18:02:00 +00:00
|
|
|
|
2014-01-05 19:03:35 +00:00
|
|
|
print
|
2013-09-06 18:02:00 +00:00
|
|
|
let a := 10,
|
|
|
|
v1 : vector Bool a := const a true,
|
|
|
|
v2 : vector Int a := v1
|
|
|
|
in v2
|