Skip to content
Snippets Groups Projects
Verified Commit 40290fb0 authored by Julian Ospald's avatar Julian Ospald :tea:
Browse files

Fix some renaming identifiers

parent d02ab67f
Branches
Tags
No related merge requests found
......@@ -51,7 +51,7 @@ module System.OsPath
, toOsPathEnc
, toOsPathFS
, afp
, packAFP
, packOsPath
#endif
-- * Filepath deconstruction
......@@ -64,7 +64,7 @@ module System.OsPath
, fromOsPathUtf
, fromOsPathEnc
, fromOsPathFS
, unpackAFP
, unpackOsPath
#endif
-- * Word construction
......@@ -161,11 +161,11 @@ import System.OsPath.Internal
, fromOsPathUtf
, fromOsPathEnc
, fromOsPathFS
, packAFP
, packOsPath
, toOsPathUtf
, toOsPathEnc
, toOsPathFS
, unpackAFP
, unpackOsPath
)
import System.OsPath.Types
( OsPath )
......
......@@ -92,15 +92,15 @@ fromOsPathFS = fromOsStringFS
-- On windows, this ensures valid UCS-2LE, on unix it is passed unchanged/unchecked.
--
-- Throws 'EncodingException' on invalid UCS-2LE on windows (although unlikely).
bytesToAFP :: MonadThrow m
=> ByteString
-> m OsPath
bytesToAFP = OS.bytesToOsString
bytesToOsPath :: MonadThrow m
=> ByteString
-> m OsPath
bytesToOsPath = OS.bytesToOsString
mkOsPath :: ByteString -> Q Exp
mkOsPath bs =
case bytesToAFP bs of
case bytesToOsPath bs of
Just afp' ->
if isValid afp'
then lift afp'
......@@ -115,8 +115,8 @@ afp = qq mkOsPath
-- | Unpack an 'OsPath' to a list of 'OsChar'.
unpackAFP :: OsPath -> [OsChar]
unpackAFP = unpackOsString
unpackOsPath :: OsPath -> [OsChar]
unpackOsPath = unpackOsString
-- | Pack a list of 'OsChar' to an 'OsPath'.
......@@ -124,6 +124,6 @@ unpackAFP = unpackOsString
-- Note that using this in conjunction with 'unsafeFromChar' to
-- convert from @[Char]@ to 'OsPath' is probably not what
-- you want, because it will truncate unicode code points.
packAFP :: [OsChar] -> OsPath
packAFP = packOsString
packOsPath :: [OsChar] -> OsPath
packOsPath = packOsString
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment