curry-frontend-1.0.4: Compile the functional logic language Curry to several intermediate formats
Copyright(c) 2005 Martin Engelke
2007 Sebastian Fischer
2011 - 2016 Björn Peemöller
2016 - 2017 Finn Teegen
2018 Kai-Oliver Prott
LicenseBSD-3-clause
Maintainerfte@informatik.uni-kiel.de
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

CompilerOpts

Description

This module defines data structures holding options for the compilation of Curry programs, and utility functions for printing help information as well as parsing the command line arguments.

Synopsis

Documentation

data Options Source #

Compiler options

Constructors

Options 

Fields

Instances

Instances details
Show Options Source # 
Instance details

Defined in CompilerOpts

Methods

showsPrec :: Int -> Options -> ShowS

show :: Options -> String

showList :: [Options] -> ShowS

data CppOpts Source #

C preprocessor options

Constructors

CppOpts 

Fields

Instances

Instances details
Show CppOpts Source # 
Instance details

Defined in CompilerOpts

Methods

showsPrec :: Int -> CppOpts -> ShowS

show :: CppOpts -> String

showList :: [CppOpts] -> ShowS

data PrepOpts Source #

Preprocessor options

Constructors

PrepOpts 

Fields

  • ppPreprocess :: Bool

    apply custom preprocessor

  • ppCmd :: String

    preprocessor command

  • ppOpts :: [String]

    preprocessor options

Instances

Instances details
Show PrepOpts Source # 
Instance details

Defined in CompilerOpts

Methods

showsPrec :: Int -> PrepOpts -> ShowS

show :: PrepOpts -> String

showList :: [PrepOpts] -> ShowS

data WarnOpts Source #

Warning options

Constructors

WarnOpts 

Fields

Instances

Instances details
Show WarnOpts Source # 
Instance details

Defined in CompilerOpts

Methods

showsPrec :: Int -> WarnOpts -> ShowS

show :: WarnOpts -> String

showList :: [WarnOpts] -> ShowS

data DebugOpts Source #

Debug options

Constructors

DebugOpts 

Fields

Instances

Instances details
Show DebugOpts Source # 
Instance details

Defined in CompilerOpts

Methods

showsPrec :: Int -> DebugOpts -> ShowS

show :: DebugOpts -> String

showList :: [DebugOpts] -> ShowS

data CaseMode Source #

Instances

Instances details
Eq CaseMode Source # 
Instance details

Defined in CompilerOpts

Methods

(==) :: CaseMode -> CaseMode -> Bool

(/=) :: CaseMode -> CaseMode -> Bool

Show CaseMode Source # 
Instance details

Defined in CompilerOpts

Methods

showsPrec :: Int -> CaseMode -> ShowS

show :: CaseMode -> String

showList :: [CaseMode] -> ShowS

data CymakeMode Source #

Modus operandi of the program

Constructors

ModeHelp

Show help information and exit

ModeVersion

Show version and exit

ModeNumericVersion

Show numeric version, suitable for later processing

ModeMake

Compile with dependencies

Instances

Instances details
Eq CymakeMode Source # 
Instance details

Defined in CompilerOpts

Methods

(==) :: CymakeMode -> CymakeMode -> Bool

(/=) :: CymakeMode -> CymakeMode -> Bool

Show CymakeMode Source # 
Instance details

Defined in CompilerOpts

Methods

showsPrec :: Int -> CymakeMode -> ShowS

show :: CymakeMode -> String

showList :: [CymakeMode] -> ShowS

data Verbosity Source #

Verbosity level

Constructors

VerbQuiet

be quiet

VerbStatus

show status of compilation

Instances

Instances details
Eq Verbosity Source # 
Instance details

Defined in CompilerOpts

Methods

(==) :: Verbosity -> Verbosity -> Bool

(/=) :: Verbosity -> Verbosity -> Bool

Ord Verbosity Source # 
Instance details

Defined in CompilerOpts

Methods

compare :: Verbosity -> Verbosity -> Ordering

(<) :: Verbosity -> Verbosity -> Bool

(<=) :: Verbosity -> Verbosity -> Bool

(>) :: Verbosity -> Verbosity -> Bool

(>=) :: Verbosity -> Verbosity -> Bool

max :: Verbosity -> Verbosity -> Verbosity

min :: Verbosity -> Verbosity -> Verbosity

Show Verbosity Source # 
Instance details

Defined in CompilerOpts

Methods

showsPrec :: Int -> Verbosity -> ShowS

show :: Verbosity -> String

showList :: [Verbosity] -> ShowS

data TargetType Source #

Type of the target file

Constructors

Tokens

Source code tokens

Comments

Source code comments

Parsed

Parsed source code

FlatCurry

FlatCurry

TypedFlatCurry

