Changeset 5444 for src/Pugs/Help.hs

Show
Ignore:
Timestamp:
07/11/05 21:48:20 (3 years ago)
Author:
bsmith
svk:copy_cache_prev:
7349
Message:

* Moved version variables from Pugs.Help to Pugs.Version.
* Pugs.Help now import Pugs.CodeGen? so that it can produce a correct list of
backends in the -h message.
* Fixed script/pugscc to use the Ghc backend rather than the Haskell backend
for --haskell and --ghc.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Help.hs

    r4811 r5444  
    1010-} 
    1111 
    12 #define PUGS_VERSION "6" 
    13 #define PUGS_DATE "" 
    1412#include "pugs_config.h" 
    15 #include "pugs_version.h" 
    1613 
    1714module Pugs.Help (printInteractiveHelp, printCommandLineHelp, 
    1815             banner, versnum, version, revnum, 
    1916             copyright, disclaimer, intro) where 
     17import Pugs.Version 
     18import Pugs.CodeGen (backends) 
    2019 
    2120printInteractiveHelp :: IO () 
     
    4342        putStrLn "-Bbackend        execute using the compiler backend" 
    4443        putStrLn "-Cbackend        compile using the compiler backend" 
    45         putStrLn "                 (valid backends are: Pugs, Parrot, PIR, Haskell)" 
     44        putStrLn ("                 (valid backends are: " ++ backendsStr ++ ")") 
    4645        putStrLn "-Mmodule         execute 'use module' before executing the program" 
    4746        putStrLn "-h or --help     give this message" 
     
    5150        putStrLn "-l -d and -w are ignored for compatability with Perl 5" 
    5251        putStrLn "See documentation of pugs::run for more help." 
    53  
    54 name :: String 
    55 name       = "Perl6 User's Golfing System" 
    56 versnum :: String 
    57 versnum    = PUGS_VERSION 
    58 date :: String 
    59 date       = PUGS_DATE 
    60 version :: String 
    61 version    = name ++ ", version " ++ versnum ++ ", " ++ date ++ revision 
    62 copyright :: String 
    63 copyright  = "Copyright 2005 by Autrijus Tang" 
    64 revnum :: String 
    65 revnum     = show(PUGS_SVN_REVISION :: Integer) 
    66 revision :: String 
    67 revision 
    68     | rev <- revnum 
    69     , rev /= "0" 
    70     = " (r" ++ rev ++ ")" 
    71     | otherwise 
    72     = "" 
    73 disclaimer :: String 
    74 disclaimer = 
    75     "This software is distributed under the terms of the " ++ 
    76     "GNU Public Licence.\n" ++ 
    77     "NO WARRANTY WHATSOEVER IS PROVIDED. " ++ 
    78     "See the details in the documentation." 
     52    where 
     53    backendsStr = foldr1 addComma backends 
     54    addComma w s = w ++ (',':' ':s) 
    7955 
    8056versionFill :: Int -> String