Strict -template-haskell

module Control.Monad.ST.Strict
base Control.Monad.ST.Strict
The strict ST monad (re-export of Control.Monad.ST)
module Data.STRef.Strict
base Data.STRef.Strict
Mutable references in the (strict) ST monad (re-export of Data.STRef)
module Control.Monad.RWS.Strict
mtl Control.Monad.RWS.Strict
Strict RWS monad. Inspired by the paper Functional Programming with Overloading and Higher-Order Polymorphism, Mark P Jones (http://web.cecs.pdx.edu/~mpj/) Advanced School of Functional Programming, 1995.
module Control.Monad.State.Strict
mtl Control.Monad.State.Strict
Strict state monads. This module is inspired by the paper Functional Programming with Overloading and Higher-Order Polymorphism, Mark P Jones (http://web.cecs.pdx.edu/~mpj/) Advanced School of Functional Programming, 1995.
module Control.Monad.Trans.RWS.Strict
transformers Control.Monad.Trans.RWS.Strict
A monad transformer that combines ReaderT, WriterT and StateT. This version is strict; for a lazy version, see Control.Monad.Trans.RWS.Lazy, which has the same interface.
module Control.Monad.Trans.State.Strict
transformers Control.Monad.Trans.State.Strict
Strict state monads, passing an updatable state through a computation. See below for examples. In this version, sequencing of computations is strict. For a lazy version, see Control.Monad.Trans.State.Lazy, which has the same interface. Some computations may not require the full power of state transformers: * For a read-only state, see Control.Monad.Trans.Reader. * To accumulate a value without using it on the way, see Control.Monad.Trans.Writer.
module Control.Monad.Trans.Writer.Strict
transformers Control.Monad.Trans.Writer.Strict
The strict WriterT monad transformer, which adds collection of outputs (such as a count or string output) to a given monad. This version builds its output strictly; for a lazy version, see Control.Monad.Trans.Writer.Lazy, which has the same interface. This monad transformer provides only limited access to the output during the computation. For more general access, use Control.Monad.Trans.State instead.
module Control.Monad.Writer.Strict
mtl Control.Monad.Writer.Strict
Strict writer monads. Inspired by the paper Functional Programming with Overloading and Higher-Order Polymorphism, Mark P Jones (http://web.cecs.pdx.edu/~mpj/pubs/springschool.html) Advanced School of Functional Programming, 1995.
module Data.IntMap.Strict
containers Data.IntMap.Strict
An efficient implementation of maps from integer keys to values (dictionaries). API of this module is strict in both the keys and the values. If you need value-lazy maps, use Data.IntMap.Lazy instead. The IntMap type itself is shared between the lazy and strict modules, meaning that the same IntMap value can be passed to functions in both modules (although that is rarely needed). These modules are intended to be imported qualified, to avoid name clashes with Prelude functions, e.g. > import Data.IntMap.Strict (IntMap) > import qualified Data.IntMap.Strict as IntMap The implementation is based on big-endian patricia trees. This data structure performs especially well on binary operations like union and intersection. However, my benchmarks show that it is also (much) faster on insertions and deletions when compared to a generic size-balanced map implementation (see Data.Map). * Chris Okasaki and Andy Gill, "Fast Mergeable Integer Maps", Workshop on ML, September 1998, pages 77-86, http://citeseer.ist.psu.edu/okasaki98fast.html * D.R. Morrison, "/PATRICIA -- Practical Algorithm To Retrieve Information Coded In Alphanumeric/", Journal of the ACM, 15(4), October 1968, pages 514-534. Operation comments contain the operation time complexity in the Big-O notation http://en.wikipedia.org/wiki/Big_O_notation. Many operations have a worst-case complexity of O(min(n,W)). This means that the operation can become linear in the number of elements with a maximum of W -- the number of bits in an Int (32 or 64). Be aware that the Functor, Traversable and Data instances are the same as for the Data.IntMap.Lazy module, so if they are used on strict maps, the resulting maps will be lazy.
module Data.Map.Strict
containers Data.Map.Strict
An efficient implementation of ordered maps from keys to values (dictionaries). API of this module is strict in both the keys and the values. If you need value-lazy maps, use Data.Map.Lazy instead. The Map type is shared between the lazy and strict modules, meaning that the same Map value can be passed to functions in both modules (although that is rarely needed). These modules are intended to be imported qualified, to avoid name clashes with Prelude functions, e.g. > import qualified Data.Map.Strict as Map The implementation of Map is based on size balanced binary trees (or trees of bounded balance) as described by: * Stephen Adams, "Efficient sets: a balancing act", Journal of Functional Programming 3(4):553-562, October 1993, http://www.swiss.ai.mit.edu/~adams/BB/. * J. Nievergelt and E.M. Reingold, "Binary search trees of bounded balance", SIAM journal of computing 2(1), March 1973. Note that the implementation is left-biased -- the elements of a first argument are always preferred to the second, for example in union or insert. Operation comments contain the operation time complexity in the Big-O notation (http://en.wikipedia.org/wiki/Big_O_notation). Be aware that the Functor, Traversable and Data instances are the same as for the Data.Map.Lazy module, so if they are used on strict maps, the resulting maps will be lazy.
module Text.XHtml.Strict
xhtml Text.XHtml.Strict
Produces XHTML 1.0 Strict.
package StrictBench
package
A benchmarking library with a simple purpose: to strictly evaluate a value and report how long it takes. Can be useful to identify the slow part of an algorithm, since Haskell's lazy evaluation can make it hard to see where the bottleneck lies. Version 0.1.1
package strict
package
This package provides strict versions of some standard Haskell data types (pairs, Maybe and Either). It also contains strict IO operations. Version 0.3.2
strictToLazyST :: ST s a -> ST s a
base Control.Monad.ST.Lazy
Convert a strict ST computation into a lazy one. The strict state thread passed to strictToLazyST is not performed until the result of the lazy state thread it returns is demanded.
package strict-base-types
package
It is common knowledge that lazy datastructures can lead to space-leaks. This problem is particularly prominent, when using lazy datastructures to store the state of a long-running application in memory. The easiest solution to this problem is to use fully strict types to store such state values. By "fully strict types" we mean types for whose values it holds that, if they are in weak-head normal form, then they are also in normal form. Intuitively, this means that values of fully strict types cannot contain unevaluated thunks. To define a fully strict datatype, one typically uses the following recipe. * Make all fields of every constructor strict; i.e., add a bang to all fields. * Use only strict types for the fields of the constructors. The second requirement is problematic as it rules out the use of the standard Haskell Maybe, Either, and pair types. This library solves this problem by providing strict variants of these types and their corresponding standard support functions and type-class instances. Note that this library does currently not provide fully strict lists. They can be added if they are really required. However, in many cases one probably wants to use unboxed or strict boxed vectors from the vector library (http://hackage.haskell.org/package/vector) instead of strict lists.  Moreover, instead of Strings one probably wants to use strict Text values from the text library (http://hackage.haskell.org/package/text). This library comes with batteries included; i.e., missing instances for type-classes from the deepseq, binary, aeson, QuickCheck, and lens packages are included. Of particluar interest is the Strict type-class provided by the lens library (http://hackage.haskell.org/packages/archive/lens/3.9.0.2/doc/html/Control-Lens-Iso.html#t:Strict). It is used in the following example to simplify the modification of strict fields. > (-# LANGUAGE TemplateHaskell #-)   -- replace with curly braces, > (-# LANGUAGE OverloadedStrings #-) -- the Haddock prologues are a P.I.T.A! > import           Control.Lens ( (.=), Strict(strict), from, Iso', makeLenses) > import           Control.Monad.State.Strict (State) > import qualified Data.Map                   as M > import qualified Data.Maybe.Strict          as S > import qualified Data.Text                  as T > -- | An example of a state record as it could be used in a (very minimal) > -- role-playing game. > data GameState = GameState > ( _gsCooldown :: !(S.Maybe Int) > , _gsHealth   :: !Int > )  -- replace with curly braces, *grmbl* > makeLenses ''GameState > -- The isomorphism, which converts a strict field to its lazy variant > lazy :: Strict lazy strict => Iso' strict lazy > lazy = from strict > type Game = State GameState > cast :: T.Text -> Game () > cast spell = > gsCooldown.lazy .= M.lookup spell spellDuration > -- ... implement remainder of spell-casting ... > where > spellDuration = M.fromList [("fireball", 5)] See http://www.haskellforall.com/2013/05/program-imperatively-using-haskell.html for a gentle introduction to lenses and state manipulation. Note that this package uses the types provided by the strict package (http://hackage.haskell.org/package/strict), but organizes them a bit differently. More precisely, the strict-base-types package * only provides the fully strict variants of types from base, * is in-sync with the current base library (base-4.6), * provides the missing instances for (future) Haskell platform packages, and * conforms to the standard policy that strictness variants of an existing datatype are identified by suffixing 'Strict' or 'Lazy' in the module hierarchy. Version 0.2.1
package strict-concurrency
package
This package provides head normal form strict versions of some standard Haskell concurrency abstractions (MVars,Chans), which provide control over where evaluation takes place not offered by the default lazy types. This may be useful for deciding when and where evaluation occurs, leading to improved time or space use, depending on the circumstances. Version 0.2.4.1
package strict-ghc-plugin
package
This plugin gives an example of defining a compiler plugin for GHC. You mark functions with the `Strictify` annotation and GHC makes the function strict (by recursively expanding non-recursive let bindings into case bindings.) Version 0.1.1
package strict-io
package
This library is a thin layer on top standard IO modules like System.IO and Data.IORef that re-expose these functions under a different type, namely SIO. Version 0.2.1
strictBufferOp :: BufferOp ByteString
HTTP Network.BufferType
strictBufferOp is the BufferOp definition over ByteStrings, the non-lazy kind.
strictDecode :: OnDecodeError
text Data.Text.Encoding.Error
Throw a UnicodeException if decoding fails.
strictEncode :: OnEncodeError
text Data.Text.Encoding.Error
Throw a UnicodeException if encoding fails.
package strictify
package
Find a local optimum of strictness annotations. Version 0.1
strictInvariant :: Text -> Bool
text Data.Text.Lazy.Internal
Check the invariant strictly.
package strictly
package
lazyToStrictST :: ST s a -> ST s a
base Control.Monad.ST.Lazy
Convert a lazy ST computation into a strict one.
package binary-strict
package
This is a strict version of the Get monad from the binary package. It's pretty much just a copy and paste job from the original source code. The binary team are currently unsure about their future plans w.r.t. strictness, so this is just a stop gap measure. See http://www.haskell.org/haskellwiki/DealingWithBinaryData for documentation. Version 0.4.8
fromStrict :: ByteString -> ByteString
bytestring Data.ByteString.Lazy, bytestring Data.ByteString.Lazy.Char8
O(1) Convert a strict ByteString into a lazy ByteString.
fromStrict :: Text -> Text
text Data.Text.Lazy
O(c) Convert a strict Text into a lazy Text.
nonStrictRelativeTo :: URI -> URI -> URI
network Network.URI
Returns a new URI which represents the value of the first URI interpreted as relative to the second URI. For example: > "foo" `relativeTo` "http://bar.org/" = "http://bar.org/foo" > "http:foo" `nonStrictRelativeTo` "http://bar.org/" = "http://bar.org/foo" Algorithm from RFC3986 [3], section 5.2.2
package restricted-workers
package
This library provides an abstract interface for running various kinds of workers under resource restrictions. It was originally developed as part of the interactive-diagrams (http://github.com/co-dan/interactive-diagrams) project. To read more about the idia behind the library check out my GSoC report: http://parenz.wordpress.com/2013/07/15/interactive-diagrams-gsoc-progress-report/. The library provides a convenient way of running worker processes, saving data obtained by the workers at start-up, a simple pool abstraction and a configurable security and resource limitations. Please consult https://github.com/co-dan/interactive-diagrams/tree/master/restricted-workers/README.md and https://github.com/co-dan/interactive-diagrams/wiki/Restricted-Workers for more details. Warning: this library requires SELinux to function Version 0.1.1
SetOwnerAndGroupIsRestricted :: PathVar
unix System.Posix.Files.ByteString, unix System.Posix.Files
toStrict :: ByteString -> ByteString
bytestring Data.ByteString.Lazy, bytestring Data.ByteString.Lazy.Char8
O(n) Convert a lazy ByteString into a strict ByteString. Note that this is an expensive operation that forces the whole lazy ByteString into memory and then copies all the data. If possible, try to avoid converting back and forth between strict and lazy bytestrings.
toStrict :: Text -> Text
text Data.Text.Lazy
O(n) Convert a lazy Text into a strict Text.