
#13306: Problems with type inference for static expressions -------------------------------------+------------------------------------- Reporter: edsko | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Resolution: | Keywords: 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 rwbarton): The error about `f9` makes sense because after dictionary translation the syntactic restriction is no longer met: {{{#!hs f9 dTa dTNIa = static (f7 dTa) }}} From `static f7` you could get a `StaticPtr (forall a. Typeable a => U a -> NonInj a -> NonInj a)`, if that were legal. But in order to get a `U a -> NonInj a -> NonInj a` you need to combine the (static) `f7` with a (not static) `Typeable` dictionary. The other errors all involve `StaticPtr (NonInj a -> NonInj a)`, with a type argument that does not determine `a`. I'm not sure whether this is okay (or useful); it feels potentially dubious, but I can't see concretely why it would be bad. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13306#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler