ddc-build-0.4.3.1: Disciplined Disciple Compiler build framework.

Safe HaskellNone
LanguageHaskell98

DDC.Build.Interface.Load

Description

Loader for DDC interface files.

Synopsis

Documentation

loadInterface Source #

Arguments

:: FilePath

File path of interface file, for error messages.

-> UTCTime

TimeStamp of interface file.

-> String

Interface file source.

-> Either Error InterfaceAA 

Load an interface file.

data Error Source #

Problems that can arise when loading an interface file.

Constructors

ErrorEmpty

Empty Interface file.

ErrorNoMeta

No module meta information.

ErrorDuplicate

Duplicate module information.

ErrorBadMagic

Bad magic numbers / header information in alleged interface file. This probably isn't an interface file.

ErrorParse

Parse error in Interface file.

ErrorParseEnd

Parser error at end of input.

ErrorLoadTetra (Error Name Error)

Error when loading a tetra core module from the interface file.

ErrorLoadSalt (Error Name Error)

Error when loading a salt core module from the interface file.

Instances

Pretty Error Source # 

Associated Types

data PrettyMode Error :: * #

Methods

pprDefaultMode :: PrettyMode Error #

ppr :: Error -> Doc #

pprPrec :: Int -> Error -> Doc #

pprModePrec :: PrettyMode Error -> Int -> Error -> Doc #

type InterfaceAA = Interface (AnTEC SourcePos Name) () Source #

Type of annotated interface. As don't store full Salt code in interface files, we just set the annotation for it to ()