[GHC] #13734: Code requires ScopedTypeVariables, possibly erroneously
GHC
ghc-devs at haskell.org
Sat May 20 20:22:19 UTC 2017
#13734: Code requires ScopedTypeVariables, possibly erroneously
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
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 RyanGlScott):
This looks like expected behavior to me. After all, this won't typecheck
without `ScopedTypeVariables` either:
{{{#!hs
{-# Language ScopedTypeVariables, TypeApplications, InstanceSigs #-}
import Data.Proxy
class Sized f where
size :: proxy f -> Int
instance Sized Int where
size :: proxy Int -> Int
size _ = 42
instance (Sized a, Sized b) => Sized (a, b) where
size :: proxy (a, b) -> Int
size _ = size (Proxy :: Proxy a) + size (Proxy :: Proxy b)
}}}
I don't see why `TypeApplications` would be different in that regard.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13734#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list