HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulepolysemy-1.9.2.0Haskell2010

Polysemy.Internal.Index

  • 1 type
  • 1 class
  • Packagepolysemy-1.9.2.0
  • Exports3
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceIndex.hs
classclass InsertAtIndex (index :: Nat) (head :: [k]) (tail :: [k]) (oldTail :: [k]) (full :: [k]) (inserted :: [k]) where
#

Infer a partition of the result type full so that for the fixed segments head and tail, the new segment inserted contains the missing effects between them.

Methods

Instances2InsertAtIndex
  • inserted ~ '[] => InsertAtIndex index head oldTail oldTail full insertedDefined in polysemy-1.9.2.0 · Polysemy.Internal.Index
  • (InsertAtIndex index head tail oldTail full insertedTail, inserted ~ (e ': insertedTail)) => InsertAtIndex index head (e ': tail) oldTail full insertedDefined in polysemy-1.9.2.0 · Polysemy.Internal.Index
typetype InsertAtFailure (index :: t) (soughtTail :: t1) (head :: t2) (full :: t3) = ("insertAt: Failed to insert effects at index " <> 'ShowType index) % (("There is a mismatch between what's been determined as the head and tail between the newly inserted effects," <> " and the actual desired return type.") % ("Determined head before inserted effects:" % (("\t" <> 'ShowType head) % ("Determined tail after the inserted effects:" % (("\t" <> 'ShowType soughtTail) % ("Actual desired return type:" % (("\t" <> 'ShowType full) % ("Make sure that the index provided to insertAt is correct, and that the desired return type simply requires" <> " inserting effects."))))))))
#