Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gargantext-ihaskell
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
gargantext-ihaskell
Commits
0f5aaa05
Commit
0f5aaa05
authored
Jun 27, 2019
by
Vaibhav Sagar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src/IHaskell/Eval/Evaluate.hs: hide ghc-lib{,-parser}
parent
e4fd5807
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
Evaluate.hs
src/IHaskell/Eval/Evaluate.hs
+8
-1
No files found.
src/IHaskell/Eval/Evaluate.hs
View file @
0f5aaa05
...
...
@@ -24,6 +24,7 @@ import Control.Concurrent (forkIO, threadDelay)
import
Data.Foldable
(
foldMap
)
import
Prelude
(
head
,
tail
,
last
,
init
)
import
Data.List
(
nubBy
)
import
qualified
Data.Set
as
Set
import
Data.Char
as
Char
import
Data.Dynamic
import
qualified
Data.Serialize
as
Serialize
...
...
@@ -116,6 +117,9 @@ ihaskellGlobalImports =
,
"import qualified IHaskell.Eval.Widgets"
]
hiddenPackageNames
::
Set
.
Set
String
hiddenPackageNames
=
Set
.
fromList
[
"ghc-lib"
,
"ghc-lib-parser"
]
-- | Interpreting function for testing.
testInterpret
::
Interpreter
a
->
IO
a
testInterpret
v
=
interpret
GHC
.
Paths
.
libdir
False
(
const
v
)
...
...
@@ -182,7 +186,8 @@ initializeImports = do
(
dflgs
,
_
)
<-
liftIO
$
initPackages
dflags
let
db
=
getPackageConfigs
dflgs
packageNames
=
map
(
packageIdString'
dflgs
)
db
hiddenPackages
=
Set
.
intersection
hiddenPackageNames
(
Set
.
fromList
packageNames
)
hiddenFlags
=
fmap
HidePackage
$
Set
.
toList
hiddenPackages
initStr
=
"ihaskell-"
#
if
MIN_VERSION_ghc
(
8
,
2
,
0
)
...
...
@@ -222,6 +227,8 @@ initializeImports = do
displayImports
=
map
toImportStmt
displayPkgs
void
$
setSessionDynFlags
$
dflgs
{
packageFlags
=
hiddenFlags
++
packageFlags
dflgs
}
-- Import implicit prelude.
importDecl
<-
parseImportDecl
"import Prelude"
let
implicitPrelude
=
importDecl
{
ideclImplicit
=
True
}
...
...
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