summaryrefslogtreecommitdiff
path: root/testsuite/tests/backpack/should_compile/bkp09.bkp
blob: 64cf447715253608ed35a7a861a05800aed8fdd4 (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
26
27
28
29
30
{-# LANGUAGE RankNTypes, DatatypeContexts, CApiFFI, GADTs, TypeFamilies, DefaultSignatures, MultiParamTypeClasses, FunctionalDependencies, PatternSynonyms #-}

-- Reflexivity test, bang on the units with as much
-- stuff as we can.
unit p where
    signature H where
        data T a = MkT (S a)
        data S a = MkS a

-- keept his synced up!
unit q where
    signature H where
        data T a = MkT (S a)
        data S a = MkS a

unit r where
    dependency p[H=<H>]
    dependency q[H=<H>]
    module M where
        import H
        x = MkT (MkS True)

unit h-impl where
    module H where
        data T a = MkT (S a)
        data S a = MkS a

unit s where
    dependency h-impl
    dependency r[H=h-impl:H]