[GHC] #11674: GHC accepts overly general instance sigs
GHC
ghc-devs at haskell.org
Fri Mar 4 11:58:06 UTC 2016
#11674: GHC accepts overly general instance sigs
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.1
Keywords: InstanceSigs | Operating System: Unknown/Multiple
Architecture: | Type of failure: GHC accepts
Unknown/Multiple | invalid program
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
{{{#!hs
{-# LANGUAGE InstanceSigs #-}
data I a = MkI a
instance Functor I where
fmap :: (a -> b) -> f a -> f b
fmap = undefined
}}}
is accepted when the type is too general, even things like:
{{{#!hs
fmap :: (a -> b) -> f a -> g b
-- &
fmap :: whoami
}}}
are accepted
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11674>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list