diff options
Diffstat (limited to 'testsuite/tests/rep-poly/EtaExpandStupid2.hs')
-rw-r--r-- | testsuite/tests/rep-poly/EtaExpandStupid2.hs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/rep-poly/EtaExpandStupid2.hs b/testsuite/tests/rep-poly/EtaExpandStupid2.hs new file mode 100644 index 0000000000..c7fb218715 --- /dev/null +++ b/testsuite/tests/rep-poly/EtaExpandStupid2.hs @@ -0,0 +1,19 @@ + +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE DatatypeContexts #-} +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE StandaloneKindSignatures #-} + +module EtaExpandStupid2 where + +import Data.Kind +import GHC.Exts + +type D4 :: TYPE FloatRep -> Type -> Type -> Type +data (Eq b, Num c) => D4 a b c = MkD4 a b c + +foo4 :: Int -> c -> D4 Float# Int c +foo4 = MkD4 ( 9.0# `timesFloat#` 17.0# ) + + -- should fail: no evidence for Num c, + -- which is required by the datatype context |