Typed FlatCurry

TypeAnnotatedFlatCurry

Type-annotated FlatCurry

AbstractCurry

AbstractCurry

UntypedAbstractCurry

Untyped AbstractCurry

Html

HTML documentation

AST

Abstract-Syntax-Tree after checks

ShortAST

Abstract-Syntax-Tree with shortened decls

Instances

Instances details
Eq TargetType Source # 
Instance details

Defined in CompilerOpts

Methods

(==) :: TargetType -> TargetType -> Bool

(/=) :: TargetType -> TargetType -> Bool

Show TargetType Source # 
Instance details

Defined in CompilerOpts

Methods

showsPrec :: Int -> TargetType -> ShowS

show :: TargetType -> String

showList :: [TargetType] -> ShowS

data WarnFlag Source #

Warnings flags

Constructors

WarnMultipleImports

Warn for multiple imports

WarnDisjoinedRules

Warn for disjoined function rules

WarnUnusedGlobalBindings

Warn for unused global bindings

WarnUnusedBindings

Warn for unused local bindings

WarnNameShadowing

Warn for name shadowing

WarnOverlapping

Warn for overlapping rules/alternatives

WarnIncompletePatterns

Warn for incomplete pattern matching

WarnMissingSignatures

Warn for missing type signatures

WarnMissingMethods

Warn for missing method implementations

WarnOrphanInstances

Warn for orphan instances

WarnIrregularCaseMode 

Instances

Instances details
Bounded WarnFlag Source # 
Instance details

Defined in CompilerOpts

Enum WarnFlag Source # 
Instance details

Defined in CompilerOpts

Eq WarnFlag Source # 
Instance details

Defined in CompilerOpts

Methods

(==) :: WarnFlag -> WarnFlag -> Bool

(/=) :: WarnFlag -> WarnFlag -> Bool

Show WarnFlag Source # 
Instance details

Defined in CompilerOpts

Methods

showsPrec :: Int -> WarnFlag -> ShowS

show :: WarnFlag -> String

showList :: [WarnFlag] -> ShowS

data KnownExtension Source #

Known language extensions of Curry.

Constructors

AnonFreeVars

anonymous free variables

CPP

C preprocessor

FunctionalPatterns

functional patterns

NegativeLiterals

negative literals

NoImplicitPrelude

no implicit import of the prelude

data DumpLevel Source #

Dump level

Constructors

DumpCondCompiled

dump source code after conditional compiling

DumpParsed

dump source code after parsing

DumpExtensionChecked

dump source code after extension checking

DumpTypeSyntaxChecked

dump source code after type syntax checking

DumpKindChecked

dump source code after kind checking

DumpSyntaxChecked

dump source code after syntax checking

DumpPrecChecked

dump source code after precedence checking

DumpDeriveChecked

dump source code after derive checking

DumpInstanceChecked

dump source code after instance checking

DumpTypeChecked

dump source code after type checking

DumpExportChecked

dump source code after export checking

DumpQualified

dump source code after qualification

DumpDerived

dump source code after deriving

DumpDesugared

dump source code after desugaring

DumpDictionaries

dump source code after dictionary transformation

DumpNewtypes

dump source code after removing newtype constructors

DumpSimplified

dump source code after simplification

DumpLifted

dump source code after lambda-lifting

DumpTranslated

dump IL code after translation

DumpCaseCompleted

dump IL code after case completion

DumpTypedFlatCurry

dump typed FlatCurry code

DumpFlatCurry

dump FlatCurry code

Instances

Instances details
Bounded DumpLevel Source # 
Instance details

Defined in CompilerOpts

Enum DumpLevel Source # 
Instance details

Defined in CompilerOpts

Eq DumpLevel Source # 
Instance details

Defined in CompilerOpts

Methods

(==) :: DumpLevel -> DumpLevel -> Bool

(/=) :: DumpLevel -> DumpLevel -> Bool

Show DumpLevel Source # 
Instance details

Defined in CompilerOpts

Methods

showsPrec :: Int -> DumpLevel -> ShowS

show :: DumpLevel -> String

showList :: [DumpLevel] -> ShowS

dumpLevel :: [(DumpLevel, String, String)] Source #

Description and flag of dump levels

defaultOptions :: Options Source #

Default compiler options

defaultPrepOpts :: PrepOpts Source #

Default preprocessor options

defaultWarnOpts :: WarnOpts Source #

Default warning options

defaultDebugOpts :: DebugOpts Source #

Default dump options

getCompilerOpts :: IO (String, Options, [String], [String]) Source #

Retrieve the compiler Options

updateOpts :: Options -> [String] -> (Options, [String], [String]) Source #

Update the Options record by the parsed and processed arguments

usage :: String -> String Source #

Print the usage information of the command line tool.