Difference between revisions of "Yhc/Options"

From HaskellWiki
< Yhc
Jump to navigation Jump to search
(all -<option> changed to --<option>)
(Deleting page that hasn't been updated for over 10 years)
Line 1: Line 1:
Command syntax:
 
yhc [options] file
 
 
file: Name of the source file to compile, i.e. main.hs
 
options: a list of options
 
--flag turn on an option
 
--noflag turn off an option
 
--flag value pass a value as the flag
 
 
Path Options:
 
-I --includes str Include directories
 
-P --preludes str Prelude directories
 
-d --dst str destination path for generated bytecode files (default=.)
 
-i --hidst str destinated path for generated .hi file (default=.)
 
-w --wrapdst str destination path for generated FFI wrapper (default=.)
 
--hide hide object files (default=off)
 
 
Generation Options:
 
--hat compile with Hat debugging support (default=off)
 
--dotnet Generate .NET IL code (default=off)
 
-W --genwrapper generate FFI wrapper (default=off)
 
--hi-suffix str change the default ".hi" suffix (default=hi)
 
--exportall export all identifiers from a module, despite what the
 
export list says (default=off)
 
 
Action Flags:
 
--viewcore str View Core file (.ycr)
 
-c --compile Compile one file only (default=off)
 
 
Compilation Options:
 
--redefine Don't complain if redefining an imported identifier
 
(default=off)
 
--unix Use unix file names (default=on)
 
--unlit Unliterate the source code (default=off)
 
--cpp Pre-process the file first (default=off)
 
--prelude Keep prelude definitions in interface file (default=off)
 
--lib Compiling a lib, don't complain if importing modules with
 
names that differs from their filename. (default=off)
 
--unifyhack Enable nasty type hack that's needed to make the prelude
 
compile ... (default=off)
 
 
Compliance Options:
 
--underscore Enable H'98 underscore-is-lower-case (default=off)
 
--puns Enable pre-98 named-field puns (default=on)
 
--98 Haskell 98 compliance (default=off)
 
 
Help Options:
 
-v --version Show version information (default=off)
 
-? --help Show all options and useage information (default=off)
 
 
Core Options:
 
--core generate a .ycr binary file (default=off)
 
--showcore show the Core language (default=off)
 
--linkcore generate a linked .yca binary file (default=off)
 
 
Debug Options:
 
--lex show lexical input (default=off)
 
--parse show syntax tree after parser (default=off)
 
--need show need table before import (default=off)
 
--ineed show need table after import (default=off)
 
--irename show rename table after import (default=off)
 
--iineed show need table between all import files (default=off)
 
--iirename show rename table between all imports (default=off)
 
--rename show syntax tree after rename (default=off)
 
--derive show syntax tree after derive (default=off)
 
--remove show syntax tree after fields are removed (translated into
 
selectors) (default=off)
 
--scc show syntax tree after splitting into strongly connected
 
groups (default=off)
 
--type show syntax tree after type check (default=off)
 
--fixsyntax show syntax tree after removing newtype constructors and
 
fixing Class.Type.metod (default=off)
 
--lift show syntax tree after lambda lifting (default=off)
 
--case show stg tree after simplification of patterns
 
(default=off)
 
--prim show stg tree after inserting primitive functions
 
(default=off)
 
--bcodecompile show B code after compile (default=off)
 
--bcodemem show B code after heap usage analysis (default=off)
 
--bcodeflatten show B code after flattening (default=off)
 
--bcoderel show B code after converting to relative jumps
 
(default=off)
 
--keepcase Don't lift case, we fix those later (default=off)
 
--arity show stg tree after arity (default=off)
 
--ibound show symbol table after import (default=off)
 
--iibound show symbol table between all import files (default=off)
 
--rbound show symbol table after rename (default=off)
 
--dbound show symbol table after derive (default=off)
 
--pbound show symbol table after inserting primitive functions
 
(default=off)
 
--ebound show symbol table after extract (default=off)
 
--tbound show symbol table after type check (default=off)
 
--fsbound show symbol table after adding Class.Type.method info
 
(default=off)
 
--lbound show symbol table after lambda lifting (default=off)
 
--cbound show symbol table after simplification of pattern
 
(default=off)
 
--abound show symbol table after only atoms in applications
 
(default=off)
 
--import print name of imported files (default=off)
 
--depend print imported identifiers that are used (not even alpha
 
yet) (default=off)
 
--free show stg tree with explicitly free variables (default=off)
 
--atom show stg tree after only atoms in applications
 
(default=off)
 
--funnames insert position and name of functions in the code
 
(default=off)
 
--ilex show lexical input (default=off)
 
--report-imports show only imports actually used (default=off)
 
--showtype report type of "main" (default=off)
 
--showwidth num set width for showing intermediate program (default=80)
 
--showindent num set indentation for nesting (default=2)
 
--showqualified show qualified ids as far as possible (default=on)
 
 
 
 
Environment variables:
 
 
YHC_BASE_PATH The path to the Yhc compiler base directory
 
PATH The search path is used to find the compiler,
 
if YHC_BASE_PATH is not specified
 

Revision as of 14:34, 6 February 2021