diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/T2799.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T2799.hs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T2799.hs b/testsuite/tests/typecheck/should_compile/T2799.hs new file mode 100644 index 0000000000..38beabdd48 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T2799.hs @@ -0,0 +1,16 @@ +{-# OPTIONS -XGADTs #-} + +module RepAux ( + toSpineRl +) where + +data MTup l where + P :: MTup l -> MTup (a,l) + +data Spine a where + S :: Spine (a -> b) -> Spine b + +toSpineRl :: MTup l -> l -> (l -> a) -> Spine a +toSpineRl (P rs) (a, l) into = S (toSpineRl rs l into') + where + into' tl1 x1 = into (x1,tl1) |