summaryrefslogtreecommitdiff
path: root/testsuite/tests/backpack/should_compile/bkp27.bkp
blob: 750418f80d5ecbbf92bbc9891f57ba5c641455b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
unit p where
    signature A where
        data A
        neg :: A -> A
    module P where
        import A
        f :: A -> A
        f = neg . neg

unit r where
    module A where
        data B = X | Y
        type A = B
        neg :: B -> B
        neg X = Y
        neg Y = X

unit q where
    dependency p[A=r:A]
    dependency r
    module M where
        import P
        import A
        g :: B
        g = f X