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.SegNode

When Rooted/Unrooted and File/Dir both are present, Rooted/Unrooted must be outermost constructors and File/Dir as inner. Thus the types File (Rooted a) or Dir (Rooted a) are not allowed but Rooted (Dir a) and Rooted (File a) are allowed.

  • 9 values

Statically Verified Path Literals

4 declarations

Quasiquoters.

valuertdir :: QuasiQuoter
#

Generates a Rooted (Dir WindowsPath) type from a quoted literal.

Example1 expression
Path.toString (Path.toPath ([rtdir|/usr|] :: Rooted (Dir PosixPath)))"/usr"
valueurdir :: QuasiQuoter
#

Generates a Unrooted (Dir WindowsPath) type from a quoted literal.

Example1 expression
Path.toString (Path.toPath ([urdir|usr|] :: Unrooted (Dir PosixPath)))"usr"
valuertfile :: QuasiQuoter
#

Generates a Rooted (File WindowsPath) type from a quoted literal.

Example1 expression
Path.toString (Path.toPath ([rtfile|/x.txt|] :: Rooted (File PosixPath)))"/x.txt"
valueurfile :: QuasiQuoter
#

Generates a Unrooted (File WindowsPath) type from a quoted literal.

Example1 expression
Path.toString (Path.toPath ([urfile|x.txt|] :: Unrooted (File PosixPath)))"x.txt"

Statically Verified Path Strings

4 declarations

Template Haskell expression splices.

valuertdirE :: String -> Q Exp
#

Generates a Haskell expression of type Rooted (Dir WindowsPath).

valueurdirE :: String -> Q Exp
#

Generates a Haskell expression of type Unrooted (Dir WindowsPath).

valuertfileE :: String -> Q Exp
#

Generates a Haskell expression of type Rooted (File WindowsPath).

valueurfileE :: String -> Q Exp
#

Generates a Haskell expression of type Unrooted (File WindowsPath).

Operations

1 declaration

Append a branch type path to a directory.

Example4 expressions
Path.toString (Path.toPath (SegNode.join [rtdir|/usr|] [urdir|bin|] :: Rooted (Dir PosixPath)))"/usr/bin"Path.toString (Path.toPath (SegNode.join [rtdir|/usr|] [urfile|bin|] :: Rooted (File PosixPath)))"/usr/bin"Path.toString (Path.toPath (SegNode.join [urdir|usr|] [urdir|bin|] :: Unrooted (Dir PosixPath)))"usr/bin"Path.toString (Path.toPath (SegNode.join [urdir|usr|] [urfile|bin|] :: Unrooted (File PosixPath)))"usr/bin"

Orphan instances

4 instances