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
4f92c0b3
Commit
4f92c0b3
authored
11 years ago
by
Andrew Gibiansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
many updates to demo nb
parent
dbb5b393
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
226 additions
and
10 deletions
+226
-10
IHaskell.ipynb
IHaskell.ipynb
+222
-8
Evaluate.hs
src/IHaskell/Eval/Evaluate.hs
+4
-2
No files found.
IHaskell.ipynb
View file @
4f92c0b3
This diff is collapsed.
Click to expand it.
src/IHaskell/Eval/Evaluate.hs
View file @
4f92c0b3
...
...
@@ -652,6 +652,10 @@ evalCommand output (Statement stmt) state = wrapExecution state $ do
evalCommand
output
(
Expression
expr
)
state
=
do
write
$
"Expression:
\n
"
++
expr
-- Check if we can display this.
let
displayExpr
=
printf
"(IHaskell.Display.display (%s))"
expr
::
String
canRunDisplay
<-
attempt
$
exprType
displayExpr
-- Evaluate this expression as though it's just a statement.
-- The output is bound to 'it', so we can then use it.
evalOut
<-
evalCommand
output
(
Statement
expr
)
state
...
...
@@ -660,8 +664,6 @@ evalCommand output (Expression expr) state = do
-- DisplayData. If typechecking fails and there is no appropriate
-- typeclass instance, this will throw an exception and thus `attempt` will
-- return False, and we just resort to plaintext.
let
displayExpr
=
printf
"(IHaskell.Display.display (%s))"
expr
::
String
canRunDisplay
<-
attempt
$
exprType
displayExpr
let
out
=
evalResult
evalOut
showErr
=
isShowError
out
write
$
printf
"%s: Attempting %s"
(
if
canRunDisplay
then
"Success"
else
"Failure"
)
displayExpr
...
...
This diff is collapsed.
Click to expand it.
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