
#9636: Function with type error accepted -------------------------------------+------------------------------------- Reporter: augustss | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Blocked By: | None/Unknown Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- The following program is accepted by ghc even though it is clearly wrong. The type family T is closed so T Bool cannot ever be reduced, so it must be a type error. {{{#!hs {-# LANGUAGE TypeFamilies #-} module Err62 where type family T a where T Int = () x :: T Bool x = undefined f :: T Bool -> Bool f _ = True y :: Bool y = f x }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9636 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler