HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Modulestreamly-core-0.3.1Haskell2010

Streamly.Internal.Data.Path

  • 1 type
  • 1 class

Exceptions

1 declaration

Conversions

1 declaration
classclass IsPath a b where
#

If the type a b is a member of IsPath it means we know how to convert the type b to and from the base type a.

Methods

  • unsafeFromPath :: a -> b

    Like fromPath but does not check the properties of Path. The user is responsible to maintain the invariants enforced by the type b otherwise surprising behavior may result.

    This operation provides performance and simplicity when we know that the properties of the path are already verified, for example, when we get the path from the file system or from the OS APIs.

  • fromPath :: MonadThrow m => a -> m b

    Convert a base path type to other forms of well-typed paths. It may fail if the path does not satisfy the properties of the target type.

  • toPath :: b -> a

    Convert a well-typed path to the base path type. Never fails.

Instances18IsPath, …