Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Cloogle
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cloogle
Cloogle
Commits
4d1840ea
Verified
Commit
4d1840ea
authored
Oct 05, 2017
by
Camil Staps
🚀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix previous commit
parent
610f4425
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
19 deletions
+27
-19
CloogleDB.dcl
CloogleDB.dcl
+1
-0
CloogleDB.icl
CloogleDB.icl
+4
-0
CloogleDBFactory.icl
CloogleDBFactory.icl
+22
-19
No files found.
CloogleDB.dcl
View file @
4d1840ea
...
...
@@ -142,6 +142,7 @@ instance == Location
instance
print
(
Name
,
FunctionEntry
)
getName
::
Location
->
Name
setName
::
Name
Location
->
Location
isBuiltin
::
Location
->
Bool
isCore
::
Location
CloogleDB
->
Bool
isApp
::
Location
CloogleDB
->
Bool
...
...
CloogleDB.icl
View file @
4d1840ea
...
...
@@ -139,6 +139,10 @@ getName :: Location -> Name
getName
(
Location
_
_
_
_
name
)
=
name
getName
(
Builtin
name
_)
=
name
setName
::
Name
Location
->
Location
setName
n
(
Location
lib
mod
dcl
icl
_)
=
Location
lib
mod
dcl
icl
n
setName
n
(
Builtin
_
doc
)
=
Builtin
n
doc
isBuiltin
::
Location
->
Bool
isBuiltin
(
Builtin
_
_)
=
True
isBuiltin
_
=
False
...
...
CloogleDBFactory.icl
View file @
4d1840ea
...
...
@@ -143,35 +143,38 @@ indexModule :: !String !'DB'.Module !'DB'.Library !(String 'DB'.ModuleEntry -> '
->
*(!
TemporaryDB
,
!*
World
)
indexModule
root
mod
lib
modf
db
w
#!
(
functions
,
macros
,
generics
,
confuns
,
recfuns
,
typedefs
,
clss
,
insts
,
derivs
,
clsderivs
,
(
modname
,
modentry
),
w
)
=
findModuleContents
root
w
=
findModuleContents
(
root
</>
lib
</>
mkdir
mod
)
w
#!
lib
=
lib
%
(
0
,
size
lib
-
size
modname
+
size
mod
-
1
)
#!
db
=
{
db
&
temp_functions
=
[
castLocFst
functions
,
castLocFst
macros
,
castLocFst
generics
,
castLocFst
confuns
,
castLocFst
recfuns
[
castLocFst
modname
functions
,
castLocFst
m
odname
m
acros
,
castLocFst
modname
generics
,
castLocFst
modname
confuns
,
castLocFst
modname
recfuns
:
db
.
temp_functions
]
,
temp_classes
=
[
castLocFst
clss
:
db
.
temp_classes
]
,
temp_types
=
[
castLocFst
typedefs
:
db
.
temp_types
]
,
temp_instances
=
[
castLocThd3
insts
:
db
.
temp_instances
]
,
temp_derivations
=
[
map
(
appSnd
castLocThd3
)
derivs
:
db
.
temp_derivations
]
,
temp_class_derivations
=
[
castLocFrth
clsderivs
:
db
.
temp_class_derivations
]
,
temp_classes
=
[
castLocFst
modname
clss
:
db
.
temp_classes
]
,
temp_types
=
[
castLocFst
modname
typedefs
:
db
.
temp_types
]
,
temp_instances
=
[
castLocThd3
modname
insts
:
db
.
temp_instances
]
,
temp_derivations
=
[
map
(
appSnd
(
castLocThd3
modname
)
)
derivs
:
db
.
temp_derivations
]
,
temp_class_derivations
=
[
castLocFrth
modname
clsderivs
:
db
.
temp_class_derivations
]
,
temp_modules
=
[(
lib
,
modname
,
modf
mod
modentry
):
db
.
temp_modules
]
}
=
(
db
,
w
)
where
castLocFst
::
([(
LocationInFile
,
a
)]
->
[('
DB
'.
Location
,
a
)])
castLocFst
=
map
(
appFst
castLoc
)
castLocThd3
::
([(
a
,
b
,
LocationInFile
)]
->
[(
a
,
b
,
'
DB
'.
Location
)])
castLocThd3
=
map
(
appThd3
castLoc
)
castLocFrth
=
map
(\(
a
,
b
,
c
,
l
)
->
(
a
,
b
,
c
,
castLoc
l
))
castLoc
::
LocationInFile
->
'
DB
'.
Location
castLoc
l
=
'
DB
'.
Location
lib
mod
l
.
dcl_line
l
.
icl_line
(
fromJust
(
l
.
name
<|>
Just
""
))
// TODO
castLocFst
::
String
->
([(
LocationInFile
,
a
)]
->
[('
DB
'.
Location
,
a
)])
castLocFst
m
=
map
(
appFst
(
castLoc
m
))
castLocThd3
::
String
->
([(
a
,
b
,
LocationInFile
)]
->
[(
a
,
b
,
'
DB
'.
Location
)])
castLocThd3
m
=
map
(
appThd3
(
castLoc
m
))
castLocFrth
m
=
map
(\(
a
,
b
,
c
,
l
)
->
(
a
,
b
,
c
,
castLoc
m
l
))
castLoc
::
String
LocationInFile
->
'
DB
'.
Location
castLoc
m
l
=
'
DB
'.
Location
lib
m
l
.
dcl_line
l
.
icl_line
(
fromJust
(
l
.
name
<|>
Just
""
))
// TODO
mkdir
::
String
->
String
mkdir
s
=
{
if
(
c
==
'.'
)
'/'
c
\\
c
<-:
s
}
findModuleContents
::
!
String
!*
World
->
*(
![(
LocationInFile
,
'
DB
'.
FunctionEntry
)]
...
...
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