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
38e06483
Commit
38e06483
authored
Feb 01, 2017
by
Camil Staps
🚀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also store constructor functions of builtin types
parent
b6f725f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
22 deletions
+36
-22
builddb.icl
builddb.icl
+36
-22
No files found.
builddb.icl
View file @
38e06483
...
...
@@ -122,6 +122,8 @@ Start w
#
db
=
'
DB
'.
putFunctions
predefFunctions
db
#
db
=
'
DB
'.
putClasses
predefClasses
db
#
db
=
'
DB
'.
putTypes
predefTypes
db
#
db
=
'
DB
'.
putFunctions
(
flatten
$
map
constructor_functions
predefTypes
)
db
#
db
=
'
DB
'.
putFunctions
(
flatten
$
map
record_functions
predefTypes
)
db
#
io
=
stderr
#
io
=
printStats
db
io
#
(
ok1
,
w
)
=
fclose
io
w
...
...
@@ -380,28 +382,6 @@ where
[
LinePos
_
l
:_]
=
Just
l
_
=
Nothing
constructor_functions
::
('
DB
'.
Location
,
'
DB
'.
TypeDef
)
->
[('
DB
'.
Location
,
'
DB
'.
ExtendedType
)]
constructor_functions
('
DB
'.
Location
lib
mod
line
iclline
_,
td
)
=
[('
DB
'.
Location
lib
mod
line
iclline
c
,
'
DB
'.
ET
f
{
zero
&
te_isconstructor
=
True
,
te_representation
=
Just
$
concat
$
[
c
]
++
print_prio
p
++
[
" :: "
]
++
print
False
f
,
te_priority
=
p
})
\\
(
c
,
f
,
p
)
<-
'T'
.
constructorsToFunctions
td
]
where
print_prio
::
(
Maybe
'T'
.
Priority
)
->
[
String
]
print_prio
Nothing
=
[]
print_prio
(
Just
p
)
=
[
" "
]
++
print
False
p
record_functions
::
('
DB
'.
Location
,
'
DB
'.
TypeDef
)
->
[('
DB
'.
Location
,
'
DB
'.
ExtendedType
)]
record_functions
('
DB
'.
Location
lib
mod
line
iclline
_,
td
)
=
[('
DB
'.
Location
lib
mod
line
iclline
f
,
'
DB
'.
ET
t
{
zero
&
te_isrecordfield
=
True
,
te_representation
=
Just
$
concat
$
[
"."
,
f
,
" :: "
:
print
False
t
]})
\\
(
f
,
t
)
<-
'T'
.
recordsToFunctions
td
]
toLine
::
Position
->
'
DB
'.
LineNr
toLine
(
FunPos
_
l
_)
=
Just
l
toLine
(
LinePos
_
l
)
=
Just
l
...
...
@@ -420,6 +400,40 @@ where
|
not
ok
=
(
Left
$
"Couldn't open "
+++
filename
,
cache
,
w
)
=
(
Right
pm
,
cache
,
w
)
constructor_functions
::
('
DB
'.
Location
,
'
DB
'.
TypeDef
)
->
[('
DB
'.
Location
,
'
DB
'.
ExtendedType
)]
constructor_functions
('
DB
'.
Builtin
_,
td
)
=
[('
DB
'.
Builtin
c
,
'
DB
'.
ET
f
{
zero
&
te_isconstructor
=
True
,
te_representation
=
Just
$
concat
$
[
c
]
++
print_prio
p
++
[
" :: "
]
++
print
False
f
,
te_priority
=
p
})
\\
(
c
,
f
,
p
)
<-
'T'
.
constructorsToFunctions
td
]
constructor_functions
('
DB
'.
Location
lib
mod
line
iclline
_,
td
)
=
[('
DB
'.
Location
lib
mod
line
iclline
c
,
'
DB
'.
ET
f
{
zero
&
te_isconstructor
=
True
,
te_representation
=
Just
$
concat
$
[
c
]
++
print_prio
p
++
[
" :: "
]
++
print
False
f
,
te_priority
=
p
})
\\
(
c
,
f
,
p
)
<-
'T'
.
constructorsToFunctions
td
]
print_prio
::
(
Maybe
'T'
.
Priority
)
->
[
String
]
print_prio
Nothing
=
[]
print_prio
(
Just
p
)
=
[
" "
]
++
print
False
p
record_functions
::
('
DB
'.
Location
,
'
DB
'.
TypeDef
)
->
[('
DB
'.
Location
,
'
DB
'.
ExtendedType
)]
record_functions
('
DB
'.
Builtin
_,
td
)
=
[('
DB
'.
Builtin
f
,
'
DB
'.
ET
t
{
zero
&
te_isrecordfield
=
True
,
te_representation
=
Just
$
concat
$
[
"."
,
f
,
" :: "
:
print
False
t
]})
\\
(
f
,
t
)
<-
'T'
.
recordsToFunctions
td
]
record_functions
('
DB
'.
Location
lib
mod
line
iclline
_,
td
)
=
[('
DB
'.
Location
lib
mod
line
iclline
f
,
'
DB
'.
ET
t
{
zero
&
te_isrecordfield
=
True
,
te_representation
=
Just
$
concat
$
[
"."
,
f
,
" :: "
:
print
False
t
]})
\\
(
f
,
t
)
<-
'T'
.
recordsToFunctions
td
]
wantModule`
::
!*
File
!{#
Char
}
!
Bool
!
Ident
!
Position
!
Bool
!*
HashTable
!*
File
!*
Files
->
((!
Bool
,!
Bool
,!
ParsedModule
,
!*
HashTable
,
!*
File
),
!*
Files
)
wantModule`
f
s
b1
i
p
b2
ht
io
fs
...
...
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