Hoogle Search

Within LTS Haskell 24.50 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. type Force = Quantity DForce

    dimensional Numeric.Units.Dimensional.Quantities

    No documentation available.

  2. type FormattedTime = ByteString

    easy-logger EasyLogger.Date

    Type aliaes for date format and formatted date.

  3. module Codec.Epub.Format

    Module for pretty-printing epub meta-information Defined here is the Formattable typeclass and instances for the top-level epub data structures. The intention is that consumers use the format function on any of these otherwise disparate types.

  4. class Formattable a

    epub-metadata Codec.Epub.Format

    No documentation available.

  5. module Ersatz.Internal.Formula

    No documentation available.

  6. newtype Formula

    ersatz Ersatz.Internal.Formula

    A conjunction of clauses

  7. Formula :: Seq Clause -> Formula

    ersatz Ersatz.Internal.Formula

    No documentation available.

  8. module Physics.ForceLayout

    A simple, Haskell-native simulator for doing force-directed layout, e.g. of trees or graphs. To use, just create an Ensemble like so:

    import           Control.Lens        ((&), (.~))
    import           Data.Default        (def)
    import qualified Data.Map            as M
    import           Linear.Affine
    import           Linear.V2
    import           Physics.ForceLayout
    
    e :: Ensemble V2 Double
    e = Ensemble [ (edges,    hookeForce 0.05 4)
    , (allPairs, coulombForce 1)
    ]
    particleMap
    where edges       = [(1,2), (2,3), (2,5), (3,5), (3,4), (4,5)]
    allPairs    = [(x,y) | x <- [1..4], y <- [x+1..5]]
    particleMap = M.fromList . zip [1..]
    . map (initParticle . P . uncurry V2)
    $ [ (2.0, 3.1), (6.3, 7.2)
    , (0.3, 4.2), (1.6, -1.1)
    , (4.8, 2.9)
    ]
    
    Then run a simulation using either simulate (to get the list of all intermediate states) or forceLayout (to get only the ending state):
    e' :: Ensemble V2 Double
    e' = forceLayout (def & damping     .~ 0.8
    & energyLimit .~ Just 0.001
    & stepLimit   .~ Nothing
    )
    e
    
    See the diagrams-contrib package (http://github.com/diagrams/diagrams-contrib/) for more examples.

  9. data ForceLayoutOpts n

    force-layout Physics.ForceLayout

    Options for customizing a simulation.

  10. module Web.Forma

    This module provides a tool for validation of forms in the JSON format. Sending forms in the JSON format via an AJAX request instead of traditional submitting of forms has a number of advantages:

    • Smoother user experience: no need to reload the whole page.
    • Form rendering is separated and lives only in GET handler, POST (or whatever method you deem appropriate for your use case) handler only handles validation and effects that form submission should initiate.
    • You get a chance to organize form input the way you want.
    The task of validation of a form in the JSON format may seem simple, but it's not trivial to get it right. The library allows you to:
    • Define a form parser using type-safe applicative notation with field labels stored on the type label which guards against typos and will force all your field labels be always up to date.
    • Parse JSON Value according to the definition of form you created.
    • Stop parsing immediately if a form is malformed and cannot be processed.
    • Validate forms using any number of composable checkers that you write for your specific problem domain. Once you have a vocabulary of checkers, creation of new forms is just a matter of combining them.
    • Collect validation errors from multiple branches of parsing (one branch per form field) in parallel, so that validation errors in one branch do not prevent us from collecting validation errors from other branches. This allows for better user experience as the user can see all validation errors at the same time.
    • Use optional and (<|>) from Control.Applicative in your form definitions instead of ad-hoc helpers.
    • Perform validation using several form fields at once. You choose which “sub-region” of your form a given check will have access to, see withCheck.
    You need to enable at least DataKinds and OverloadedLabels language extensions to use this library. Note: version 1.0.0 is completely different from older versions.

Page 328 of many | Previous | Next