path-like-0.1.2.0: PathLike, 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 PathLike b t a | a -> b, a -> t where Source #

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

Methods

toPath :: a -> Path b t Source #

type FileLike b a = PathLike b File a Source #

type DirLike b a = PathLike b Dir a Source #

toFile :: FileLike b a => a -> Path b File Source #

toDir :: DirLike b a => a -> 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.