-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | PathLike, FileLike and DirLike type classes for the Path library. -- -- Type classes for the Path library. Exports PathLike, FileLike and -- DirLike classes so that stricter types may be used as Paths. @package path-like @version 0.2.0.0 -- | License : MIT Stability : experimental -- -- Type classes for compiling down to well-typed Paths. module Path.Like -- | Class representing a type a that can be compiled down to a -- `Path b t`. class PathLike b t a | a -> b, a -> t toPath :: PathLike b t a => a -> Path b t -- | Class representing a type a that can be compiled down to a -- `Path b File`. class PathLike b File a => FileLike b a toFile :: FileLike b a => a -> Path b File -- | Class repreenting a type a that can be compiled down to a -- `Path b Dir`. class PathLike b Dir a => DirLike b a toDir :: DirLike b a => a -> Path b Dir -- | Like </>, but works for any DirLike and relative -- FileLike to produce a concrete Path. (/>) :: (DirLike b a, FileLike Rel c) => a -> c -> Path b File instance Path.Like.DirLike b (Path.Internal.Path b Path.Posix.Dir) instance Path.Like.FileLike b (Path.Internal.Path b Path.Posix.File) instance Path.Like.PathLike b t (Path.Internal.Path b t)