language-ninja-0.2.0: A library for dealing with the Ninja build language.

CopyrightCopyright 2017 Awake Security
LicenseApache-2.0
Maintaineropensource@awakesecurity.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Language.Ninja.Misc.Path

Description

A datatype for Unix path strings.

Since: 0.1.0

Synopsis

Documentation

data Path Source #

This type represents a Unix path string.

Since: 0.1.0

Instances

Eq Path Source # 

Methods

(==) :: Path -> Path -> Bool #

(/=) :: Path -> Path -> Bool #

Ord Path Source # 

Methods

compare :: Path -> Path -> Ordering #

(<) :: Path -> Path -> Bool #

(<=) :: Path -> Path -> Bool #

(>) :: Path -> Path -> Bool #

(>=) :: Path -> Path -> Bool #

max :: Path -> Path -> Path #

min :: Path -> Path -> Path #

Read Path Source # 
Show Path Source # 

Methods

showsPrec :: Int -> Path -> ShowS #

show :: Path -> String #

showList :: [Path] -> ShowS #

IsString Path Source # 

Methods

fromString :: String -> Path #

Generic Path Source # 

Associated Types

type Rep Path :: * -> * #

Methods

from :: Path -> Rep Path x #

to :: Rep Path x -> Path #

Hashable Path Source # 

Methods

hashWithSalt :: Int -> Path -> Int #

hash :: Path -> Int #

ToJSON Path Source # 
ToJSONKey Path Source # 
FromJSON Path Source # 
FromJSONKey Path Source # 
NFData Path Source # 

Methods

rnf :: Path -> () #

(Monad m, Serial m Text) => Serial m Path Source #

Uses the underlying IText instance.

Since: 0.1.0

Methods

series :: Series m Path #

(Monad m, CoSerial m Text) => CoSerial m Path Source #

Uses the underlying IText instance.

Since: 0.1.0

Methods

coseries :: Series m b -> Series m (Path -> b) #

type Rep Path Source # 
type Rep Path = D1 (MetaData "Path" "Language.Ninja.Misc.Path" "language-ninja-0.2.0-4aVVODOvkNMFxGcRpnztag" True) (C1 (MetaCons "MkPath" PrefixI True) (S1 (MetaSel (Just Symbol "_pathIText") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IText)))

makePath :: Text -> Path Source #

Construct a Path from some Text.

Since: 0.1.0

pathIText :: Iso' Path IText Source #

An isomorphism between a Path and its underlying IText.

Since: 0.1.0

pathText :: Iso' Path Text Source #

An isomorphism that gives access to a Text-typed view of a Path, even though the underlying data has type IText.

This is equivalent to pathIText . from Ninja.itext.

Since: 0.1.0

pathString :: Iso' Path String Source #

An isomorphism that gives access to a String-typed view of a Path.

Since: 0.1.0

pathFP :: Iso' Path FilePath Source #

An isomorphism between a Path and a FilePath from system-filepath. This uses decodeString and encodeString, so all the caveats on those functions apply here.

Since: 0.1.0