diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-12-29 13:43:02 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-12-29 14:13:34 +0100 |
commit | 5bb7fecb09f828ea41e5b5a295ea159fa405dcc5 (patch) | |
tree | 1f5e89ec50555aabbbbacf60d3675b1fd445f683 /ghc | |
parent | 4f69203dd7892d3640e871c5914b7ee2be5f5dff (diff) | |
download | haskell-5bb7fecb09f828ea41e5b5a295ea159fa405dcc5.tar.gz |
Export some useful GHC API functions.
Working on some code using the GHC API, I found these
functions were useful and wished they were exported. This
commit exports them.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: hvr, thomie
Differential Revision: https://phabricator.haskell.org/D1710
Diffstat (limited to 'ghc')
-rw-r--r-- | ghc/Main.hs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/ghc/Main.hs b/ghc/Main.hs index 31a9b914b6..73552d3038 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -694,13 +694,7 @@ addFlag s flag = liftEwM $ do doMake :: [(String,Maybe Phase)] -> Ghc () doMake srcs = do - let (hs_srcs, non_hs_srcs) = partition haskellish srcs - - haskellish (f,Nothing) = - looksLikeModuleName f || isHaskellSrcFilename f || '.' `notElem` f - haskellish (_,Just phase) = - phase `notElem` [ As True, As False, Cc, Cobjc, Cobjcxx, CmmCpp, Cmm - , StopLn] + let (hs_srcs, non_hs_srcs) = partition isHaskellishTarget srcs hsc_env <- GHC.getSession |