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
c8bb92f8
Commit
c8bb92f8
authored
Feb 24, 2015
by
Ben Gamari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Parser: Only parse code as module if it is named
parent
db637506
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Parser.hs
src/IHaskell/Eval/Parser.hs
+2
-2
No files found.
src/IHaskell/Eval/Parser.hs
View file @
c8bb92f8
...
@@ -84,8 +84,8 @@ parseString codeString = do
...
@@ -84,8 +84,8 @@ parseString codeString = do
flags
<-
getSessionDynFlags
flags
<-
getSessionDynFlags
let
output
=
runParser
flags
parserModule
codeString
let
output
=
runParser
flags
parserModule
codeString
case
output
of
case
output
of
Parsed
{}
->
return
[
Located
1
$
Module
codeString
]
Parsed
mod
|
Just
_
<-
hsmodName
(
unLoc
mod
)
->
return
[
Located
1
$
Module
codeString
]
Failure
{}
->
do
_
->
do
-- Split input into chunks based on indentation.
-- Split input into chunks based on indentation.
let
chunks
=
layoutChunks
$
removeComments
codeString
let
chunks
=
layoutChunks
$
removeComments
codeString
result
<-
joinFunctions
<$>
processChunks
[]
chunks
result
<-
joinFunctions
<$>
processChunks
[]
chunks
...
...
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