Changeset 4223 for src/gen_prelude.hs

Show
Ignore:
Timestamp:
06/01/05 00:24:55 (4 years ago)
Author:
autrijus
svk:copy_cache_prev:
5801
Message:

* Prelude: renamed both subroutines to "open" as they should be.
* gen_prelude: strip comments

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/gen_prelude.hs

    r4222 r4223  
    1919 
    2020main :: IO () 
     21main = do 
     22    putStr preludeIntro 
     23    str <- getContents 
     24    print . unlines . filter notComment . lines $ str 
     25    where 
     26    notComment ('#':_)      = False 
     27    notComment (' ':cs)     = notComment cs 
     28    notComment ('\t':cs)    = notComment cs 
     29    notComment _            = True 
    2130 
    22 main = do 
    23     putStr "\ 
     31preludeIntro :: String 
     32preludeIntro = "\ 
    2433\{-# OPTIONS -fglasgow-exts #-}\n\ 
    2534\ \n\ 
     
    3847\>   And Gondolin, who now beyond\n\ 
    3948\>   The Western Seas have passed away:\n\ 
    40 \>   The world was fair in Durins day.\n\ 
     49\>   The world was fair in Durin's day.\n\ 
    4150\ \n\ 
    4251\-}\n\ 
     
    4958\preludeStr :: String\n\ 
    5059\preludeStr = " 
    51     getContents >>= putStr . show