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
2de73f6e
Commit
2de73f6e
authored
Jan 04, 2014
by
Andrew Gibiansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing slow evaluation of displayable data (b/c it was printing)
parent
c23435f0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
16 deletions
+16
-16
profile.tar
profile/profile.tar
+0
-0
Completion.hs
src/IHaskell/Eval/Completion.hs
+8
-14
Evaluate.hs
src/IHaskell/Eval/Evaluate.hs
+1
-1
Types.hs
src/IHaskell/Types.hs
+7
-1
No files found.
profile/profile.tar
View file @
2de73f6e
No preview for this file type
src/IHaskell/Eval/Completion.hs
View file @
2de73f6e
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings #-}
{- | Description : generates tab-completion options
context-insensitive completion for what is probably
the identifier under the cursor.
[@Known issues@]
> import Data.Lef<tab>
> System.IO.h<tab>
> Just.he<tab>
The first should not complete to Left. The second should only
include things like System.IO.hPutStrLn, not head. Qualified
names should not be confused by the third option.
{- |
Description : Generates tab completion options.
This has a limited amount of context sensitivity. It distinguishes between four contexts at the moment:
- import statements (completed using modules)
- identifiers (completed using in scope values)
- extensions via :ext (completed using GHC extensions)
- qualified identifiers (completed using in-scope values)
-}
module
IHaskell.Eval.Completion
(
complete
,
completionTarget
,
completionType
,
CompletionType
(
..
))
where
...
...
src/IHaskell/Eval/Evaluate.hs
View file @
2de73f6e
...
...
@@ -499,7 +499,7 @@ evalCommand output (Expression expr) state = do
-- back gives very strange errors - all the types match but it
-- refuses to decode back into a [DisplayData].
-- Suppress output, so as not to mess up console.
capturedStatement
(
const
$
return
()
)
displayExpr
out
<-
capturedStatement
(
const
$
return
()
)
displayExpr
displayedBytestring
<-
dynCompileExpr
"IHaskell.Display.serializeDisplay it"
case
fromDynamic
displayedBytestring
of
...
...
src/IHaskell/Types.hs
View file @
2de73f6e
...
...
@@ -301,7 +301,13 @@ instance Show ExecuteReplyStatus where
data
ExecutionState
=
Busy
|
Idle
|
Starting
deriving
Show
-- | Data for display: a string with associated MIME type.
data
DisplayData
=
Display
MimeType
String
deriving
(
Show
,
Typeable
,
Generic
)
data
DisplayData
=
Display
MimeType
String
deriving
(
Typeable
,
Generic
)
-- We can't print the actual data, otherwise this will be printed every
-- time it gets computed because of the way the evaluator is structured.
-- See how `displayExpr` is computed.
instance
Show
DisplayData
where
show
_
=
"Display"
-- Allow DisplayData serialization
instance
Serialize
DisplayData
...
...
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