coquina: Yet another shell monad.

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

A simple monad for shelling out from Haskell programs.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.0.1
Change log CHANGELOG.md
Dependencies async (>=2.2.2 && <2.3), base (>=4.12.0 && <4.20), bytestring (>=0.10.8 && <0.13), containers (>=0.6.0 && <0.8), coquina, deepseq (>=1.4.4 && <1.6), directory (>=1.3.3 && <1.4), exceptions (>=0.10.3 && <0.11), filepath (>=1.4.2 && <1.6), monad-logger (>=0.3 && <0.4), mtl (>=2.2.2 && <2.4), process (>=1.6.5 && <1.7), stm (>=2.5.0 && <2.6), temporary (>=1.3 && <1.4), text (>=1.2.3 && <2.2), transformers (>=0.5 && <0.7) [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 2024-01-30T18:39:55Z
Distributions
Executables readme
Downloads 190 total (12 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for coquina-0.1.0.1

[back to package description]

MOVED TO GITHUB

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
    ]