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
d87d7e72
Commit
d87d7e72
authored
Jun 12, 2014
by
Andrew Gibiansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated tests and parser to 7.8
parent
b748c5b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
Hspec.hs
src/Hspec.hs
+5
-1
Evaluate.hs
src/IHaskell/Eval/Evaluate.hs
+4
-1
Parser.hs
src/IHaskell/Eval/Parser.hs
+1
-1
No files found.
src/Hspec.hs
View file @
d87d7e72
{-# LANGUAGE QuasiQuotes, OverloadedStrings, ExtendedDefaultRules #-}
{-# LANGUAGE QuasiQuotes, OverloadedStrings, ExtendedDefaultRules
, CPP
#-}
-- Keep all the language pragmas here so it can be compiled separately.
module
Main
where
import
Prelude
...
...
@@ -500,7 +500,11 @@ parseStringTests = describe "Parser" $ do
it
"breaks without data kinds"
$
parses
"data X = 3"
`
like
`
[
#
if
MIN_VERSION_ghc
(
7
,
8
,
0
)
ParseError
(
Loc
1
10
)
"Illegal literal in type (use DataKinds to enable): 3"
#
else
ParseError
(
Loc
1
10
)
"Illegal literal in type (use -XDataKinds to enable): 3"
#
endif
]
it
"parses statements after imports"
$
do
...
...
src/IHaskell/Eval/Evaluate.hs
View file @
d87d7e72
...
...
@@ -78,7 +78,7 @@ import Data.Version (versionBranch)
data
ErrorOccurred
=
Success
|
Failure
deriving
(
Show
,
Eq
)
debug
::
Bool
debug
=
Fals
e
debug
=
Tru
e
ignoreTypePrefixes
::
[
String
]
ignoreTypePrefixes
=
[
"GHC.Types"
,
"GHC.Base"
,
"GHC.Show"
,
"System.IO"
,
...
...
@@ -705,6 +705,9 @@ evalCommand output (Expression expr) state = do
let
widgetExpr
=
printf
"(IHaskell.Display.Widget (%s))"
expr
::
String
isWidget
<-
attempt
$
exprType
widgetExpr
write
$
"Can Display: "
++
show
canRunDisplay
write
$
" Is Widget: "
++
show
canRunDisplay
if
canRunDisplay
then
do
-- Use the display. As a result, `it` is set to the output.
...
...
src/IHaskell/Eval/Parser.hs
View file @
d87d7e72
...
...
@@ -175,8 +175,8 @@ parseCodeChunk code startLine = do
parsers
flags
=
[
(
Import
,
unparser
parserImport
)
,
(
TypeSignature
,
unparser
parserTypeSignature
)
,
(
Declaration
,
unparser
parserDeclaration
)
,
(
Statement
,
unparser
parserStatement
)
,
(
Declaration
,
unparser
parserDeclaration
)
]
where
unparser
::
Parser
a
->
String
->
ParseOutput
String
...
...
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