path-like-0.1.0.0: FileLike and DirLike type classes for the Path library.

CopyrightCopyright (C) 2020 Daniel Firth
MaintainerDaniel Firth <dan.firth@homotopic.tech>
Safe HaskellNone
LanguageHaskell2010

Path.Like

Description

License : MIT Stability : experimental

Type classes for compiling down to well-typed Paths.

Synopsis

Documentation

class FileLike b a | a -> b where Source #

Class representing a type a that can be compiled down to a `Path b File`.

Methods

toFile :: a -> Path b File Source #

Instances
FileLike b (Path b File) Source # 
Instance details

Defined in Path.Like

Methods

toFile :: Path b File -> Path b File Source #

class DirLike b a | a -> b where Source #

Class representing a type a that can be compiled down to a `Path b Dir`.

Methods

toDir :: a -> Path b Dir Source #

Instances
DirLike b (Path b Dir) Source # 
Instance details

Defined in Path.Like

Methods

toDir :: Path b Dir -> Path b Dir Source #

(/>) :: (DirLike b a, FileLike Rel c) => a -> c -> Path b File Source #

Like </>, but works for any DirLike and relative FileLike to produce a concrete Path.