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
e75e4463
Commit
e75e4463
authored
May 27, 2015
by
Andrew Gibiansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove debugging code (the Typeable printer)
parent
1e18f31b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
27 deletions
+0
-27
Evaluate.hs
src/IHaskell/Eval/Evaluate.hs
+0
-27
No files found.
src/IHaskell/Eval/Evaluate.hs
View file @
e75e4463
{-# LANGUAGE NoImplicitPrelude, DoAndIfThenElse, NoOverloadedStrings, TypeSynonymInstances, GADTs, CPP #-}
{-# LANGUAGE NoImplicitPrelude, DoAndIfThenElse, NoOverloadedStrings, TypeSynonymInstances, GADTs, CPP #-}
{-# LANGUAGE ScopedTypeVariables #-}
{- | Description : Wrapper around GHC API, exposing a single `evaluate` interface that runs
{- | Description : Wrapper around GHC API, exposing a single `evaluate` interface that runs
a statement, declaration, import, or directive.
a statement, declaration, import, or directive.
...
@@ -23,7 +22,6 @@ import qualified Data.ByteString as BS
...
@@ -23,7 +22,6 @@ import qualified Data.ByteString as BS
import
qualified
Data.ByteString.Lazy
as
LBS
import
qualified
Data.ByteString.Lazy
as
LBS
import
qualified
Data.ByteString.Char8
as
CBS
import
qualified
Data.ByteString.Char8
as
CBS
import
Data.Typeable.Internal
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
...
@@ -346,31 +344,6 @@ evaluate kernelState code output = do
...
@@ -346,31 +344,6 @@ evaluate kernelState code output = do
Nothing
->
error
"Error casting types in Evaluate.hs"
Nothing
->
error
"Error casting types in Evaluate.hs"
Just
result
->
return
result
Just
result
->
return
result
showTypeRep
::
TypeRep
->
String
showTypeRep
(
TypeRep
fingerprint
tycon
subs
)
=
concat
[
"TypeRep "
,
show
fingerprint
,
" "
,
show
(
tyConPackage
tycon
,
tyConModule
tycon
,
tyConName
tycon
,
tyConHash
tycon
)
,
" "
,
"["
,
intercalate
", "
(
map
showTypeRep
subs
)
,
"]"
]
{-
let expectedTypeRep = typeOf (undefined :: a)
actualTypeRep = dynTypeRep compiled
TypeRep fing1 tycon1 subs1 = expectedTypeRep
TypeRep fing2 tycon2 subs2 = actualTypeRep
in error $ concat
[ "Expecting value of type "
, showTypeRep expectedTypeRep
, " but got value of type "
, showTypeRep actualTypeRep
]
-}
safely
::
KernelState
->
Interpreter
EvalOut
->
Interpreter
EvalOut
safely
::
KernelState
->
Interpreter
EvalOut
->
Interpreter
EvalOut
safely
state
=
ghandle
handler
.
ghandle
sourceErrorHandler
safely
state
=
ghandle
handler
.
ghandle
sourceErrorHandler
where
where
...
...
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