
#13305: static: check for identifiers should only consider term level variables -------------------------------------+------------------------------------- Reporter: edsko | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Resolution: | Keywords: | StaticPointers Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by edsko): Nice rationale Mathieu. I concur completely :) Just wanted to say "I think this is simply a case of a bad error message" is a bit confusing. I forgot the `Typeable` annotation, but that's a bit of a red herring. What I meant to say was {{{#!hs {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StaticPointers #-} module Main where import Data.Proxy import Data.Typeable import GHC.StaticPtr foo :: forall a. Typeable a => StaticPtr (Proxy a) foo = static (Proxy :: Proxy a) main :: IO () main = putStrLn "Hi" }}} should be accepted, but doesn't because the syntactic check is overzealous. Indeed, in my first version, if that check is relaxed, the error message should probably say `Typeable a` is missing (though see also #13306, where for `f9` the error message is confusing. Not sure what will happen.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13305#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler