Hoogle Search
Within LTS Haskell 24.34 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
Parse environment variables Here's a simple example of a program that uses envparse's parser:
module Main (main) where import Control.Monad (unless) import Env data Hello = Hello { name :: String, quiet :: Bool } hello :: IO Hello hello = Env.parse (header "envparse example") $ Hello <$> var (str <=< nonempty) "NAME" (help "Target for the greeting") <*> switch "QUIET" (help "Whether to actually print the greeting") main :: IO () main = do Hello {name, quiet} <- hello unless quiet $ putStrLn ("Hello, " ++ name ++ "!")The NAME environment variable is mandatory and contains the name of the person to greet. QUIET, on the other hand, is an optional boolean flag, false by default, that decides whether the greeting should be silent. If the NAME variable is undefined in the environment then running the program will result in the following help text:envparse example Available environment variables: NAME Target for the greeting QUIET Whether to actually print the greeting Parsing errors: NAME is unset
-
An environmentally friendly way to deal with environment variables For package use information see the README.md
-
Maintaining an equivalence relation implemented as union-find using STT. This is an implementation of Tarjan's Union-Find algorithm (Robert E. Tarjan. "Efficiency of a Good But Not Linear Set Union Algorithm", JACM 22(2), 1975) in order to maintain an equivalence relation. This implementation is a port of the union-find package using the ST monad transformer (instead of the IO monad).
-
Composable, hierarchical errors. An Applicative Functor with error accumulation. Built in tree like error type meant for gathering and reporting errors to users.
-
Finding out the full path of the executable. The documentation of "System.Environment.getProgName" says that "However, this is hard-to-impossible to implement on some non-Unix OSes, so instead, for maximum portability, we just return the leafname of the program as invoked." This library tries to provide the missing path. Note: Since base 4.6.0.0, there is also a function "System.Environment.getExecutablePath".
-
Extension of real numbers with positive/negative infinities Extension of real numbers with positive/negative infinities (±∞). It is useful for describing various limiting behaviors in mathematics.
-
A functor, where the "stored" value is isomorphic to Identity A functor, where the "stored" value is isomorphic to Identity
-
Library for producing fake data Please see the README on GitHub at https://github.com/psibi/fakedata#readme
-
Please see the README on GitHub at https://github.com/psibi/fakedata-parser#readme
-
Monad to pull from fake stream-like objects. See https://github.com/igrep/haskell-fakepull#readme.