Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex D
GHC
Commits
d3585c0a
Commit
d3585c0a
authored
Mar 22, 2005
by
simonpj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[project @ 2005-03-22 17:33:38 by simonpj]
Windows wibbles
parent
069370a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
ghc/compiler/main/DynFlags.hs
ghc/compiler/main/DynFlags.hs
+11
-10
No files found.
ghc/compiler/main/DynFlags.hs
View file @
d3585c0a
...
...
@@ -60,6 +60,7 @@ import Util ( notNull, splitLongestPrefix, split, normalisePath )
import
DATA_IOREF
(
readIORef
)
import
EXCEPTION
(
throwDyn
)
import
Monad
(
when
)
import
Data.List
(
isPrefixOf
)
import
Maybe
(
fromJust
)
import
Char
(
isDigit
,
isUpper
)
...
...
@@ -1092,20 +1093,20 @@ splitPathList s = filter notNull (splitUp s)
-- that this will cause too much breakage for users & ':' will
-- work fine even with DOS paths, if you're not insisting on being silly.
-- So, use either.
splitUp
[]
=
[]
splitUp
(
x
:
':'
:
div
:
xs
)
|
div
`
elem
`
dir_markers
=
do
let
(
p
,
rs
)
=
findNextPath
xs
in
((
x
:
':'
:
div
:
p
)
:
splitUp
rs
)
splitUp
[]
=
[]
splitUp
(
x
:
':'
:
div
:
xs
)
|
div
`
elem
`
dir_markers
=
((
x
:
':'
:
div
:
p
)
:
splitUp
rs
)
where
(
p
,
rs
)
=
findNextPath
xs
-- we used to check for existence of the path here, but that
-- required the IO monad to be threaded through the command-line
-- parser which is quite inconvenient. The
splitUp
xs
=
do
let
(
p
,
rs
)
=
findNextPath
xs
return
(
cons
p
(
splitUp
rs
))
splitUp
xs
=
cons
p
(
splitUp
rs
)
where
(
p
,
rs
)
=
findNextPath
xs
cons
""
xs
=
xs
cons
x
xs
=
x
:
xs
cons
""
xs
=
xs
cons
x
xs
=
x
:
xs
-- will be called either when we've consumed nought or the
-- "<Drive>:/" part of a DOS path, so splitting is just a Q of
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment