Commit 7aea0cfa authored by Ömer Sinan Ağacan's avatar Ömer Sinan Ağacan Committed by Ben Gamari

use Proxy instead of undefined -- we already dropped support for 7.6

Reviewers: austin, goldfire, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1363
parent 798d2e2b
......@@ -109,8 +109,9 @@ import GHC.Desugar ( AnnotationWrapper(..) )
import qualified Data.Map as Map
import Data.Dynamic ( fromDynamic, toDyn )
import Data.Typeable ( typeOf, Typeable )
import Data.Typeable ( typeOf, Typeable, typeRep )
import Data.Data (Data)
import Data.Proxy ( Proxy (..) )
import GHC.Exts ( unsafeCoerce# )
#endif
......@@ -844,9 +845,7 @@ instance TH.Quasi (IOEnv (Env TcGblEnv TcLclEnv)) where
th_state_var <- fmap tcg_th_state getGblEnv
th_state <- readTcRef th_state_var
-- See #10596 for why we use a scoped type variable here.
-- ToDo: convert @undefined :: a@ to @proxy :: Proxy a@ when
-- we drop support for GHC 7.6.
return (Map.lookup (typeOf (undefined :: a)) th_state >>= fromDynamic)
return (Map.lookup (typeRep (Proxy :: Proxy a)) th_state >>= fromDynamic)
qPutQ x = do
th_state_var <- fmap tcg_th_state getGblEnv
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment