1--
2-- Copyright 2016, NICTA
3--
4-- This software may be distributed and modified according to the terms of
5-- the GNU General Public License version 2. Note that NO WARRANTY is provided.
6-- See "LICENSE_GPLv2.txt" for details.
7--
8-- @TAG(NICTA_GPL)
9--
10
11type A = {f1 : X, f2 : Y, f3: Z}
12
13
14type X
15type Y
16type Z
17
18type B = (A take (..)) put (f1)
19-- type C = A take .. put (f1)
20-- type D = A take (.., f1) put (f1)
21-- type E = A take (f1, ..) put f1
22
23foo : () -> {f1 : X, f2 : Y, f3 : Z} take (f2, f3)
24bar : B -> ()
25
26x : () -> ()
27x () = bar (foo ())
28
29-- type C = A put (f2)
30-- type D = A take (f1, f2) put (f3)
31
32-- type E = ((A take (f2)) put (f1)) take (f2)
33
34type F = A take (f1, f2) put (..)
35
36id : all (a). a -> a
37
38test : A -> A
39test y = id[A] y
40