If there is an error in the declarations, the declaration with the error will be underlined with red. The net entry and all affected pages will also be underlined with red.

Declarations with error

Declarations with error

To see the error message for a declaration with an error, move the mouse over the declaration.

Error message on decl

Error message on decl

Overwriting declarations

It is not allowed for two declarations to share the same name. If a declaration overwrites another declaration both will be underlined red and so will all declarations depending on them. To see which declaration is overwritten move the mouse over one of the declarations. The other declaration will be underlined black.

Owerwriting declarations

Owerwriting declarations

Match errors in function declarations

A function declaration has an error if there are insufficient patterns to match against all the possible inputs. This is a non-exhaustive match error:

Non-exhaustive match error

Non-exhaustive match error

A function declaration has an error if a pattern is provided that is covered by some earlier pattern. This is a redundant match error:

Redundant match error

Redundant match error

A function declaration can have both match redundant and match non-exhaustive errors.

Opening a structure

It is not allowed to open a structure in a declaration.

Opening a structure

Opening a structure

Related pages

Syntax checking

Example declarations

You must be logged in to post a comment.