Skip to content

Injective type family syntax accepted without TypeFamilyDependencies

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):

{-# LANGUAGE TypeFamilies #-}

module Foo where

type family F a = r where
    F a = a

If I say:

type family F a = r | r -> a where
    F a = a

only then the definition is rejected.

Trac metadata
Trac field Value
Version 8.0.1
Type Bug
TypeOfFailure OtherFailure
Priority low
Resolution Unresolved
Component Compiler (Parser)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information