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
S
StdEnv-doc
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cloogle
StdEnv-doc
Commits
d644e7f3
Commit
d644e7f3
authored
Jun 26, 2019
by
johnvg@science.ru.nl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add strictness annotations to instances of == and < for tuples
parent
7ed30c4c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
StdTuple.dcl
StdTuple.dcl
+4
-4
StdTuple.icl
StdTuple.icl
+4
-4
No files found.
StdTuple.dcl
View file @
d644e7f3
...
...
@@ -19,11 +19,11 @@ snd3 tuple :== t2 where (_, t2, _) = tuple
// thd3 :: !(.a,.b,!.c) -> .c // t3 of (t1,t2,t3)
thd3
tuple
:==
t3
where
(_,
_,
t3
)
=
tuple
instance
==
(
a
,
b
)
|
Eq
a
&
Eq
b
instance
==
(
a
,
b
,
c
)
|
Eq
a
&
Eq
b
&
Eq
c
instance
==
(
a
,
b
)
|
Eq
a
&
Eq
b
::
!(!
a
,
b
)
!(!
a
,
b
)
->
Bool
|
Eq
a
&
Eq
b
instance
==
(
a
,
b
,
c
)
|
Eq
a
&
Eq
b
&
Eq
c
::
!(!
a
,
b
,
c
)
!(!
a
,
b
,
c
)
->
Bool
|
Eq
a
&
Eq
b
&
Eq
c
instance
<
(
a
,
b
)
|
Ord
a
&
Ord
b
instance
<
(
a
,
b
,
c
)
|
Ord
a
&
Ord
b
&
Ord
c
instance
<
(
a
,
b
)
|
Ord
a
&
Ord
b
::
!(!
a
,
b
)
!(!
a
,
b
)
->
Bool
|
Ord
a
&
Ord
b
instance
<
(
a
,
b
,
c
)
|
Ord
a
&
Ord
b
&
Ord
c
::
!(!
a
,
b
,
c
)
!(!
a
,
b
,
c
)
->
Bool
|
Ord
a
&
Ord
b
&
Ord
c
app2
::
!(.(.
a
->
.
b
),.(.
c
->
.
d
))
!(.
a
,.
c
)
->
(.
b
,.
d
)
// app2 (f,g) (a,b) = (f a,g b)
app3
::
!(.(.
a
->
.
b
),.(.
c
->
.
d
),.(.
e
->
.
f
))
!(.
a
,.
c
,.
e
)
->
(.
b
,.
d
,.
f
)
...
...
StdTuple.icl
View file @
d644e7f3
...
...
@@ -23,17 +23,17 @@ thd3 tuple :== t3 where (_, _, t3) = tuple
instance
==
(
a
,
b
)
|
Eq
a
&
Eq
b
where
(==)
::!(
a
,
b
)
!(
a
,
b
)
->
Bool
|
Eq
a
&
Eq
b
(==)
::!(
!
a
,
b
)
!(!
a
,
b
)
->
Bool
|
Eq
a
&
Eq
b
(==)
(
x1
,
y1
)
(
x2
,
y2
)
=
x1
==
x2
&&
y1
==
y2
instance
==
(
a
,
b
,
c
)
|
Eq
a
&
Eq
b
&
Eq
c
where
(==)
::!(
a
,
b
,
c
)
!(
a
,
b
,
c
)
->
Bool
|
Eq
a
&
Eq
b
&
Eq
c
(==)
::!(
!
a
,
b
,
c
)
!(!
a
,
b
,
c
)
->
Bool
|
Eq
a
&
Eq
b
&
Eq
c
(==)
(
x1
,
y1
,
z1
)
(
x2
,
y2
,
z2
)
=
x1
==
x2
&&
y1
==
y2
&&
z1
==
z2
instance
<
(
a
,
b
)
|
Ord
a
&
Ord
b
where
(<)
::!(
a
,
b
)
!(
a
,
b
)
->
Bool
|
Ord
a
&
Ord
b
(<)
::!(
!
a
,
b
)
!(!
a
,
b
)
->
Bool
|
Ord
a
&
Ord
b
(<)
(
x1
,
y1
)
(
x2
,
y2
)
|
x1
<
x2
=
True
...
...
@@ -44,7 +44,7 @@ instance < (a,b) | Ord a & Ord b
instance
<
(
a
,
b
,
c
)
|
Ord
a
&
Ord
b
&
Ord
c
where
(<)
::!(
a
,
b
,
c
)
!(
a
,
b
,
c
)
->
Bool
|
Ord
a
&
Ord
b
&
Ord
c
(<)
::!(
!
a
,
b
,
c
)
!(!
a
,
b
,
c
)
->
Bool
|
Ord
a
&
Ord
b
&
Ord
c
(<)
(
x1
,
y1
,
z1
)
(
x2
,
y2
,
z2
)
|
x1
<
x2
=
True
...
...
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