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
C
clean-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
clean-platform
Commits
c89a2e35
Verified
Commit
c89a2e35
authored
Mar 27, 2020
by
Camil Staps
🚀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup for
!313
parent
869a14e5
Pipeline
#40620
passed with stage
in 1 minute and 57 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
14 deletions
+17
-14
src/libraries/OS-Independent/Data/Integer.dcl
src/libraries/OS-Independent/Data/Integer.dcl
+3
-3
src/libraries/OS-Independent/Data/Integer.icl
src/libraries/OS-Independent/Data/Integer.icl
+6
-4
src/libraries/OS-Independent/Data/Integer/GenJSON.dcl
src/libraries/OS-Independent/Data/Integer/GenJSON.dcl
+2
-2
src/libraries/OS-Independent/Data/Integer/GenJSON.icl
src/libraries/OS-Independent/Data/Integer/GenJSON.icl
+5
-4
tests/linux64/test.icl
tests/linux64/test.icl
+1
-1
No files found.
src/libraries/OS-Independent/Data/Integer.dcl
View file @
c89a2e35
...
...
@@ -3,10 +3,10 @@
/// Ported from the Haskell frontend by Tim Steenvoorden
definition
module
Data
.
Integer
import
StdOverloaded
from
Data
.
GenDefault
import
generic
gDefault
from
Data
.
GenLexOrd
import
generic
gLexOrd
,
::
LexOrd
from
Data
.
GenEq
import
generic
gEq
import
StdOverloade
d
from
Data
.
GenLexOrd
import
generic
gLexOrd
,
::
LexOr
d
::
Integer
=
{
integer_s
::!
Int
,
integer_a
::!.{#
Int
}};
...
...
@@ -47,6 +47,6 @@ instance toInteger String
integer_a_to_double :: !Int !{#Int} -> Real
*/
derive
gDefault
Integer
derive
gEq
Integer
derive
gLexOrd
Integer
derive
gDefault
Integer
src/libraries/OS-Independent/Data/Integer.icl
View file @
c89a2e35
...
...
@@ -1132,9 +1132,11 @@ rest_all_zeros i a
*/
gDefault
{|
Integer
|}
=
{
integer_s
=
0
,
integer_a
={}}
gEq
{|
Integer
|}
x
y
=
x
==
y
gLexOrd
{|
Integer
|}
x
y
|
x
==
y
=
'
Data
.
GenLexOrd
'.
EQ
|
x
<
y
=
'
Data
.
GenLexOrd
'.
LT
=
'
Data
.
GenLexOrd
'.
GT
gDefault
{|
Integer
|}
=
{
integer_s
=
0
,
integer_a
={}}
|
x
==
y
=
'
Data
.
GenLexOrd
'.
EQ
|
x
<
y
=
'
Data
.
GenLexOrd
'.
LT
|
otherwise
=
'
Data
.
GenLexOrd
'.
GT
src/libraries/OS-Independent/Data/Integer/GenJSON.dcl
View file @
c89a2e35
definition
module
Data
.
Integer
.
GenJSON
from
Data
.
Maybe
import
::
Maybe
from
Text
.
GenJSON
import
generic
JSONEncode
,
generic
JSONDecode
,
::
JSONNode
from
StdMaybe
import
::
Maybe
from
Data
.
Integer
import
::
Integer
from
Text
.
GenJSON
import
generic
JSONEncode
,
generic
JSONDecode
,
::
JSONNode
derive
JSONEncode
Integer
derive
JSONDecode
Integer
src/libraries/OS-Independent/Data/Integer/GenJSON.icl
View file @
c89a2e35
...
...
@@ -3,8 +3,9 @@ implementation module Data.Integer.GenJSON
import
StdEnv
import
Data
.
Integer
,
Text
.
GenJSON
JSONEncode
{|
Integer
|}
_
i
=
[
JSONInt
i
.
integer_s
,
JSONArray
[
JSONInt
c
\\
c
<-:
i
.
integer_a
]]
JSONDecode
{|
Integer
|}
_
l
=:[
JSONInt
s
,
JSONArray
a
:
rest
]
|
not
(
all
(\
x
->
x
=:(
JSONInt
_))
a
)
=
(
Nothing
,
l
)
=
(
Just
{
integer_s
=
s
,
integer_a
={
c
\\
JSONInt
c
<-
a
}},
rest
)
JSONEncode
{|
Integer
|}
_
i
=
[
JSONInt
i
.
integer_s
,
JSONArray
[
JSONInt
c
\\
c
<-:
i
.
integer_a
]]
JSONDecode
{|
Integer
|}
_
l
=:[
JSONInt
s
,
JSONArray
a
:
rest
]
|
not
(
all
(\
x
->
x
=:(
JSONInt
_))
a
)
=
(
Nothing
,
l
)
=
(
Just
{
integer_s
=
s
,
integer_a
={
c
\\
JSONInt
c
<-
a
}},
rest
)
JSONDecode
{|
Integer
|}
_
l
=
(
Nothing
,
l
)
tests/linux64/test.icl
View file @
c89a2e35
...
...
@@ -114,9 +114,9 @@ import qualified Data.IntSet
import
qualified
Data
.
IntSet
.
Base
import
qualified
Data
.
Int
import
qualified
Data
.
Integer
import
qualified
Data
.
Integer
.
GenJSON
import
qualified
Data
.
Integer
.
Add
import
qualified
Data
.
Integer
.
Div
import
qualified
Data
.
Integer
.
GenJSON
import
qualified
Data
.
Integer
.
Mul
import
qualified
Data
.
Integer
.
ToInteger
import
qualified
Data
.
Integer
.
ToString
...
...
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