HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Moduleparser-combinators-1.3.1Haskell2010

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.

Contents
  1. Permutation type
  2. Permutation evaluators
  3. Permutation constructors
Synopsis

Permutation type

Permutation evaluators

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

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.