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.
-
Reify a recursive data structure into an explicit graph. 'data-reify' provided the ability to turn recursive structures into explicit graphs. Many (implicitly or explicitly) recursive data structure can be given this ability, via a type class instance. This gives an alternative to using Ref for observable sharing. Observable sharing in general is unsafe, so we use the IO monad to bound this effect, but can be used safely even with unsafePerformIO if some simple conditions are met. Typically this package will be used to tie the knot with DSL's that depend of observable sharing, like Lava. Providing an instance for MuRef is the mechanism for allowing a structure to be reified into a graph, and several examples of this are provided. © 2009 Andy Gill; BSD3 license.
-
Decidable propositions. This package provides a Dec type.
type Neg a = a -> Void data Dec a = Yes a | No (Neg a)
-
A library for unit-testing concurrent programs. [Déjà Fu is] A martial art in which the user's limbs move in time as well as space, […] It is best described as "the feeling that you have been kicked in the head this way before" -- Terry Pratchett, Thief of Time This package builds on the concurrency package by enabling you to deterministically test your concurrent programs. See the website or README for more.
-
Double-ended queues Strict and lazy implementations of Double-Ended Queue (aka Dequeue or Deque) based on head-tail linked list.
-
Type driven generic aeson instance customisation This package provides a newtype wrapper with FromJSON/ToJSON instances customisable via a phantom type parameter. The instances can be rendered to the original type using DerivingVia.
-
Type, render and parse the df1 hierarchical structured log format Type, render and parse logs in df1 format, a hierarchical structured log format that is easy for humans and fast for computers.
-
Cairo backend for diagrams drawing EDSL A full-featured backend for rendering diagrams using the cairo rendering engine. This ultimately depends on a C library, via Haskell's FFI, and can be difficult to install on some platforms. If you are just looking for a quick way to visualize diagrams, try the diagrams-svg backend; if you want raster output like PNG, try the diagrams-rasterific backend; if you want to embed diagrams in LaTeX documents, try diagrams-pgf.
- Diagrams.Backend.Cairo.CmdLine - if you're just getting started with diagrams, begin here.
- Diagrams.Backend.Cairo - look at this next. The general API for the cairo backend.
- Diagrams.Backend.Cairo.Internal - the implementation guts of the cairo backend. Users should normally not need to import this module.
- Diagrams.Backend.Cairo.List - render diagrams to two-dimensional lists of colors (i.e. pixels).
- Diagrams.Backend.Cairo.Ptr - render diagrams to buffers in memory.
-
Rasterific backend for diagrams. A full-featured backend for rendering diagrams using the Rasterific rendering engine.
-
Pure Haskell solver routines used by diagrams Pure Haskell solver routines used by the diagrams project. Currently includes finding real roots of low-degree (n < 5) polynomials, and solving tridiagonal and cyclic tridiagonal linear systems.
-
A simple directory-like tree datatype, with useful IO functions A simple directory-like tree datatype, with useful IO functions and Foldable and Traversable instance Provides a simple data structure mirroring a directory tree on the filesystem, as well as useful functions for reading and writing file and directory structures in the IO monad. Importing the library and optional (useful) Foldable and Traverable libraries:
import System.Directory.Tree import qualified Data.Foldable as F import qualified Data.Traversable as T
Write a hand-made directory tree of textfiles (strings) to the disk. Simulates creating a new user Tux's home directory on a unix machine:writeDirectory$ "/home" :/ Dir "Tux" [File "README" "Welcome!"]
"read" a directory by opening all the files at a filepath with readFile, returning an 'AnchoredDirTree String' (d2). Then check for any IO failures:do (base :/ d2) <- readDirectory "../parent_dir/dir2/" let failed = anyFailed d2 if failed then ...
Use Foldable instance function to concat a directory dir of text files into a single file under the same directory:do (b :/ dt) <- readDirectory dir let f = F.concat dt return$ b :/ File "ALL_TEXT" f
Open all the files in the current directory as lazy bytestrings, ignoring the base path in Anchored wrapper:import qualified Data.ByteString.Lazy as B do (_ :/ dTree) <- readDirectoryWith B.readFile "./"
This version also offers an experimental function readDirectoryWithL that does lazy directory IO, allowing you to treat the returned DirTree as if it were a normal lazily-generated data structure. For example, the following does only the amount of IO necessary to list the file names of the children of the root directory, similar to "ls /":do d <- readDirectoryWithL readFile "/" mapM_ (putStrLn . name) $ contents $ free d
Any ideas or suggestions for improvements are most welcome :-) CHANGES: from 0.11- export System.Directory.Tree.transformDir as requested
- add test suite to cabal file
- remove redundant removeNonexistent (thanks to dmwit for patch)