HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleparser-combinators-1.3.0Haskell2010

Control.Monad.Permutations

This module specialized the interface to Monad for potential efficiency considerations, depending on the monad the permutations are run over.

For a more general interface requiring only Applicative, and for more complete documentation, see the Control.Applicative.Permutations module.

  • 1 type
  • 4 values

Permutation type

1 declaration

Permutation evaluators

2 declarations
valuerunPermutation
  1. :: (Alternative m, Monad m)
  2. => Permutation m a

    Permutation specification

  3. -> m a

    Resulting base monad capable of handling the permutation

#

"Unlifts" a permutation parser into a parser to be evaluated.

valueintercalateEffect
  1. :: (Alternative m, Monad m)
  2. => m b

    Effect to be intercalated between permutation components

  3. -> Permutation m a

    Permutation specification

  4. -> m a

    Resulting base monad capable of handling the permutation

#

"Unlifts" a permutation parser into a parser to be evaluated with an intercalated effect. Useful for separators between permutation elements.

Permutation constructors

2 declarations
valuetoPermutationWithDefault
  1. :: Alternative m
  2. => a

    Default Value

  3. -> m a

    Permutation component

  4. -> Permutation m a
#

"Lifts" a parser with a default value to a permutation parser.

If no permutation containing the supplied parser can be parsed from the input, then the supplied default value is returned in lieu of a parse result.