diff options
Diffstat (limited to 'testsuite/tests/rep-poly/UnliftedNewtypesCoerceFail.hs')
-rw-r--r-- | testsuite/tests/rep-poly/UnliftedNewtypesCoerceFail.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/rep-poly/UnliftedNewtypesCoerceFail.hs b/testsuite/tests/rep-poly/UnliftedNewtypesCoerceFail.hs new file mode 100644 index 0000000000..f5fd1092ca --- /dev/null +++ b/testsuite/tests/rep-poly/UnliftedNewtypesCoerceFail.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE TypeInType #-} +{-# LANGUAGE UnliftedNewtypes #-} + +module Goof where + +import GHC.Exts (coerce) +import GHC.Types (RuntimeRep,TYPE,Coercible) + +goof :: forall (rep :: RuntimeRep) (x :: TYPE rep) (y :: TYPE rep). + Coercible x y => x -> y +goof = coerce |