packages feed

egison 1.2.2 → 1.2.3

raw patch · 2 files changed

+12/−8 lines, 2 files

Files

Egison.hs view
@@ -16,7 +16,7 @@ import Paths_egison  welcomeMsg :: String-welcomeMsg = "Egison, version 1.2.1 : http://hagi.is.s.u-tokyo.ac.jp/~egi/egison/\nWelcome to Egison Interpreter!\n"+welcomeMsg = "Egison, version 1.2.3 : http://hagi.is.s.u-tokyo.ac.jp/~egi/egison/\nWelcome to Egison Interpreter!\n"  byebyeMsg :: String byebyeMsg = "\nLeaving Egison.\nByebye. See you again! (^^)/\n"@@ -829,7 +829,7 @@ parseDestructInfoExp :: Parser DestructInfoExp parseDestructInfoExp = braces (sepEndBy parseDestructClause spaces) -parseDestructClause :: Parser (String, Expression, [(PrimePat, Expression)])                     +parseDestructClause :: Parser (String, Expression, [(PrimePat, Expression)]) parseDestructClause = brackets (do patCons <- word                                    spaces                                    typExpr <- parseExpression@@ -1582,7 +1582,7 @@          case typVal of            Type tf -> let mObjRef = getValueFromFrame tf ("inductive-match",[]) in                         case mObjRef of-                          Nothing -> throwError (Default "no method in type: var-match")+                          Nothing -> throwError (Default "no method in type: inductive-match")                           Just fnObjRef ->                             do fnObj <- cEval1 fnObjRef                                case fnObj of@@ -1606,14 +1606,18 @@                           Just fnObjRef ->                             do ret <- cApply fnObjRef (pats ++ [tgtObjRef])                                case ret of-                                 (InductiveData "true" []) -> patternMatch ((MState frame atoms):states)-                                 (InductiveData "false" []) -> patternMatch states+                                 (InductiveData "true" []) -> do --liftIO $ putStrLn "egiTest11"+                                                                 patternMatch ((MState frame atoms):states)+                                 (InductiveData "false" []) -> do --liftIO $ putStrLn "egiTest12"+                                                                  patternMatch states                                  _ -> throwError (Default "patternMatch: return value of pred-pattern is not boolean")     Value (NotPat pat) ->        do retFrames <- patternMatch [(MState frame [(MAtom (PClosure bf pat) tgtObjRef typObjRef)])]          case retFrames of-           [] -> patternMatch ((MState frame atoms):states)-           _ -> patternMatch states+           [] -> do --liftIO $ putStrLn "egiTest1"+                    patternMatch ((MState frame atoms):states)+           _ -> do --liftIO $ putStrLn "egiTest2"+                   patternMatch states     Value (AndPat pats) ->       patternMatch ((MState frame ((map (\pat -> (MAtom (PClosure bf pat) tgtObjRef typObjRef)) pats) ++ atoms)):states)     Value (OrPat pats) ->
egison.cabal view
@@ -7,7 +7,7 @@ -- The package version. See the Haskell package versioning policy -- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for -- standards guiding when and how versions should be incremented.-Version:             1.2.2+Version:             1.2.3  -- A short (one-line) description of the package. Synopsis:            An Interpreter for the Programming Language Egison