
#13775: Type family expansion is too lazy, allows accepting of ill-typed terms -------------------------------------+------------------------------------- Reporter: fizruk | Owner: diatchki Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.0.2 checker) | Keywords: Resolution: | CustomTypeErrors 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: | -------------------------------------+------------------------------------- Comment (by simonpj): Well we hvae {{{ instance Show (Proxy s) where ... }}} Notice that `s` is not used. So the instance will work just fine if `s` = `Head '[]`. I don't regard this as a bug (yet, anyway). It accepts more programs than at least some people expect; but well typed programs (ones that are accepted) don't go wrong at runtime, which is what we ask from our type system. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13775#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler