diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-03-02 20:06:35 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-03-02 20:06:35 +0000 |
commit | 3b9c6514a50e453e74f9fba6dea1b2a7a5dcfab0 (patch) | |
tree | a6165c8c8edcfc3274f8c536b07eeff87450393d /testsuite/tests/polykinds/T5717.hs | |
parent | 48ba35e032dc85f2f38d7d7c3c41cffdac1dce5d (diff) | |
parent | 05b18ad0a57528f4fcf0e9608a03a9b180060710 (diff) | |
download | haskell-3b9c6514a50e453e74f9fba6dea1b2a7a5dcfab0.tar.gz |
Merge branch 'master' of http://darcs.haskell.org//testsuite
Conflicts:
mk/boilerplate.mk
Diffstat (limited to 'testsuite/tests/polykinds/T5717.hs')
-rw-r--r-- | testsuite/tests/polykinds/T5717.hs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T5717.hs b/testsuite/tests/polykinds/T5717.hs new file mode 100644 index 0000000000..5dd7ac4b58 --- /dev/null +++ b/testsuite/tests/polykinds/T5717.hs @@ -0,0 +1,20 @@ +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE PolyKinds #-} + +module T5717 where + + +data TypeRep = TypeRep + +data Proxy t = Proxy + +typeRep :: Proxy a -> TypeRep +typeRep Proxy = TypeRep + +-- This one works fine: +typeOf :: forall a. a -> TypeRep +typeOf _ = typeRep (Proxy :: Proxy a) + +-- But this one panics! +typeOf1 :: forall t a. t a -> TypeRep +typeOf1 _ = typeRep (Proxy :: Proxy t) |