packages feed

chiasma-0.12.0.0: lib/Chiasma/Path.hs

module Chiasma.Path where

import qualified Data.Text as Text
import Path (Path, toFilePath)

pathText :: Path b t -> Text
pathText =
  toText . toFilePath

pathText' :: Path b t -> Text
pathText' p =
  case pathText p of
    "/" -> "/"
    t -> Text.dropWhileEnd (== '/') t