packages feed

egison 2.1.5 → 2.1.6

raw patch · 3 files changed

+12/−4 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

egison.cabal view
@@ -1,5 +1,5 @@ Name:                egison-Version:             2.1.5+Version:             2.1.6 Synopsis:            An Interpreter for the Programming Language Egison Description:         An interpreter for the programming language Egison.                      A feature of Egison is the strong pattern match facility.
hs-src/Compiler/egisonc.hs view
@@ -7,7 +7,7 @@ import System.Console.GetOpt import System.FilePath (dropExtension) import System.Environment-import System.Directory (copyFile)+import System.Directory (copyFile, removeFile) import System.Exit (ExitCode (..), exitWith, exitFailure) import System.IO import Paths_egison@@ -82,6 +82,11 @@    Just errMsg -> putStrLn errMsg    _ -> compileHaskellFile outExec +replaceTabToSpace :: String -> String+replaceTabToSpace [] = []+replaceTabToSpace ('\t':cs) = ' ':(replaceTabToSpace cs)+replaceTabToSpace (c:cs) = c:(replaceTabToSpace cs)+ createHaskellFile :: String -> String -> IOThrowsError () createHaskellFile inFile outExec = do   templatePath <- liftIO $ getDataFileName templateFile@@ -90,7 +95,7 @@   let pLines = lines egisonProgram   liftIO $ appendFile "./_tmp.hs" "\nprogram :: String\n"   liftIO $ appendFile "./_tmp.hs" "program = "-  liftIO $ mapM_ (appendFile "./_tmp.hs") $ map (\pLine -> "  \"" ++ escapeDoubleQuote pLine ++ "\\n\" ++\n") pLines+  liftIO $ mapM_ (appendFile "./_tmp.hs") $ map (\pLine -> "  \"" ++ escapeDoubleQuote (replaceTabToSpace pLine) ++ "\\n\" ++\n") pLines   liftIO $ appendFile "./_tmp.hs" "  \"\"\n"   return () @@ -106,4 +111,7 @@   let ghc = "ghc" --  compileStatus <- system $ ghc ++ " " ++ " -cpp --make -package ghc -fglasgow-exts -o " ++ filename ++ " _tmp.hs"   _ <- system $ ghc ++ " -o " ++ filename ++ " _tmp.hs"+  removeFile "./_tmp.hs"+  removeFile "./_tmp.hi"+  removeFile "./_tmp.o"   return ()
hs-src/Language/Egison/Parser.hs view
@@ -475,7 +475,7 @@  -- |Parse an expression from a string of text readExpr :: String -> ThrowsError EgisonExpr-readExpr = readOrThrow parseExpr+readExpr = readOrThrow (whiteSpace >> parseExpr)  -- |Parse many top expressions from a string of text readTopExprList :: String -> ThrowsError [TopExpr]