packages feed

language-qux 0.1.0.1 → 0.1.1.0

raw patch · 4 files changed

+13/−6 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

language-qux.cabal view
@@ -1,5 +1,5 @@ name:           language-qux-version:        0.1.0.1+version:        0.1.1.0  author:         Henry J. Wylde maintainer:     public@hjwylde.com@@ -29,7 +29,8 @@         Language.Qux.Syntax,         Language.Qux.Version     other-modules:-        Language.Qux.Lexer+        Language.Qux.Lexer,+        Paths_language_qux      default-language: Haskell2010     build-depends:
src/Language/Qux/Annotated/TypeChecker.hs view
@@ -39,7 +39,7 @@ import Data.List ((\\), nubBy) import Data.Map (Map, (!)) import qualified Data.Map as Map-import Data.Maybe+import Data.Maybe (fromJust, isNothing)  import Language.Qux.Annotated.Exception import Language.Qux.Annotated.Parser (SourcePos)
src/Language/Qux/Interpreter.hs view
@@ -38,6 +38,7 @@ import Data.List ((\\)) import Data.Map (Map, (!)) import qualified Data.Map as Map+import Data.Maybe (fromJust, isJust)  import Language.Qux.Syntax @@ -114,9 +115,14 @@  evalApplicationExpr :: Id -> [Value] -> Evaluation Value evalApplicationExpr name arguments = do-    (parameters, stmts) <- asks $ (! name) . functions+    maybeValue <- gets $ Map.lookup name -    once (Map.union $ Map.fromList (zip parameters arguments)) (runExecution undefined (execBlock stmts))+    if isJust maybeValue then+        return $ fromJust maybeValue+    else do+        (parameters, stmts) <- asks $ (! name) . functions++        once (Map.union $ Map.fromList (zip parameters arguments)) (runExecution undefined (execBlock stmts))  evalBinaryExpr :: BinaryOp -> Value -> Value -> Evaluation Value evalBinaryExpr Acc (ListValue elements) (IntValue rhs)    = return $ elements !! (fromInteger rhs)
src/Language/Qux/Version.hs view
@@ -30,5 +30,5 @@ minor = 1  -- | The patch component.-patch = 0+patch = 1