packages feed

zeolite-lang 0.1.0.0 → 0.1.1.0

raw patch · 9 files changed

+19/−11 lines, 9 files

Files

ChangeLog.md view
@@ -1,5 +1,12 @@ # Revision history for zeolite +## 0.1.1.0  -- 2020-04-27++* **[behavior]** Set the default output path for binaries to the module's path+  rather than the current directory.++* **[new]** Allows a base path (`-p`) with recompile mode (`-r`).+ ## 0.1.0.0  -- 2020-04-27  * First version. Released on an unsuspecting world.
bin/unit-tests.hs view
@@ -30,7 +30,7 @@   main = runAllTests $ concat [-    labelWith "DefinedCategoryTest"      DefinedCategoryTest.tests,+    labelWith "DefinedCategoryTest" DefinedCategoryTest.tests,     labelWith "TypeInstanceTest"    TypeInstanceTest.tests,     labelWith "ParserTest"          ParserTest.tests,     labelWith "TypeCategoryTest"    TypeCategoryTest.tests,
example/hello/README.md view
@@ -10,5 +10,5 @@ zeolite -i lib/util -p "$ZEOLITE_PATH" -m HelloDemo example/hello  # Execute the compiled binary.-./HelloDemo+$ZEOLITE_PATH/HelloDemo ```
example/regex/README.md view
@@ -16,5 +16,5 @@ zeolite -p "$ZEOLITE_PATH" -t example/regex  # Execute the compiled binary.-./RegexDemo+$ZEOLITE_PATH/RegexDemo ```
example/tree/README.md view
@@ -16,5 +16,5 @@ zeolite -p "$ZEOLITE_PATH" -t example/tree  # Execute the compiled binary.-./TreeDemo+$ZEOLITE_PATH/TreeDemo ```
src/Cli/Compiler.hs view
@@ -347,8 +347,11 @@       cs <- fmap concat $ collectAllOrErrorM $ map parsePublicSource fs       includeNewTypes tm cs     mergeInternal ds = (concat $ map fst ds,concat $ map snd ds)-    getBinaryName (CompileBinary n _) = canonicalizePath $ if null o then n else o-    getBinaryName _                   = return ""+    getBinaryName (CompileBinary n _)+      | null o              = canonicalizePath $ p </> head ds </> n+      | o == takeFileName o = canonicalizePath $ p </> head ds </> o+      | otherwise           = canonicalizePath o+    getBinaryName _ = return ""     createBinary b r deps ma@(CompileBinary n _) ms       | length ms > 1 = do         hPutStrLn stderr $ "Multiple matches for main category " ++ n ++ "."@@ -358,7 +361,6 @@         exitFailure       | otherwise = do           f0 <- getBinaryName ma-          let f0 = if null o then n else o           let (CxxOutput _ _ _ ns2 req content) = head ms           -- TODO: Create a helper or a constant or something.           (o',h) <- mkstemps "/tmp/zmain_" ".cpp"
src/Cli/ParseCompileOptions.hs view
@@ -207,8 +207,6 @@   | (not $ null $ es ++ ep) && (isCreateTemplates m) =     compileError "Extra files (-e) are not allowed in template mode (--templates)." -  | (not $ null p) && (isCompileRecompile m) =-    compileError "Path prefix (-p) is not allowed in recompile mode (-r)."   | (not $ null o) && (isCompileRecompile m) =     compileError "Output filename (-o) is not allowed in recompile mode (-r)."   | (not $ null $ is ++ is2) && (isCompileRecompile m) =
tests/multiple-defs/README.md view
@@ -7,7 +7,8 @@ To compile:  ```shell-../../zeolite -r .+ZEOLITE_PATH=$(zeolite --get-path)+zeolite -r $ZEOLITE_PATH/tests/multiple-defs ```  The compiler error should look something like this:
zeolite-lang.cabal view
@@ -1,5 +1,5 @@ name:                zeolite-lang-version:             0.1.0.0+version:             0.1.1.0 synopsis:            Zeolite is a statically-typed, general-purpose programming language.  description: