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
fd2a2ef2
Commit
fd2a2ef2
authored
Jan 06, 2014
by
Eyal Dechter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More clean up.
parent
368dd190
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
+13
-7
IHaskell.cabal
IHaskell.cabal
+2
-0
Hspec.hs
src/Hspec.hs
+10
-4
Completion.hs
src/IHaskell/Eval/Completion.hs
+1
-3
No files found.
IHaskell.cabal
View file @
fd2a2ef2
...
...
@@ -73,6 +73,7 @@ library
directory,
here,
system-filepath,
filemanip,
filepath,
cereal ==0.3.*,
text >=0.11,
...
...
@@ -133,6 +134,7 @@ executable IHaskell
directory,
here,
system-filepath,
filemanip,
filepath,
cereal ==0.3.*,
text >=0.11,
...
...
src/Hspec.hs
View file @
fd2a2ef2
...
...
@@ -18,8 +18,12 @@ import IHaskell.Eval.Parser
import
IHaskell.Types
import
IHaskell.IPython
import
IHaskell.Eval.Evaluate
as
Eval
hiding
(
liftIO
)
import
qualified
IHaskell.Eval.Evaluate
as
Eval
(
liftIO
)
import
IHaskell.Eval.Completion
import
Debug.Trace
import
Test.Hspec
import
Test.Hspec.HUnit
...
...
@@ -162,15 +166,17 @@ completionTests = do
withHsDirectory
$
\
dirPath
->
let
loading
xs
=
":load "
++
encodeString
xs
paths
xs
=
map
encodeString
xs
completionHas'
=
completionHas_
$
Eval
.
evaluate
defaultKernelState
(
":! cd "
++
dirPath
)
(
\
b
d
->
return
()
)
completionHas'
=
completionHas_
$
do
Eval
.
evaluate
defaultKernelState
(
":! cd "
++
dirPath
)
(
\
b
d
->
return
()
)
in
liftIO
$
do
loading
(
"dir"
</>
"file!"
)
`
completionHas'
`
paths
[
"dir"
</>
"file2.hs"
,
"dir"
</>
"file2.lhs"
]
loading
(
""
</>
"file1!"
)
`
completionHas'
`
paths
[
""
</>
"file1.hs"
,
""
</>
"file1.lhs"
]
evalTests
=
do
describe
"Code Evaluation"
$
do
it
"evaluates expressions"
$
do
...
...
@@ -425,4 +431,4 @@ parseStringTests = describe "Parser" $ do
second
|]
>>=
(`
shouldBe
`
[
Located
2
(
Expression
"first"
),
Located
4
(
Expression
"second"
)])
\ No newline at end of file
Located
4
(
Expression
"second"
)])
src/IHaskell/Eval/Completion.hs
View file @
fd2a2ef2
...
...
@@ -192,6 +192,4 @@ completePath currDir exts prefix
cut
(
x
:
xs
)
z
@
(
y
:
ys
)
|
x
==
y
=
cut
xs
ys
|
otherwise
=
z
cut
_
z
=
z
in
relativeCompletions
in
relativeCompletions
\ No newline at end of file
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