derive-storable-plugin-0.2.3.0: GHC core plugin supporting the derive-storable package.

Copyright(c) Mateusz Kłoczko 2016
LicenseMIT
Maintainermateusz.p.kloczko@gmail.com
Stabilityexperimental
PortabilityGHC-only
Safe HaskellNone
LanguageHaskell2010

Foreign.Storable.Generic.Plugin.Internal.Error

Description

Contains the Error datatype and related pretty print functions.

Synopsis

Documentation

data Verbosity Source #

How verbose should the messages be.

Constructors

None 
Some 
All 

type CrashOnWarning = Bool Source #

Crash when an recoverable error occurs. For testing purposes.

data Flags Source #

Contains user-specified flags.

data Error Source #

All possible errors.

Constructors

TypeNotFound Id

Could not obtain the type from the id.

RecBinding CoreBind

The binding is recursive and won't be substituted.

CompilationNotSupported CoreBind

The compilation-substitution is not supported for the given binding.

CompilationError CoreBind SDoc

Error during compilation. The CoreBind is to be returned.

OrderingFailedBinds Int [CoreBind]

Ordering failed for core bindings.

OrderingFailedTypes Int [Type]

Ordering failed for types

OtherError SDoc

Any other error.

pprError :: Verbosity -> Error -> SDoc Source #

Print an error according to verbosity flag.

stringToPpr :: String -> SDoc Source #

Change String to SDoc. Each newline is $$ed with nest equal to spaces before. t is 4.