summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/UnliftedNewtypesUnifySig.hs
blob: 9f5b984025295dc2cf1694c762d5a56350d0af36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTSyntax #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE UnliftedNewtypes #-}

module UnliftedNewtypesUnassociatedFamily where

import GHC.Int (Int(I#))
import GHC.Exts (Int#,Word#,RuntimeRep(IntRep))
import GHC.Exts (TYPE)

type KindOf (a :: TYPE k) = k
data family D (a :: TYPE r) :: TYPE r
newtype instance D a = MkWordD Word#
newtype instance D a :: TYPE (KindOf a) where
  MkIntD :: forall (a :: TYPE 'IntRep). Int# -> D a