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
c30de057
Commit
c30de057
authored
May 18, 2014
by
Andrew Gibiansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allowing two type signatures together
parent
9b95c5e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
Test.ipynb
notebooks/Test.ipynb
+10
-4
Parser.hs
src/IHaskell/Eval/Parser.hs
+8
-0
No files found.
notebooks/Test.ipynb
View file @
c30de057
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
"cell_type": "code",
"cell_type": "code",
"collapsed": false,
"collapsed": false,
"input": [
"input": [
":ext
Impli
\n",
":ext
NoImplicitPrelude
\n",
"4 + 4"
"4 + 4"
],
],
"language": "python",
"language": "python",
...
@@ -45,14 +45,18 @@
...
@@ -45,14 +45,18 @@
},
},
"outputs": [
"outputs": [
{
{
"html": [
"<span class='err-msg'>Not in scope: `+'<br/>Perhaps you meant `IHaskellPrelude.+' (imported from Prelude)</span>"
],
"metadata": {},
"metadata": {},
"output_type": "display_data",
"output_type": "display_data",
"text": [
"text": [
"8"
"Not in scope: `+'\n",
"Perhaps you meant `IHaskellPrelude.+' (imported from Prelude)"
]
]
}
}
],
],
"prompt_number":
2
"prompt_number":
3
},
},
{
{
"cell_type": "code",
"cell_type": "code",
...
@@ -96,7 +100,9 @@
...
@@ -96,7 +100,9 @@
"parser"
"parser"
],
],
"language": "python",
"language": "python",
"metadata": {},
"metadata": {
"hidden": false
},
"outputs": [
"outputs": [
{
{
"javascript": [
"javascript": [
...
...
src/IHaskell/Eval/Parser.hs
View file @
c30de057
...
@@ -218,6 +218,14 @@ joinFunctions (Located line (TypeSignature sig) : Located dl (Declaration decl)
...
@@ -218,6 +218,14 @@ joinFunctions (Located line (TypeSignature sig) : Located dl (Declaration decl)
Located
line
(
Declaration
$
sig
++
"
\n
"
++
joinedDecl
)
:
remaining
Located
line
(
Declaration
$
sig
++
"
\n
"
++
joinedDecl
)
:
remaining
where
Located
_
(
Declaration
joinedDecl
)
:
remaining
=
joinFunctions
$
Located
dl
(
Declaration
decl
)
:
rest
where
Located
_
(
Declaration
joinedDecl
)
:
remaining
=
joinFunctions
$
Located
dl
(
Declaration
decl
)
:
rest
-- Also allow two type signatures. This is necessary for operator
-- declarations in which you have a fixity declaration.
joinFunctions
(
Located
line
(
TypeSignature
sig
)
:
Located
_
(
TypeSignature
sig'
)
:
Located
dl
(
Declaration
decl
)
:
rest
)
=
Located
line
(
Declaration
$
intercalate
"
\n
"
[
sig
,
sig'
,
joinedDecl
])
:
remaining
where
Located
_
(
Declaration
joinedDecl
)
:
remaining
=
joinFunctions
$
Located
dl
(
Declaration
decl
)
:
rest
joinFunctions
(
x
:
xs
)
=
x
:
joinFunctions
xs
joinFunctions
(
x
:
xs
)
=
x
:
joinFunctions
xs
joinFunctions
[]
=
[]
joinFunctions
[]
=
[]
...
...
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