Module

Perspectives.Parsing.Messages

#PerspectivesError

data PerspectivesError

A Perspectives sourcefile (text or diagram) will be parsed in two passes. The resulting internal representation of types is type-checked. During all three phases of transformation, errors may be detected. This module defines the structure and kind of these errors. A type for Perspectives errors Each error should have an ArcPosition.

Constructors

Instances

#MultipleErrors

type MultipleErrors = NonEmptyList PerspectivesError

A type for accumulating multiple PerspectivesErrorss.

#PF

type PF = ExceptT MultipleErrors MonadPerspectives

An error monad, used in this library to encode possible failures when checking a Perspectives model data.

The Alt instance for Except allows us to accumulate errors, unlike Either, which preserves only the last error.

#fail

fail :: forall a. PerspectivesError -> PF a

Throws a failure error in F.

Modules