Skip to content

Conversation

MauScheff
Copy link

Documented GHC-8833: TcRnIncorrectTyVarOnLhsOfInjCond

@MauScheff
Copy link
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
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.

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