packages feed

hslua-module-system 1.0.0 → 1.0.1

raw patch · 6 files changed

+71/−64 lines, 6 filesdep ~hslua-coredep ~hslua-marshallingdep ~hslua-packagingPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: hslua-core, hslua-marshalling, hslua-packaging, text

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,56 +1,78 @@-# Revision history for hslua-module-system+# Changelog -## 1.0.0+`hslua-module-system` uses [PVP Versioning][]. -Release pending.+## hslua-module-system-1.0.1 -- Use hslua 2.0.+Released 29-01-2022. -## 0.2.2.1 -- 2020-10-16+-   Relaxed upper bound of hslua-core, hslua-marshalling, and+    hslua-packaging, allowing their respective version 2.1. -- Relaxed upper bound for hslua, allow `hslua-1.3.*`.+## hslua-module-system-1.0.0 -## 0.2.2 -- 2020-08-15+Released 2021-10-21. -- Relaxed upper bound for hslua, allow `hslua-1.2.*`.-- Improved documentation of internal types.-- Use tasty-lua for unit tests.-- Update CI to test with all GHC versions.+-   Use hslua 2.0. -## 0.2.1 -- 2019-05-04+## hslua-module-system-0.2.2.1 -- Use module helpers made available with HsLua 1.0.3. This avoids-  code duplication when used with other hslua modules.+Released 2020-10-16. -## 0.2.0 -- 2019-05-01+-   Relaxed upper bound for hslua, allow `hslua-1.3.*`. +## hslua-module-system-0.2.2++Released 2020-08-15.++-   Relaxed upper bound for hslua, allow `hslua-1.2.*`.+-   Improved documentation of internal types.+-   Use tasty-lua for unit tests.+-   Update CI to test with all GHC versions.++## hslua-module-system-0.2.1++Released 2019-05-04.++-   Use module helpers made available with HsLua 1.0.3. This+    avoids code duplication when used with other hslua modules.++## hslua-module-system-0.2.0++Released 2019-05-01.+ All fields and functions are now exported from the Haskell module under the same name as that used in Lua.  ### New fields -- `arch`: processor architecture.-- `compiler_name`: Haskell compiler that was used to compile the module.-- `compiler_version`: version of the compiler.-- `os`: operating system.+-   `arch`: processor architecture.+-   `compiler_name`: Haskell compiler that was used to compile the+    module.+-   `compiler_version`: version of the compiler.+-   `os`: operating system.  ### New functions -- `mkdir`: create a new directory.-- `rmdir`: remove a directory.-- `with_env`: perform action with custom environment.-- `with_wd`: perform action in another directory.+-   `mkdir`: create a new directory.+-   `rmdir`: remove a directory.+-   `with_env`: perform action with custom environment.+-   `with_wd`: perform action in another directory.  ### Removed or renamed functions -- `currentdir` was renamed to `getwd`.-- `chdir` was renamed to `setwd`.-- `pwd` was removed.+-   `currentdir` was renamed to `getwd`.+-   `chdir` was renamed to `setwd`.+-   `pwd` was removed.  ### Misc -- Fix typos and copy-paste errors in docs, tests.+-   Fix typos and copy-paste errors in docs, tests. -## 0.1.0 -- 2019-04-26+## hslua-module-system-0.1.0 -- First version. Released on an unsuspecting world.+Released 2019-04-26.++-   First version. Released on an unsuspecting world.++  [PVP Versioning]: https://pvp.haskell.org
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2019-2021 Albert Krewinkel+Copyright (c) 2019-2022 Albert Krewinkel  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
hslua-module-system.cabal view
@@ -1,6 +1,6 @@ cabal-version:       2.2 name:                hslua-module-system-version:             1.0.0+version:             1.0.1 synopsis:            Lua module wrapper around Haskell's System module.  description:         Provides access to system information and@@ -15,7 +15,7 @@ license-file:        LICENSE author:              Albert Krewinkel maintainer:          albert+hslua@zeitkraut.de-copyright:           © 2019-2021 Albert Krewinkel <albert+hslua@zeitkraut.de>+copyright:           © 2019-2022 Albert Krewinkel <albert+hslua@zeitkraut.de> category:            Foreign extra-source-files:  CHANGELOG.md                    , test/test-system.lua@@ -24,8 +24,9 @@                    , GHC == 8.4.4                    , GHC == 8.6.5                    , GHC == 8.8.3-                   , GHC == 8.10.4+                   , GHC == 8.10.7                    , GHC == 9.0.1+                   , GHC == 9.2.1  source-repository head   type:              git@@ -35,9 +36,9 @@ common common-options   default-language:    Haskell2010   build-depends:       base                 >= 4.8    && < 5-                     , hslua-core           >= 2.0    && < 2.1-                     , hslua-packaging      >= 2.0    && < 2.1-                     , text                 >= 1.0    && < 1.3+                     , hslua-core           >= 2.0    && < 2.2+                     , hslua-packaging      >= 2.0    && < 2.2+                     , text                 >= 1.2    && < 2.1   default-extensions:  LambdaCase                      , OverloadedStrings   ghc-options:         -Wall@@ -57,9 +58,8 @@   import:              common-options   build-depends:       directory            >= 1.3    && < 1.4                      , exceptions           >= 0.8    && < 0.11-                     , hslua-marshalling    >= 2.0    && < 2.1+                     , hslua-marshalling    >= 2.0    && < 2.2                      , temporary            >= 1.2    && < 1.4-                     , text                 >= 1.0    && < 1.3   exposed-modules:     HsLua.Module.System   other-modules:       HsLua.Module.SystemUtils   hs-source-dirs:      src
src/HsLua/Module/System.hs view
@@ -1,6 +1,6 @@ {-| Module      : HsLua.Module.System-Copyright   : © 2019-2021 Albert Krewinkel+Copyright   : © 2019-2022 Albert Krewinkel License     : MIT Maintainer  : Albert Krewinkel <albert+hslua@zeitkraut.de> Stability   : alpha@@ -161,9 +161,9 @@ ls :: LuaError e => DocumentedFunction e ls = defun "ls"   ### ioToLua . Directory.listDirectory . fromMaybe "."-  <#> optionalParameter peekFilePath "string" "directory"-        ("Path of the directory whose contents should be listed. "-         `T.append` "Defaults to `.`.")+  <#> opt (stringParam "directory"+           ("Path of the directory whose contents should be listed. "+            `T.append` "Defaults to `.`."))   =#> functionResult (pushList pushString) "table"         ("A table of all entries in `directory`, except for the "           `T.append` "special entries (`.`  and `..`).")@@ -182,10 +182,8 @@          if createParent == Just True          then ioToLua (Directory.createDirectoryIfMissing True fp)          else ioToLua (Directory.createDirectory fp))-  <#> parameter peekFilePath "string" "dirname"-        "name of the new directory"-  <#> optionalParameter peekBool "boolean" "create_parent"-        "create parent directory if necessary"+  <#> filepathParam "dirname" "name of the new directory"+  <#> opt (boolParam "create_parent" "create parent directory if necessary")   =#> []   #? T.concat        [ "Create a new directory which is initially empty, or as near "@@ -207,8 +205,7 @@          then ioToLua (Directory.removeDirectoryRecursive fp)          else ioToLua (Directory.removeDirectory fp))   <#> filepathParam "dirname" "name of the directory to delete"-  <#> optionalParameter peekBool "boolean" "recursive"-        "delete content recursively"+  <#> opt (boolParam "recursive" "delete content recursively")   =#> []   #?("Remove an existing, empty directory. If `recursive` is given, "      `T.append` "then delete the directory and its contents recursively.")@@ -322,7 +319,7 @@          , "parameter is omitted, the system's canonical temporary "          , "directory is used."          ])-  <#> parameter peekString "string" "templ" "Directory name template."+  <#> stringParam "templ" "Directory name template."   <#> parameter peekCallback "function" "callback"         ("Function which takes the name of the temporary directory as "          `T.append` "its first argument.")@@ -344,23 +341,11 @@ -- Parameters -- --- | Retrieves a file path from the stack.-peekFilePath :: Peeker e FilePath-peekFilePath = peekString- -- | Filepath function parameter. filepathParam :: Text  -- ^ name               -> Text  -- ^ description               -> Parameter e FilePath-filepathParam name description = Parameter-  { parameterPeeker = peekFilePath-  , parameterDoc = ParameterDoc-    { parameterName = name-    , parameterType = "string"-    , parameterDescription = description-    , parameterIsOptional = False-    }-  }+filepathParam = stringParam  -- | Result of a function returning a file path. filepathResult :: Text -- ^ Description
src/HsLua/Module/SystemUtils.hs view
@@ -1,6 +1,6 @@ {-| Module      : HsLua.Module.SystemUtils-Copyright   : © 2019-2021 Albert Krewinkel+Copyright   : © 2019-2022 Albert Krewinkel License     : MIT Maintainer  : Albert Krewinkel <albert+hslua@zeitkraut.de> 
test/test-hslua-module-system.hs view
@@ -2,7 +2,7 @@ {-# LANGUAGE TypeApplications  #-} {-| Module      : Main-Copyright   : © 2019-2021 Albert Krewinkel+Copyright   : © 2019-2022 Albert Krewinkel License     : MIT Maintainer  : Albert Krewinkel <albert+hslua@zeitkraut.de> Stability   : alpha