egison 3.2.0 → 3.2.1
raw patch · 2 files changed
+15/−4 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- egison.cabal +1/−1
- hs-src/Interpreter/egisoni.hs +14/−3
egison.cabal view
@@ -1,5 +1,5 @@ Name: egison-Version: 3.2.0+Version: 3.2.1 Synopsis: The world's first language with non-linear pattern-matching against unfree data Description: An interpreter for Egison, the world's first programming langugage which realized non-linear pattern-matching with unfree data types. With Egison, you can represent pattern-matching with unfree data types intuitively,
hs-src/Interpreter/egisoni.hs view
@@ -28,13 +28,19 @@ case nonOpts of [] -> when bannerFlag showBanner >> repl env prompt >> when bannerFlag showByebyeMessage (file:args) -> do- result <- evalEgisonTopExprs env [LoadFile file, Execute args]- either print (const $ return ()) result+ case opts of+ Options {optLoadOnly = True} -> do+ result <- evalEgisonTopExprs env [LoadFile file]+ either print (const $ return ()) result+ Options {optLoadOnly = False} -> do+ result <- evalEgisonTopExprs env [LoadFile file, Execute args]+ either print (const $ return ()) result data Options = Options { optShowVersion :: Bool, optShowHelp :: Bool, optShowBanner :: Bool,+ optLoadOnly :: Bool, optPrompt :: String } @@ -43,6 +49,7 @@ optShowVersion = False, optShowHelp = False, optShowBanner = True,+ optLoadOnly = False, optPrompt = "> " } @@ -57,6 +64,9 @@ Option [] ["no-banner"] (NoArg (\opts -> opts {optShowBanner = False})) "show usage information",+ Option ['l'] ["load"]+ (NoArg (\opts -> opts {optLoadOnly = True}))+ "show usage information", Option ['p'] ["prompt"] (ReqArg (\prompt opts -> opts {optPrompt = prompt}) "String")@@ -71,6 +81,7 @@ putStrLn " --help Display this information" putStrLn " --version Display egison version information" putStrLn " --no-banner Don't show banner"+ putStrLn " --load Don't execute main function" putStrLn " --prompt string Set prompt of the interpreter" putStrLn "" exitWith ExitSuccess@@ -82,7 +93,7 @@ showBanner :: IO () showBanner = do- putStrLn $ "Egison Version " ++ showVersion version ++ " (C) 2011-2013 Satoshi Egi"+ putStrLn $ "Egison Version " ++ showVersion version ++ " (C) 2011-2014 Satoshi Egi" putStrLn $ "http://www.egison.org" putStrLn $ "Welcome to Egison Interpreter!"