Hoogle Search

Within LTS Haskell 24.65 (ghc-9.10.3)

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

  1. class (IsString t, LeftReductive t, LeftGCDMonoid t, FactorialMonoid t) => TextualMonoid t

    monoid-subclasses Data.Monoid.Textual

    The TextualMonoid class is an extension of FactorialMonoid specialized for monoids that can contain characters. Its methods are generally equivalent to their namesake functions from Data.List and Data.Text, and they satisfy the following laws:

    unfoldr splitCharacterPrefix . fromString == id
    splitCharacterPrefix . primePrefix == fmap (\(c, t)-> (c, mempty)) . splitCharacterPrefix
    
    map f . fromString == fromString . List.map f
    concatMap (fromString . f) . fromString == fromString . List.concatMap f
    
    foldl  ft fc a . fromString == List.foldl  fc a
    foldr  ft fc a . fromString == List.foldr  fc a
    foldl' ft fc a . fromString == List.foldl' fc a
    
    scanl f c . fromString == fromString . List.scanl f c
    scanr f c . fromString == fromString . List.scanr f c
    mapAccumL f a . fromString == fmap fromString . List.mapAccumL f a
    mapAccumL f a . fromString == fmap fromString . List.mapAccumL f a
    
    takeWhile pt pc . fromString == fromString . takeWhile pc
    dropWhile pt pc . fromString == fromString . dropWhile pc
    
    mconcat . intersperse (singleton c) . split (== c) == id
    find p . fromString == List.find p
    elem c . fromString == List.elem c
    
    A TextualMonoid may contain non-character data insterspersed between its characters. Every class method that returns a modified TextualMonoid instance generally preserves this non-character data. Methods like foldr can access both the non-character and character data and expect two arguments for the two purposes. For each of these methods there is also a simplified version with underscore in name (like foldr_) that ignores the non-character data. All of the following expressions are identities:
    map id
    concatMap singleton
    foldl  (<>) (\a c-> a <> singleton c) mempty
    foldr  (<>) ((<>) . singleton) mempty
    foldl' (<>) (\a c-> a <> singleton c) mempty
    scanl1 (const id)
    scanr1 const
    uncurry (mapAccumL (,))
    uncurry (mapAccumR (,))
    takeWhile (const True) (const True)
    dropWhile (const False) (const False)
    toString undefined . fromString
    toText undefined . fromText
    

  2. ConsultPolicyOverrideDelay :: Int -> RetryAction

    retry Control.Retry

    Retry if the RetryPolicy says so, but override the policy's delay (number of microseconds).

  3. ConsultPolicyOverrideDelay :: Int -> RetryAction

    retry UnliftIO.Retry

    Retry if the RetryPolicy says so, but override the policy's delay (number of microseconds).

  4. data DefUnitId

    Cabal-syntax Distribution.Backpack

    A UnitId for a definite package. The DefUnitId invariant says that a UnitId identified this way is definite; i.e., it has no unfilled holes.

  5. DefiniteUnitId :: DefUnitId -> OpenUnitId

    Cabal-syntax Distribution.Backpack

    Identifies a fully instantiated component, which has been compiled and abbreviated as a hash. The embedded UnitId MUST NOT be for an indefinite component; an OpenUnitId is guaranteed not to have any holes.

  6. IndefFullUnitId :: ComponentId -> OpenModuleSubst -> OpenUnitId

    Cabal-syntax Distribution.Backpack

    Identifies a component which may have some unfilled holes; specifying its ComponentId and its OpenModuleSubst. TODO: Invariant that OpenModuleSubst is non-empty? See also the Text instance.

  7. data OpenUnitId

    Cabal-syntax Distribution.Backpack

    An OpenUnitId describes a (possibly partially) instantiated Backpack component, with a description of how the holes are filled in. Unlike OpenUnitId, the ModuleSubst is kept in a structured form that allows for substitution (which fills in holes.) This form of unit cannot be installed. It must first be converted to a UnitId. In the absence of Backpack, there are no holes to fill, so any such component always has an empty module substitution; thus we can lossily represent it as a 'DefiniteUnitId uid'. For a source component using Backpack, however, there is more structure as components may be parametrized over some signatures, and these "holes" may be partially or wholly filled. OpenUnitId plays an important role when we are mix-in linking, and is recorded to the installed packaged database for indefinite packages; however, for compiled packages that are fully instantiated, we instantiate OpenUnitId into UnitId. For more details see the Backpack spec https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst

  8. abstractUnitId :: OpenUnitId -> UnitId

    Cabal-syntax Distribution.Backpack

    When typechecking, we don't demand that a freshly instantiated IndefFullUnitId be compiled; instead, we just depend on the installed indefinite unit installed at the ComponentId.

  9. mkDefUnitId :: ComponentId -> Map ModuleName Module -> DefUnitId

    Cabal-syntax Distribution.Backpack

    Create a DefUnitId from a ComponentId and an instantiation with no holes.

  10. mkOpenUnitId :: UnitId -> ComponentId -> OpenModuleSubst -> OpenUnitId

    Cabal-syntax Distribution.Backpack

    Safe constructor from a UnitId. The only way to do this safely is if the instantiation is provided.

Page 715 of many | Previous | Next