Personal tools

Yhc/Options

From HaskellWiki

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

Latest revision as of 15:32, 30 July 2007

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