diff options
Diffstat (limited to 'testsuite/tests/rep-poly/T19615.hs')
-rw-r--r-- | testsuite/tests/rep-poly/T19615.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/rep-poly/T19615.hs b/testsuite/tests/rep-poly/T19615.hs new file mode 100644 index 0000000000..8d71ca925e --- /dev/null +++ b/testsuite/tests/rep-poly/T19615.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeFamilies #-} +module T19615 where + +import GHC.Exts + +class Call (r :: RuntimeRep) where + type Lev (a :: TYPE r) + lift' :: (a :: TYPE r) -> (Lev a -> b) -> b + mapF :: forall r' (a :: TYPE r) (b :: TYPE r'). Call r' => (a -> b) -> Lev a -> Lev b + +instance Call LiftedRep where + type Lev a = a + lift' a k = k a + mapF f x = lift' (f x) id |