purescript-contrib / purescript-pathy

A type-safe abstraction for platform-independent file system paths.
Apache License 2.0
33 stars 17 forks source link

Instead of having `FileName` and `DirName` introduce `Name` that can be `Name Dir` / `Name File` #30

Closed garyb closed 6 years ago

garyb commented 6 years ago

This means when we peel we don't have to account for a case that is known to be impossible, as peeling a DirPath would give you a Name Dir with:

peel
  :: forall a b s
   . Path a b s
-> Maybe (Tuple (Path a Dir s) (Name b))