Changeset 5444 for src/Pugs/Help.hs
- Timestamp:
- 07/11/05 21:48:20 (3 years ago)
- svk:copy_cache_prev:
- 7349
- Files:
-
- 1 modified
-
src/Pugs/Help.hs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Help.hs
r4811 r5444 10 10 -} 11 11 12 #define PUGS_VERSION "6"13 #define PUGS_DATE ""14 12 #include "pugs_config.h" 15 #include "pugs_version.h"16 13 17 14 module Pugs.Help (printInteractiveHelp, printCommandLineHelp, 18 15 banner, versnum, version, revnum, 19 16 copyright, disclaimer, intro) where 17 import Pugs.Version 18 import Pugs.CodeGen (backends) 20 19 21 20 printInteractiveHelp :: IO () … … 43 42 putStrLn "-Bbackend execute using the compiler backend" 44 43 putStrLn "-Cbackend compile using the compiler backend" 45 putStrLn " (valid backends are: Pugs, Parrot, PIR, Haskell)"44 putStrLn (" (valid backends are: " ++ backendsStr ++ ")") 46 45 putStrLn "-Mmodule execute 'use module' before executing the program" 47 46 putStrLn "-h or --help give this message" … … 51 50 putStrLn "-l -d and -w are ignored for compatability with Perl 5" 52 51 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) 79 55 80 56 versionFill :: Int -> String
