packages feed

polysemy-path 0.1.0.0 → 0.2.0.0

raw patch · 3 files changed

+85/−5 lines, 3 filesdep ~pathPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: path

API changes (from Hackage documentation)

+ Polysemy.Path: (</>) :: Path b Dir -> Path Rel t -> Path b t
+ Polysemy.Path: absdir :: QuasiQuoter
+ Polysemy.Path: absfile :: QuasiQuoter
+ Polysemy.Path: addExtension :: Members '[Error PathException] r => String -> Path b File -> Sem r (Path b File)
+ Polysemy.Path: data SomeBase t
+ Polysemy.Path: dirname :: Path b Dir -> Path Rel Dir
+ Polysemy.Path: fileExtension :: Members '[Error PathException] r => Path b File -> Sem r String
+ Polysemy.Path: filename :: Path b File -> Path Rel File
+ Polysemy.Path: fromAbsDir :: Path Abs Dir -> FilePath
+ Polysemy.Path: fromAbsFile :: Path Abs File -> FilePath
+ Polysemy.Path: fromRelDir :: Path Rel Dir -> FilePath
+ Polysemy.Path: fromRelFile :: Path Rel File -> FilePath
+ Polysemy.Path: fromSomeDir :: SomeBase Dir -> FilePath
+ Polysemy.Path: fromSomeFile :: SomeBase File -> FilePath
+ Polysemy.Path: infixr 5 </>
+ Polysemy.Path: isProperPrefixOf :: Path b Dir -> Path b t -> Bool
+ Polysemy.Path: mkAbsDir :: FilePath -> Q Exp
+ Polysemy.Path: mkAbsFile :: FilePath -> Q Exp
+ Polysemy.Path: mkRelDir :: FilePath -> Q Exp
+ Polysemy.Path: mkRelFile :: FilePath -> Q Exp
+ Polysemy.Path: parent :: Path b t -> Path b Dir
+ Polysemy.Path: parseSomeDir :: Members '[Error PathException] r => FilePath -> Sem r (SomeBase Dir)
+ Polysemy.Path: parseSomeFile :: Members '[Error PathException] r => FilePath -> Sem r (SomeBase File)
+ Polysemy.Path: reldir :: QuasiQuoter
+ Polysemy.Path: relfile :: QuasiQuoter
+ Polysemy.Path: replaceExtension :: Members '[Error PathException] r => String -> Path b File -> Sem r (Path b File)
+ Polysemy.Path: splitExtension :: Members '[Error PathException] r => Path b File -> Sem r (Path b File, String)
+ Polysemy.Path: toFilePath :: Path b t -> FilePath

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for polysemy-path +## v0.2.0.0++* Re-export the rest of path-0.8.0.+ ## v0.1.0.0  * Make functions sign `PathException` rather than `SomeException`.
polysemy-path.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           polysemy-path-version:        0.1.0.0+version:        0.2.0.0 synopsis:       Polysemy versions of Path functions. category:       Polysemy author:         Daniel Firth@@ -32,7 +32,7 @@   ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints   build-depends:       base >=4.7 && <5-    , path+    , path >=0.8.0 && <0.9     , polysemy     , polysemy-extra >=0.1.7.0 && <0.2.0.0     , polysemy-plugin
src/Polysemy/Path.hs view
@@ -11,23 +11,49 @@ {-# LANGUAGE PolyKinds           #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}- module Polysemy.Path (   Path , Rel , Abs , File , Dir+, SomeBase , PathException+, Path.absdir+, Path.reldir+, Path.absfile+, Path.relfile+, (Path.</>)+, stripProperPrefix+, Path.isProperPrefixOf+, Path.parent+, Path.filename+, Path.dirname+, addExtension+, splitExtension+, fileExtension+, replaceExtension , parseRelFile , parseAbsFile , parseRelDir , parseAbsDir-, stripProperPrefix+, parseSomeDir+, parseSomeFile+, Path.toFilePath+, Path.fromAbsDir+, Path.fromRelDir+, Path.fromAbsFile+, Path.fromRelFile+, Path.fromSomeDir+, Path.fromSomeFile+, Path.mkAbsDir+, Path.mkRelDir+, Path.mkAbsFile+, Path.mkRelFile ) where  import qualified Path-import Path (Path, Rel, Abs, File, Dir, PathException)+import Path (Path, Rel, Abs, File, Dir, SomeBase, PathException) import Polysemy import Polysemy.Error import Polysemy.Extra@@ -64,6 +90,22 @@             -> Sem r (Path Abs Dir) parseAbsDir x = irrefutableAbsorbThrow (Path.parseAbsDir x) +-- | Polysemy version of `Path.parseSomeDir`.+--+-- @since 0.2.0.0+parseSomeDir :: Members '[Error PathException] r+             => FilePath+             -> Sem r (SomeBase Dir)+parseSomeDir x = irrefutableAbsorbThrow (Path.parseSomeDir x)++-- | Polysemy version of `Path.parseSomeFile`.+--+-- @since 0.2.0.0+parseSomeFile :: Members '[Error PathException] r+              => FilePath+              -> Sem r (SomeBase File)+parseSomeFile x = irrefutableAbsorbThrow (Path.parseSomeFile x)+ -- | Polysemy version of `Path.stripProperPrefix`. -- -- @since 0.1.0.0@@ -72,3 +114,37 @@                   -> Path b t                   -> Sem r (Path Rel t) stripProperPrefix x y = irrefutableAbsorbThrow (Path.stripProperPrefix x y)++-- | Polysemy version of `Path.addExtension`.+--+-- @since 0.2.0.0+addExtension :: Members '[Error PathException] r+             => String+             -> Path b File+             -> Sem r (Path b File)+addExtension x y = irrefutableAbsorbThrow (Path.addExtension x y)++-- | Polysemy version of `Path.splitExtension`.+--+-- @since 0.2.0.0+splitExtension :: Members '[Error PathException] r+               => Path b File+               -> Sem r (Path b File, String)+splitExtension x = irrefutableAbsorbThrow (Path.splitExtension x)++-- | Polysemy version of `Path.replaceExtension`.+--+-- @since 0.2.0.0+replaceExtension :: Members '[Error PathException] r+             => String+             -> Path b File+             -> Sem r (Path b File)+replaceExtension x y = irrefutableAbsorbThrow (Path.replaceExtension x y)++-- | Polysemy version of `Path.fileExtension`.+--+-- @since 0.2.0.0+fileExtension :: Members '[Error PathException] r+              => Path b File+              -> Sem r String+fileExtension x = irrefutableAbsorbThrow (Path.fileExtension x)