
#13734: Code requires ScopedTypeVariables, possibly erroneously -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- This doesn't work without `ScopedTypeVariables`, but shouldn't it? (on `8.0.1`, 8.2.0.20170507`) {{{#!hs {-# Language ScopedTypeVariables, TypeApplications, AllowAmbiguousTypes, InstanceSigs #-} class Sized f where size :: Int instance Sized Int where size :: Int size = 42 instance (Sized a, Sized b) => Sized (a, b) where size :: Int size = size @a + size @b }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13734 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler