shell-monad

shell monad

Latest on Hackage:0.6.4

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD3 licensed by Joey Hess
Maintained by Joey Hess

This is a shell monad, for generating shell scripts.

Changes

shell-monad (0.6.4) unstable; urgency=medium

* Fix build with ghc 7.10.

-- Joey Hess <id@joeyh.name> Fri, 12 Jun 2015 14:09:16 -0400

shell-monad (0.6.3) unstable; urgency=medium

* Add Applicative instance for Script. (Thanks, Abhinav Gupta)
* Add IsString instance for Quoted Text. (Thanks, Abhinav Gupta)
* Add newVarFrom. (Thanks, Abhinav Gupta)
* Fixed "test (foo)" to generate shell code "test ( foo )", where
before it had generated the invalid shell code "test (foo)".
(Thanks, Ville)

-- Joey Hess <id@joeyh.name> Sat, 14 Mar 2015 13:38:13 -0400

shell-monad (0.6.2) unstable; urgency=medium

* Avoid using $_ as this doesn't work in bash.

-- Joey Hess <id@joeyh.name> Fri, 09 Jan 2015 23:08:21 -0400

shell-monad (0.6.1) unstable; urgency=medium

* Always render comments using : , not #
This ensures that some oddball constuctions, eg making a pipe
to a comment, always generate valid shell code.

-- Joey Hess <id@joeyh.name> Tue, 06 Jan 2015 19:13:58 -0400

shell-monad (0.6.0) unstable; urgency=medium

* Added a nice interface to the test command. Test is a GADT,
which allows constraining numeric tests to only accept
Integral Vars.
* Fix bug in lengthVar.
* Fix the variable returned by lengthVar so it can be expanded
inside an arithmetic expression.
* Fixed composition of defaultVar, whenVar, errUnlessVar, and
trimVar.
* The Var data type has been renamed to Term Var.
* There is also a Term Static, for static values from haskell.
* Instead of Val x, use static x.
* Implemented a Num instance for Arith, so now Arith can be built
up from regular haskell expressions, for example:
val x * (100 + val y)

-- Joey Hess <id@joeyh.name> Sun, 28 Dec 2014 20:14:47 -0400

shell-monad (0.5.0) unstable; urgency=medium

* newVarContaining is generalized to work for all showable data types.

-- Joey Hess <id@joeyh.name> Sat, 27 Dec 2014 17:10:23 -0400

shell-monad (0.4.0) unstable; urgency=medium

* Var now has a phantom type. This allows the haskell type checker
to type check untyped shell variables!
* added Arith
* Really fix stopOnFailure. Strings. So easy to typo three times.

-- Joey Hess <id@joeyh.name> Sat, 27 Dec 2014 10:38:13 -0400

shell-monad (0.3.1) unstable; urgency=medium

* Fixed linear rendering of caseOf

-- Joey Hess <id@joeyh.name> Fri, 26 Dec 2014 23:49:38 -0400

shell-monad (0.3.0) unstable; urgency=medium

* Renamed a few operators.
* Added defaultVar, whenVar, lengthVar, and trimVar.
* Due to changes in how variable expansion is handled, the val function
has been removed, and WithVar should be used instead.
* newVar now ensures that the variable starts out empty.
* Added caseOf
* Fix bug in stopOnFailure.

-- Joey Hess <id@joeyh.name> Fri, 26 Dec 2014 22:58:56 -0400

shell-monad (0.2.1) unstable; urgency=medium

* Simple support for globs.
* Fixed propigation of the outer monad's state into Output,
which fixes a bug in the unusual case where variables or funtions
are defined inside Output.
* Support redirection, including redirection from here-documents.
* Here documents are emulated in linearScript output mode.
* cmd is now polymorhpic on its first argument, allowing
the command to run to be specified using String, Var, or even
Output.

-- Joey Hess <id@joeyh.name> Fri, 26 Dec 2014 15:20:53 -0400

shell-monad (0.2.0) unstable; urgency=medium

* newVar, newVarContaining, takeParameter, and func all
now take a namehint parameter, which can be () or (NameHinted "foo").
* Added -&&- and -||-

-- Joey Hess <id@joeyh.name> Thu, 25 Dec 2014 20:19:35 -0400

shell-monad (0.1.0) unstable; urgency=medium

* Added positionalParameters and takeParameter.
* Shell functions can be called with parameters.
* String is now an instance of CmdArg

-- Joey Hess <id@joeyh.name> Thu, 25 Dec 2014 13:04:35 -0400

shell-monad (0.0.3) unstable; urgency=medium

* Added Output data type, which alows cmd to accept (Output (Script ()))
as a parameter.
* Better Quoted data type.

-- Joey Hess <id@joeyh.name> Thu, 25 Dec 2014 12:07:04 -0400

shell-monad (0.0.2) unstable; urgency=medium

* Better constructing of pipes.
* Added whileCmd, ifCmd, whenCmd, and unlessCmd.
* Added stopOnFailure and ignoreFailure.

-- Joey Hess <id@joeyh.name> Thu, 25 Dec 2014 01:11:34 -0400

shell-monad (0.0.1) unstable; urgency=medium

* First release.

-- Joey Hess <id@joeyh.name> Wed, 24 Dec 2014 19:23:44 -0400
Depends on:
Used by 1 package:
comments powered byDisqus