Skip to content

Add GHC-88333 - #511

Merged
Bodigrim merged 6 commits into
haskellfoundation:mainfrom
MauScheff:main
Nov 9, 2026
Merged

Bodigrim merged 6 commits into
haskellfoundation:mainfrom
MauScheff:main

Conversation

@MauScheff

Copy link
Copy Markdown
Contributor

Documented GHC-8833: TcRnIncorrectTyVarOnLhsOfInjCond

@MauScheff

Copy link
Copy Markdown
Contributor Author

Added new line at end of file


This error is about the incorrect use of type variables in the injectivity condition of type families.

Type families in Haskell are a way to define type-level functions. An injectivity annotation (| a -> r) is used to specify that for a given input type a, there is exactly one output type r that the type family can map to.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we please use Markdown backticks here and elsewhere?

Suggested change
Type families in Haskell are a way to define type-level functions. An injectivity annotation (| a -> r) is used to specify that for a given input type a, there is exactly one output type r that the type family can map to.
Type families in Haskell are a way to define type-level functions. An injectivity annotation (`| a -> r`) is used to specify that for a given input type `a`, there is exactly one output type `r` that the type family can map to.

@Bodigrim Bodigrim left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Bodigrim
Bodigrim merged commit a107e83 into haskellfoundation:main Nov 9, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants