Skip to content

Commit a5e49e1

Browse files
Add module level docs for Seg/Node path modules
1 parent 9618dbc commit a5e49e1

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

core/src/Streamly/FileSystem/Path/Node.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
-- Maintainer : [email protected]
66
-- Portability : GHC
77
--
8+
-- Represent 'File' or 'Dir' type path nodes explicitly as separate types for
9+
-- the safety of path append operation. A 'Dir' path is a branching or
10+
-- intermediate node whereas a 'File' type is a terminal or leaf node. We
11+
-- cannot append a path to a 'File' type path.
12+
--
13+
-- See the overview in the "Streamly.FileSystem.Path" module for more details.
14+
--
815
module Streamly.FileSystem.Path.Node
916
(
1017
-- * Types

core/src/Streamly/FileSystem/Path/Seg.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
-- Maintainer : [email protected]
66
-- Portability : GHC
77
--
8+
-- Represent 'Rooted' or 'Branch' type path segments explicitly as separate
9+
-- types for the safety of path append operation. A Rooted path is an absolute
10+
-- path or a path that is relative to the current directory with a leading dot.
11+
-- Rooted paths cannot be appended to other paths.
12+
--
13+
-- See the overview in the "Streamly.FileSystem.Path" module for more details.
14+
--
815
module Streamly.FileSystem.Path.Seg
916
(
1017
-- * Types

core/src/Streamly/FileSystem/Path/SegNode.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
-- Maintainer : [email protected]
66
-- Portability : GHC
77
--
8+
-- Use 'Rooted' or 'Branch' path segment type annotations as well as 'File' and
9+
-- 'Dir' node type annotations on the same path for the safety of path append
10+
-- operation. A Rooted path cannot be appended to other paths, and you canno
11+
-- append a path to a 'File' type path.
12+
--
13+
-- See the overview in the "Streamly.FileSystem.Path" module for more details.
14+
--
815

916
module Streamly.FileSystem.Path.SegNode
1017
(

0 commit comments

Comments
 (0)