{-# OPTIONS -cpp #-} {- Online help and banner text. But if of ships I now should sing, what ship would come to me, What ship would bear me ever back across so wide a Sea? -} module Help (printHelp, banner, version, copyright, disclaimer) where printHelp :: IO () printHelp = do putStrLn "Commands available from the prompt:" putStrLn ":h = show this help message" putStrLn ":q = quit" putStrLn ". = show the syntax tree of an expression" putStrLn "? = evaluate an expression in small steps" putStrLn " = evaluate an expression" {- putStrLn ":l = load a pugs file (need quotes around the name)" putStrLn ":r = reload the current file" -} name = "Perl6 User's Golfing System" versnum = "6.0.0" date = "04 Feb 2005" version = name ++ ", version " ++ versnum ++ ", " ++ date copyright = "Copyright (c) 2005 by Autrijus Tang" disclaimer = "This software is distributed under the terms of the " ++ "GNU Public Licence.\n" ++ "NO WARRANTY WHATSOEVER IS PROVIDED. " ++ "See the details in the documentation." versionFill n = fill ++ vstr where fill = replicate (n - vlen) ' ' vlen = length vstr vstr = "Version: " ++ versnum banner = putStrLn $ unlines [ ".=====. __ __ ____ ___ _________________________________________" , "|| || || || || || ||__' Pugs 6: Based on the Perl 6 Synopses " , "||====' ||__|| ||__|| __|| Copyright (c) 2005 Autrijus Tang " , "|| `====' ___|| `===' World Wide Web: http://autrijus.org/pugs " , "|| `====' Report bugs to: autrijus@autrijus.org " , "==" ++ versionFill 27 ++ " =========================================" , "" , "Welcome to Pugs -- Perl6 User's Golfing System" , "Type :h for help" ]