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

Modulestreamly-core-0.3.1Haskell2010

Streamly.Internal.FileSystem.PosixPath.Node

This module provides a type safe path append operation by distinguishing paths between files and directories. Files are represented by the File PosixPath type and directories are represented by the Dir PosixPath type.

This distinction provides safety against appending a path to a file. Append operation allows appending to only Dir types.

Contents
  1. Types
  2. Statically Verified Path Literals
  3. Statically Verified Path Strings
  4. Operations
Synopsis

Types

newtypenewtype File a
#

Constructors

Instances4IsPath, IsNode
newtypenewtype Dir a
#

Constructors

Instances4IsPath, IsNode
classclass IsNode a

Constraint to check if a type uses File or Dir as the outermost constructor.

Instances2IsNode
  • IsNode (Dir a)Defined in streamly-core-0.3.1 · Streamly.Internal.FileSystem.PosixPath.Node
  • IsNode (File a)Defined in streamly-core-0.3.1 · Streamly.Internal.FileSystem.PosixPath.Node

Statically Verified Path Literals

Quasiquoters.

valuedir :: QuasiQuoter

Generates a Dir PosixPath type from a quoted literal.

Example1 expression
Path.toString (Path.toPath ([dir|usr|] :: Dir PosixPath))"usr"

Generates a File PosixPath type from a quoted literal.

Example1 expression
Path.toString (Path.toPath ([file|usr|] :: File PosixPath))"usr"

Statically Verified Path Strings

Template Haskell expression splices.

Operations