
#13571: Injective type family syntax accepted without TypeFamilyDependencies -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: (none) Type: bug | Status: new Priority: low | Milestone: Component: Compiler | Version: 8.0.1 (Parser) | Keywords: TypeFamilies, | Operating System: Unknown/Multiple Injective | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- This program compiles fine although it names the result type variable, which is a piece of syntax that should only be available with `TypeFamilyDependencies` (injective type families): {{{#!haskell {-# LANGUAGE TypeFamilies #-} module Foo where type family F a = r where F a = a }}} If I say: {{{#!haskell type family F a = r | r -> a where F a = a }}} only then the definition is rejected. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13571 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler