diff options
author | Shea Levy <shea@shealevy.com> | 2016-12-20 01:19:18 +0000 |
---|---|---|
committer | Tamar Christina <tamar@zhox.com> | 2016-12-20 01:25:48 +0000 |
commit | 27f79255634d9789f367273504545c1ebfad90a0 (patch) | |
tree | 9d2977cd52f18abcc824dae743ec7c4a3e6f04c0 /compiler/ghci/Linker.hs | |
parent | c0c1f801f4ca26f1db68ac527341a1cf051cb7d6 (diff) | |
download | haskell-27f79255634d9789f367273504545c1ebfad90a0.tar.gz |
Allow use of the external interpreter in stage1.
Summary:
Now that we have -fexternal-interpreter, we can lose most of the GHCI ifdefs.
This was originally added in https://phabricator.haskell.org/D2826
but that led to a compatibility issue with ghc 7.10.x on Windows.
That's fixed here and the revert reverted.
Reviewers: goldfire, hvr, austin, bgamari, Phyx
Reviewed By: Phyx
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2884
GHC Trac Issues: #13008
Diffstat (limited to 'compiler/ghci/Linker.hs')
-rw-r--r-- | compiler/ghci/Linker.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/ghci/Linker.hs b/compiler/ghci/Linker.hs index 7379c46772..6a0483ce1b 100644 --- a/compiler/ghci/Linker.hs +++ b/compiler/ghci/Linker.hs @@ -709,6 +709,16 @@ getLinkDeps hsc_env hpt pls replace_osuf span mods adjust_ul _ (DotA fp) = panic ("adjust_ul DotA " ++ show fp) adjust_ul _ (DotDLL fp) = panic ("adjust_ul DotDLL " ++ show fp) adjust_ul _ l@(BCOs {}) = return l +#if !MIN_VERSION_filepath(1,4,1) + stripExtension :: String -> FilePath -> Maybe FilePath + stripExtension [] path = Just path + stripExtension ext@(x:_) path = stripSuffix dotExt path + where dotExt = if isExtSeparator x then ext else '.':ext + + stripSuffix :: Eq a => [a] -> [a] -> Maybe [a] + stripSuffix xs ys = fmap reverse $ stripPrefix (reverse xs) (reverse ys) +#endif + {- ********************************************************************** |