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
a5d48548
Commit
a5d48548
authored
Jun 08, 2016
by
Andrew Gibiansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
travis 12
parent
54340af9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
8 deletions
+16
-8
.travis.yml
.travis.yml
+3
-1
Evaluate.hs
src/IHaskell/Eval/Evaluate.hs
+13
-5
stack.yaml
stack.yaml
+0
-2
No files found.
.travis.yml
View file @
a5d48548
...
...
@@ -55,9 +55,11 @@ install:
-
stack setup --resolver=$RESOLVER
-
stack build --dependencies-only --resolver=$RESOLVER
# For verify_formatting.py
-
if $FORMATTING; then stack install hindent; fi
script
:
-
export LD_LIBRARY_PATH=$HOME/zeromq/lib
-
stack build --resolver=$RESOLVER
-
stack test --resolver=$RESOLVER
-
if $FORMATTING; then ./verify_formatting.py; fi
-
|
...
...
src/IHaskell/Eval/Evaluate.hs
View file @
a5d48548
...
...
@@ -30,6 +30,7 @@ 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
...
...
@@ -356,11 +357,18 @@ 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
=
do
compiled
<-
dynCompileExpr
expr
case
fromDynamic
compiled
of
Nothing
->
error
"Error casting types in Evaluate.hs"
Just
result
->
return
result
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
)
flushWidgetMessages
::
KernelState
->
[
WidgetMsg
]
...
...
stack.yaml
View file @
a5d48548
...
...
@@ -4,5 +4,3 @@ packages:
-
'
./ipython-kernel'
-
'
./ghc-parser'
resolver
:
lts-6.2
extra-deps
:
-
system-argv0-0.1.1
# Necessary for LTS 2.22 (GHC 7.8)
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