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

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulestreamly-core-0.3.1Haskell2010

Streamly.Internal.FileSystem.WindowsPath.Node

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

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

  • 2 types
  • 1 class
  • 5 values

Types

3 declarations
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.WindowsPath.Node
  • IsNode (File a)Defined in streamly-core-0.3.1 · Streamly.Internal.FileSystem.WindowsPath.Node

Statically Verified Path Literals

2 declarations

Quasiquoters.

valuedir :: QuasiQuoter
#

Generates a Dir WindowsPath type from a quoted literal.

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

Generates a File WindowsPath type from a quoted literal.

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

Statically Verified Path Strings

2 declarations

Template Haskell expression splices.

valuedirE :: String -> Q Exp
#

Generates a Haskell expression of type Dir WindowsPath.

valuefileE :: String -> Q Exp
#

Generates a Haskell expression of type File WindowsPath.

Operations

1 declaration