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
2f11f85e
Commit
2f11f85e
authored
Mar 25, 2015
by
Andrew Gibiansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for compilation errors
parent
296c75f7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
Evaluate.hs
src/IHaskell/Eval/Evaluate.hs
+11
-8
No files found.
src/IHaskell/Eval/Evaluate.hs
View file @
2f11f85e
...
@@ -18,7 +18,7 @@ import ClassyPrelude hiding (init, last, liftIO, head, hGetContents, t
...
@@ -18,7 +18,7 @@ import ClassyPrelude hiding (init, last, liftIO, head, hGetContents, t
import
Control.Concurrent
(
forkIO
,
threadDelay
)
import
Control.Concurrent
(
forkIO
,
threadDelay
)
import
Prelude
(
putChar
,
head
,
tail
,
last
,
init
,
(
!!
))
import
Prelude
(
putChar
,
head
,
tail
,
last
,
init
,
(
!!
))
import
Data.List.Utils
import
Data.List.Utils
import
Data.List
(
findIndex
,
and
,
foldl1
)
import
Data.List
(
findIndex
,
and
,
foldl1
,
nubBy
)
import
Data.String.Utils
import
Data.String.Utils
import
Text.Printf
import
Text.Printf
import
Data.Char
as
Char
import
Data.Char
as
Char
...
@@ -559,13 +559,14 @@ evalCommand _ (Directive GetKind expr) state = wrapExecution state $ do
...
@@ -559,13 +559,14 @@ evalCommand _ (Directive GetKind expr) state = wrapExecution state $ do
evalCommand
_
(
Directive
LoadFile
names
)
state
=
wrapExecution
state
$
do
evalCommand
_
(
Directive
LoadFile
names
)
state
=
wrapExecution
state
$
do
write
state
$
"Load: "
++
names
write
state
$
"Load: "
++
names
forM_
(
words
names
)
$
\
name
->
do
displays
<-
forM
(
words
names
)
$
\
name
->
do
let
filename
=
if
endswith
".hs"
name
let
filename
=
if
endswith
".hs"
name
then
name
then
name
else
name
++
".hs"
else
name
++
".hs"
contents
<-
readFile
$
fpFromString
filename
contents
<-
readFile
$
fpFromString
filename
modName
<-
intercalate
"."
<$>
getModuleName
contents
modName
<-
intercalate
"."
<$>
getModuleName
contents
doLoadModule
filename
modName
doLoadModule
filename
modName
return
(
ManyDisplay
displays
)
evalCommand
publish
(
Directive
ShellCmd
(
'!'
:
cmd
))
state
=
wrapExecution
state
$
evalCommand
publish
(
Directive
ShellCmd
(
'!'
:
cmd
))
state
=
wrapExecution
state
$
case
words
cmd
of
case
words
cmd
of
...
@@ -1019,7 +1020,9 @@ doLoadModule name modName = do
...
@@ -1019,7 +1020,9 @@ doLoadModule name modName = do
-- Load the new target.
-- Load the new target.
target
<-
guessTarget
name
Nothing
target
<-
guessTarget
name
Nothing
oldTargets
<-
getTargets
oldTargets
<-
getTargets
-- Add a target, but make sure targets are unique!
addTarget
target
addTarget
target
getTargets
>>=
return
.
(
nubBy
((
==
)
`
on
`
targetId
))
>>=
setTargets
result
<-
load
LoadAllTargets
result
<-
load
LoadAllTargets
-- Reset the context, since loading things screws it up.
-- Reset the context, since loading things screws it up.
...
...
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