diff options
Diffstat (limited to 'testsuite/tests/generics/T21185.hs')
-rw-r--r-- | testsuite/tests/generics/T21185.hs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/tests/generics/T21185.hs b/testsuite/tests/generics/T21185.hs new file mode 100644 index 0000000000..1d2d1f30af --- /dev/null +++ b/testsuite/tests/generics/T21185.hs @@ -0,0 +1,22 @@ +{-# LANGUAGE TypeFamilies #-} +module T21185 where + +import Data.Kind (Type) +import GHC.Generics (Generic1(..)) + +type FakeOut x = Int + +data D (b :: Type) where + MkD :: c -> FakeOut c -> D c + deriving Generic1 + +data family DF (a :: Type) +data instance DF (b :: Type) where + MkDF :: c -> FakeOut c -> DF c + deriving Generic1 + +d :: Rep1 D () +d = from1 $ MkD () 42 + +df :: Rep1 DF () +df = from1 $ MkDF () 42 |