summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/UnliftedNewtypesUnassociatedFamilyFail.hs
blob: adac27fe90ac741b32c9b6221ad7e6730bd1de55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{-# LANGUAGE UnliftedNewtypes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE GADTs #-}

module UnliftedNewtypesUnassociatedFamily where

import GHC.Int (Int(I#))
import GHC.Word (Word(W#))
import GHC.Exts (Int#,Word#)
import GHC.Exts (TYPE,RuntimeRep(LiftedRep,IntRep,WordRep,TupleRep))

data family DF :: TYPE (r :: RuntimeRep)

-- All these fail: see #18891 and !4419
-- See Note [Kind inference for data family instances]
-- in GHC.Tc.TyCl.Instance
newtype instance DF = MkDF1a Int#
newtype instance DF = MkDF2a Word#
newtype instance DF = MkDF3a (# Int#, Word# #)