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.
Types
Constructors
File a |
Constructors
Dir a |
Instances
IsNode (Dir a) Source # | |
Defined in Streamly.Internal.FileSystem.PosixPath.Node | |
IsNode (File a) Source # | |
Defined in Streamly.Internal.FileSystem.PosixPath.Node |
Statically Verified Path Literals
Quasiquoters.
dir :: QuasiQuoter Source #
Generates a Dir PosixPath
type from a quoted literal.
>>>
Path.toString ([dir|usr|] :: Dir PosixPath)
"usr"
file :: QuasiQuoter Source #
Generates a File PosixPath
type from a quoted literal.
>>>
Path.toString ([file|usr|] :: File PosixPath)
"usr"
Statically Verified Path Strings
Template Haskell expression splices.