|
|
@@ -10,15 +10,19 @@ import Control.DeepSeq (NFData (..)) |
|
|
|
import Data.ByteString (ByteString) |
|
|
|
import Data.Data |
|
|
|
|
|
|
|
-- | The main Path type. |
|
|
|
-- |
|
|
|
-- The type variable 'b' is either: |
|
|
|
-- |
|
|
|
-- * Abs -- absolute path |
|
|
|
-- * Rel -- relative path |
|
|
|
-- |
|
|
|
-- Internally is a ByteString. The path is guaranteed to |
|
|
|
-- be normalised and contain no trailing Path separators, |
|
|
|
-- except for the '/' root path. |
|
|
|
-- |
|
|
|
-- There are no duplicate path separators |
|
|
|
-- @\/\/@, no @..@, no @.\/@, no @~\/@, etc. |
|
|
|
data Path b = MkPath ByteString |
|
|
|
deriving (Typeable) |
|
|
|
|
|
|
|