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
4f4b7be6
Commit
4f4b7be6
authored
Jun 09, 2016
by
Andrew Gibiansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
travis latest
parent
a5d48548
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
14 deletions
+6
-14
.travis.yml
.travis.yml
+1
-1
Evaluate.hs
src/IHaskell/Eval/Evaluate.hs
+5
-13
No files found.
.travis.yml
View file @
4f4b7be6
...
...
@@ -65,7 +65,7 @@ script:
-
|
if $DISPLAY; then
TOP=$(pwd)
for PACKAGE in
$(ls --color=none ihaskell-display)
; do
for PACKAGE in
ihaskell-display/*
; do
cd "$TOP/$PACKAGE";
stack build --resolver=$RESOLVER;
cd "$TOP";
...
...
src/IHaskell/Eval/Evaluate.hs
View file @
4f4b7be6
...
...
@@ -30,7 +30,6 @@ import Data.List (findIndex, and, foldl1, nubBy)
import
Text.Printf
import
Data.Char
as
Char
import
Data.Dynamic
import
Data.Typeable.Internal
import
Data.Typeable
import
qualified
Data.Serialize
as
Serialize
import
System.Directory
...
...
@@ -357,18 +356,11 @@ evaluate kernelState code output widgetHandler = do
-- | Compile a string and extract a value from it. Effectively extract the result of an expression
-- from inside the notebook environment.
extractValue
::
Typeable
a
=>
String
->
Interpreter
a
extractValue
expr
=
result
where
result
=
do
compiled
<-
dynCompileExpr
expr
case
fromDynamic
compiled
of
Nothing
->
error
$
"Error casting types in Evaluate.hs: "
++
showRep
(
dynTypeRep
compiled
)
++
" -> "
++
showRep
(
typeRep
result
)
Just
result
->
return
result
showRep
rep
=
show
$
map
(
tyConPackage
.
typeRepTyCon
)
$
concatMap
typeRepArgs
(
typeRepArgs
rep
)
extractValue
expr
=
do
compiled
<-
dynCompileExpr
expr
case
fromDynamic
compiled
of
Nothing
->
error
"Error casting types (Evaluate.hs): multiple IHaskell copies installed?"
Just
result
->
return
result
flushWidgetMessages
::
KernelState
->
[
WidgetMsg
]
...
...
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