Code requires ScopedTypeVariables, possibly erroneously
This doesn't work without ScopedTypeVariables
, but shouldn't it? (on 8.0.1
, 8.2.0.20170507`)
{-# 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
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |