Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Haskell
ghcup-hs
Commits
08ddb591
Verified
Commit
08ddb591
authored
Oct 30, 2020
by
Julian Ospald
🍵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add toolchain sanity checks wrt
#82
parent
3e841b3c
Pipeline
#26949
passed with stage
in 77 minutes and 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
lib/GHCup.hs
lib/GHCup.hs
+14
-1
No files found.
lib/GHCup.hs
View file @
08ddb591
...
...
@@ -74,7 +74,7 @@ import Prelude hiding ( abs
)
import
Safe
hiding
(
at
)
import
System.IO.Error
import
System.Posix.Env.ByteString
(
getEnvironment
)
import
System.Posix.Env.ByteString
(
getEnvironment
,
getEnv
)
import
System.Posix.FilePath
(
getSearchPath
,
takeExtension
)
import
System.Posix.Files.ByteString
import
Text.Regex.Posix
...
...
@@ -134,10 +134,23 @@ installGHCBindist dlinfo ver pfreq = do
-- prepare paths
ghcdir
<-
lift
$
ghcupGHCDir
tver
toolchainSanityChecks
liftE
$
installPackedGHC
dl
(
view
dlSubdir
dlinfo
)
ghcdir
ver
pfreq
liftE
$
postGHCInstall
tver
where
toolchainSanityChecks
=
do
r
<-
forM
[
"CC"
,
"LD"
]
(
liftIO
.
getEnv
)
case
catMaybes
r
of
[]
->
pure
()
_
->
do
lift
$
$
(
logWarn
)
"CC/LD environment variable is set. This will change the compiler/linker"
lift
$
$
(
logWarn
)
"GHC uses internally and can cause defunct GHC in some cases (e.g. in Anaconda"
lift
$
$
(
logWarn
)
"environments). If you encounter problems, unset CC and LD and reinstall."
-- | Install a packed GHC distribution. This only deals with unpacking and the GHC
-- build system and nothing else.
installPackedGHC
::
(
MonadMask
m
...
...
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