Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- current :: IO (Maybe (Absolute Path To Directory))
- home :: IO (Maybe (Absolute Path To Directory))
- create :: Absolute Path To Directory -> IO ()
- change :: Absolute Path To Directory -> IO ()
- remove :: Absolute Path To Directory -> IO ()
- data Points
- data Origin
- data To
- type Path = Cofree Maybe String
- newtype Outline (origin :: Origin) (points :: Points) = Outline {}
- type family Absolute (path :: Type) (to :: Type) (points :: Points) :: Type where ...
- type family Currently (path :: Type) (to :: Type) (points :: Points) :: Type where ...
- type family Homeward (path :: Type) (to :: Type) (points :: Points) :: Type where ...
- type family Relative (path :: Type) (to :: Type) (points :: Points) :: Type where ...
- type family Incompleted (outline :: Origin) :: Constraint where ...
- deeper :: Relative Path To points -> Maybe (Relative Path To points)
- part :: String -> Outline origin points
- parent :: Absolute Path To points -> Maybe (Absolute Path To Directory)
- (<^>) :: forall origin points. Incompleted origin => Outline origin Directory -> Relative Path To points -> Outline origin points
- (<.^>) :: Currently Path To Directory -> Relative Path To points -> Currently Path To points
- (<~^>) :: Homeward Path To Directory -> Relative Path To points -> Homeward Path To points
- (<^^>) :: Relative Path To Directory -> Relative Path To points -> Relative Path To points
- (</>) :: forall origin points. Incompleted origin => Absolute Path To Directory -> Outline origin points -> Absolute Path To points
- (</.>) :: Absolute Path To Directory -> Currently Path To points -> Absolute Path To points
- (</~>) :: Absolute Path To Directory -> Homeward Path To points -> Absolute Path To points
- (</^>) :: Absolute Path To Directory -> Relative Path To points -> Absolute Path To points
CRUD operations for filesystem
current :: IO (Maybe (Absolute Path To Directory)) Source #
Return Nothing, if current working directory is root (cwd)
home :: IO (Maybe (Absolute Path To Directory)) Source #
Retrieve absolute path of home directory (echo ~)
Pure combinators
What is the beginning of the path?
newtype Outline (origin :: Origin) (points :: Points) Source #
The internal type of path representation
Instances
Eq (Outline origin points) Source # | |
Read (Outline Root Directory) Source # | |
Read (Outline Root File) Source # | |
Read (Outline Current Directory) Source # | |
Read (Outline Current File) Source # | |
Read (Outline Home Directory) Source # | |
Read (Outline Home File) Source # | |
Read (Outline Vague Directory) Source # | |
Read (Outline Vague File) Source # | |
Show (Outline Root Directory) Source # | |
Show (Outline Root File) Source # | |
Show (Outline Current Directory) Source # | |
Show (Outline Current File) Source # | |
Show (Outline Home Directory) Source # | |
Show (Outline Home File) Source # | |
Show (Outline Vague Directory) Source # | |
Show (Outline Vague File) Source # | |
type family Incompleted (outline :: Origin) :: Constraint where ... Source #
Incompleted Current = () | |
Incompleted Home = () | |
Incompleted Vague = () |
deeper :: Relative Path To points -> Maybe (Relative Path To points) Source #
Take the next piece of relative path
parent :: Absolute Path To points -> Maybe (Absolute Path To Directory) Source #
Take parent directory of current pointed entity
(<^>) :: forall origin points. Incompleted origin => Outline origin Directory -> Relative Path To points -> Outline origin points Source #
Add relative path to uncompleted path
(<.^>) :: Currently Path To Directory -> Relative Path To points -> Currently Path To points Source #
"./etc/" + "usr/local/" + = "./etc/usr/local/"
(<~^>) :: Homeward Path To Directory -> Relative Path To points -> Homeward Path To points Source #
"~/etc/" + "usr/local/" + = "~/etc/usr/local/"
(<^^>) :: Relative Path To Directory -> Relative Path To points -> Relative Path To points Source #
"etc/" + "usr/local/" + = "etc/usr/local/"
(</>) :: forall origin points. Incompleted origin => Absolute Path To Directory -> Outline origin points -> Absolute Path To points Source #
Absolutize uncompleted path
(</.>) :: Absolute Path To Directory -> Currently Path To points -> Absolute Path To points Source #
"/usr/local/" + "./etc/" = "/usr/local/etc/"