Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Cloogle
cloogle.org
Commits
625bd76f
Verified
Commit
625bd76f
authored
Apr 20, 2016
by
Camil Staps
🚀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added MAX_RESULTS to not break the frontend
parent
411151ed
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
30 deletions
+5
-30
CloogleServer.icl
CloogleServer.icl
+5
-2
CloogleServer.prj
CloogleServer.prj
+0
-28
No files found.
CloogleServer.icl
View file @
625bd76f
...
...
@@ -48,6 +48,8 @@ instance < Result where (<) r1 r2 = r1.distance < r2.distance
err
::
Int
String
->
Response
err
c
m
=
{
return
=
c
,
data
=[],
msg
=
m
}
MAX_RESULTS
:==
100
Start
w
#
(
io
,
w
)
=
stdio
w
#
(
cmdline
,
w
)
=
getCommandLine
w
...
...
@@ -72,8 +74,9 @@ where
#
filters
=
catMaybes
$
[
isUnifiable
<$>
mbType
,
pure
$
isNameMatch
(
size
name
-
2
)
name
]
#
results
=
map
(
makeResult
name
mbType
)
$
findType``
filters
db
=
({
return
=
0
,
msg
=
"Success"
,
data
=
sort
results
},
w
)
#
results
=
take
MAX_RESULTS
$
sort
$
map
(
makeResult
name
mbType
)
$
findType``
filters
db
=
({
return
=
0
,
msg
=
"Success"
,
data
=
results
},
w
)
makeResult
::
String
(
Maybe
Type
)
(
FunctionLocation
,
Type
)
->
Result
makeResult
orgsearch
orgsearchtype
(
FL
lib
mod
fname
,
type
)
...
...
CloogleServer.prj
View file @
625bd76f
...
...
@@ -93,20 +93,6 @@ OtherModules
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Module
Name: Jones
Dir: {Project}/CleanTypeUnifier
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
StrictnessAnalysis: True
ListTypes: StrictExportTypes
ListAttributes: True
Warnings: True
Verbose: True
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Module
Name: Type
Dir: {Project}/CleanTypeUnifier
...
...
@@ -725,20 +711,6 @@ OtherModules
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Module
Name: StdDebug
Dir: {Application}/lib/StdEnv
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
StrictnessAnalysis: True
ListTypes: StrictExportTypes
ListAttributes: True
Warnings: True
Verbose: True
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Module
Name: StdEnum
Dir: {Application}/lib/StdEnv
...
...
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