Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
filepath
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Haskell
filepath
Commits
40290fb0
Verified
Commit
40290fb0
authored
3 years ago
by
Julian Ospald
Browse files
Options
Downloads
Patches
Plain Diff
Fix some renaming identifiers
parent
d02ab67f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
System/OsPath/Common.hs
+4
-4
4 additions, 4 deletions
System/OsPath/Common.hs
System/OsPath/Internal.hs
+9
-9
9 additions, 9 deletions
System/OsPath/Internal.hs
with
13 additions
and
13 deletions
System/OsPath/Common.hs
+
4
−
4
View file @
40290fb0
...
...
@@ -51,7 +51,7 @@ module System.OsPath
,
toOsPathEnc
,
toOsPathFS
,
afp
,
pack
AFP
,
pack
OsPath
#
endif
-- * Filepath deconstruction
...
...
@@ -64,7 +64,7 @@ module System.OsPath
,
fromOsPathUtf
,
fromOsPathEnc
,
fromOsPathFS
,
unpack
AFP
,
unpack
OsPath
#
endif
-- * Word construction
...
...
@@ -161,11 +161,11 @@ import System.OsPath.Internal
,
fromOsPathUtf
,
fromOsPathEnc
,
fromOsPathFS
,
pack
AFP
,
pack
OsPath
,
toOsPathUtf
,
toOsPathEnc
,
toOsPathFS
,
unpack
AFP
,
unpack
OsPath
)
import
System.OsPath.Types
(
OsPath
)
...
...
This diff is collapsed.
Click to expand it.
System/OsPath/Internal.hs
+
9
−
9
View file @
40290fb0
...
...
@@ -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).
bytesTo
AFP
::
MonadThrow
m
=>
ByteString
->
m
OsPath
bytesTo
AFP
=
OS
.
bytesToOsString
bytesTo
OsPath
::
MonadThrow
m
=>
ByteString
->
m
OsPath
bytesTo
OsPath
=
OS
.
bytesToOsString
mkOsPath
::
ByteString
->
Q
Exp
mkOsPath
bs
=
case
bytesTo
AFP
bs
of
case
bytesTo
OsPath
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'.
unpack
AFP
::
OsPath
->
[
OsChar
]
unpack
AFP
=
unpackOsString
unpack
OsPath
::
OsPath
->
[
OsChar
]
unpack
OsPath
=
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.
pack
AFP
::
[
OsChar
]
->
OsPath
pack
AFP
=
packOsString
pack
OsPath
::
[
OsChar
]
->
OsPath
pack
OsPath
=
packOsString
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment