coquina: Yet another shell monad.

[ bsd3, library, program, shell ] [ Propose Tags ]

A simple monad for shelling out from Haskell programs.


[Skip to Readme]
Versions [RSS] [faq] 0.1.0.0
Change log CHANGELOG.md
Dependencies async (>=2.2.2 && <2.3), base (>=4.12.0 && <4.15), bytestring (>=0.10.8 && <0.11), containers (>=0.6.0 && <0.7), coquina, deepseq (>=1.4.4 && <1.5), directory (>=1.3.3 && <1.4), exceptions (>=0.10.3 && <0.11), filepath (>=1.4.2 && <1.5), monad-logger (==0.3.*), mtl (>=2.2.2 && <2.3), process (>=1.6.5 && <1.7), stm (>=2.5.0 && <2.6), temporary (==1.3.*), text (>=1.2.3 && <1.3), transformers (==0.5.*) [details]
License BSD-3-Clause
Copyright 2020 Obsidian Systems LLC
Author Obsidian Systems LLC
Maintainer maintainer@obsidian.systems
Category shell
Bug tracker https://github.com/obsidiansystems/coquina/issues
Source repo head: git clone git://github.com/obsidiansystems/coquina.git
Uploaded by abrar at 2020-12-30T03:36:48Z
Distributions NixOS:0.1.0.0
Executables readme
Downloads 77 total (1 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs uploaded by user
Build status unknown [no reports yet]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Candidates


Readme for coquina-0.1.0.0

[back to package description]

coquina

Haskell Hackage Hackage CI Github CI BSD3 License

coquina /kōˈkēnə/

  1. a soft limestone of broken shells, used in road-making in the Caribbean and Florida.
  2. an easy-to-use library for running shell commands from haskell.
import Control.Monad
import Coquina
import System.Process (shell, proc)
import qualified Data.Text as T

main :: IO ()
main = do
  (exitCode, out, err) <- execShell $ do
    (contents, ()) <- readStdout $ run $ shell "ls"
    mapM_ (run . proc "file" . (:[])) $ take 10 $ lines $ T.unpack contents
  putStrLn $ unlines
    [ "Exit code: " ++ show exitCode
    , "stdout: " ++ T.unpack out
    , "stderr: " ++ T.unpack err
    ]