Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-ide
Commits
3a153dc9
Commit
3a153dc9
authored
Feb 12, 2002
by
Diederik van Arkel
Browse files
Remove unused strictness annotations
parent
449c3d5a
Changes
65
Hide whitespace changes
Inline
Side-by-side
Util/UtilStrictLists.icl
View file @
3a153dc9
...
...
@@ -4,7 +4,7 @@ import StdArray, StdBool, StdClass, StdInt, StdList, StdMisc, StdOrdList, StdStr
// A strict list data structure
::
List
t
=
(:!)
infixr
0
!
t
(
!
List
t
)
::
List
t
=
(:!)
infixr
0
!
t
!
(
List
t
)
|
Nil
instance
toString
(
List
a
)
|
toString
a
...
...
@@ -28,7 +28,7 @@ Head :: !(List t) -> t;
Head
(
h
:!
t
)
=
h
;
Head
list
=
abort
"Head: Empty list"
;
Concat
::
!(
List
.
t
)
!
u
:(
List
.
t
)
->
!
u
:
List
.
t
;
Concat
::
!(
List
.
t
)
!
u
:(
List
.
t
)
->
u
:
List
.
t
;
Concat
(
x
:!
xs
)
ys
#!
xs
=
Concat
xs
ys
;
=
x
:!
xs
;
...
...
@@ -49,7 +49,7 @@ Length2 :: !Int !(List t) -> Int;
Length2
n
Nil
=
n
;
Length2
n
(
f
:!
r
)
=
Length2
(
inc
n
)
r
;
Filter
::
(
!
s
->
Bool
)
!(
List
s
)
->
List
s
;
Filter
::
!
(
s
->
Bool
)
!(
List
s
)
->
List
s
;
Filter
_
Nil
=
Nil
;
Filter
p
(
h
:!
t
)
...
...
@@ -58,10 +58,10 @@ Filter p (h :! t)
// otherwise
=
Filter
p
t
;
FilterR
::
(
!
s
->
Bool
)
!(
List
s
)
->
List
s
;
FilterR
::
!
(
s
->
Bool
)
!(
List
s
)
->
List
s
;
FilterR
p
list
=
FilterR2
p
list
Nil
;
FilterR2
::
(
!
s
->
Bool
)
!(
List
s
)
!(
List
s
)
->
List
s
;
FilterR2
::
!
(
s
->
Bool
)
!(
List
s
)
!(
List
s
)
->
List
s
;
FilterR2
p
Nil
acc
=
acc
;
FilterR2
p
(
x
:!
xs
)
acc
|
p
x
=
FilterR2
p
xs
(
x
:!
acc
);
=
FilterR2
p
xs
acc
;
...
...
@@ -93,14 +93,14 @@ FlattenList :: !(List (List .a)) -> List .a;
FlattenList
(
h
:!
t
)
=
AppendLists
h
(
FlattenList
t
);
FlattenList
Nil
=
Nil
;
P_MapR
::
!(
!
s
->
(
!
t
,
!
Bool
))
!(
List
s
)
->
(!
List
t
,!
Bool
)
P_MapR
::
!(
s
->
(
t
,
Bool
))
!(
List
s
)
->
(!
List
t
,!
Bool
)
P_MapR
f
Nil
=
(
Nil
,
True
)
P_MapR
f
(
x
:!
xs
)
#
(
fx
,
b
)
=
f
x
=
P_MapR2
b
f
xs
fx
Nil
where
P_MapR2
::
!
Bool
!(
!
s
->
(
!
t
,
!
Bool
))
!(
List
s
)
!
t
!(
List
t
)
->
(!
List
t
,!
Bool
)
P_MapR2
::
!
Bool
!(
s
->
(
t
,
Bool
))
!(
List
s
)
!
t
!(
List
t
)
->
(!
List
t
,!
Bool
)
P_MapR2
unchanged
f
Nil
first
acc
=
(
first
:!
acc
,
unchanged
)
P_MapR2
unchanged
f
(
x
:!
xs
)
first
acc
...
...
@@ -181,14 +181,14 @@ ListToStrictList :: ![.a] -> (List .a);
ListToStrictList
list
=
foldr
(:!)
Nil
list
;
// RWS: wrong line number (change foldr to foldl)
Map
::
!(
!
s
->
t
)
!(
List
s
)
->
List
t
;
Map
::
!(
s
->
t
)
!(
List
s
)
->
List
t
;
Map
f
(
a
:!
x
)
=
(
f
a
:!
Map
f
x
)
Map
f
Nil
=
Nil
MapR
::
!(
!
s
->
t
)
!(
List
s
)
->
List
t
;
MapR
::
!(
s
->
t
)
!(
List
s
)
->
List
t
;
MapR
f
list
=
MapR2
f
list
Nil
;
MapR2
::
(
!
s
->
t
)
!(
List
s
)
!(
List
t
)
->
List
t
;
MapR2
::
(
s
->
t
)
!(
List
s
)
!(
List
t
)
->
List
t
;
MapR2
f
Nil
acc
=
acc
;
MapR2
f
(
x
:!
xs
)
acc
=
MapR2
f
xs
(
f
x
:!
acc
);
Util/colorpickcontrol.dcl
View file @
3a153dc9
...
...
@@ -3,7 +3,7 @@ definition module colorpickcontrol
import
StdControl
,
StdControlClass
,
StdReceiver
,
StdId
::
In
l
=
InGet
((
Maybe
Colour
)
!
l
->
l
)
=
InGet
((
Maybe
Colour
)
l
->
l
)
|
InSetI
Id
|
InSetC
Colour
|
InSetC`
Colour
...
...
@@ -38,5 +38,5 @@ SetColourBox` :: Id RGBColour !*(IOSt .l) -> *IOSt .l
setColourBoxColour
::
!(
RGBId
(
PSt
.
l
))
Colour
!*(
PSt
.
l
)
->
*
PSt
.
l
setColourBoxColour`
::
!(
RGBId
(
PSt
.
l
))
Colour
!*(
PSt
.
l
)
->
*
PSt
.
l
getColourBoxColour
::
!(
RGBId
(
PSt
.
l`
))
((
Maybe
Colour
)
!
*(
PSt
.
l`
)
->
PSt
.
l`
)
!*(
PSt
.
l
)
->
*
PSt
.
l
getColourBoxColour
::
!(
RGBId
(
PSt
.
l`
))
((
Maybe
Colour
)
*(
PSt
.
l`
)
->
PSt
.
l`
)
!*(
PSt
.
l
)
->
*
PSt
.
l
setColourBoxId
::
!(
RGBId
(
PSt
.
l
))
Id
!*(
PSt
.
l
)
->
*
PSt
.
l
Util/colorpickcontrol.icl
View file @
3a153dc9
...
...
@@ -154,7 +154,7 @@ SetColourBox` id rgb iost
/* The definition of the RGB access control: */
::
In
l
=
InGet
((
Maybe
Colour
)
!
l
->
l
)
=
InGet
((
Maybe
Colour
)
l
->
l
)
|
InSetI
Id
|
InSetC
Colour
|
InSetC`
Colour
...
...
@@ -279,7 +279,7 @@ setColourBoxColour` rgbId colour ps
#
(_,
ps
)
=
asyncSend
rgbId
(
InSetC`
colour
)
ps
=
ps
getColourBoxColour
::
!(
RGBId
(
PSt
.
l`
))
((
Maybe
Colour
)
!
*(
PSt
.
l`
)
->
PSt
.
l`
)
!*(
PSt
.
l
)
->
*
PSt
.
l
getColourBoxColour
::
!(
RGBId
(
PSt
.
l`
))
((
Maybe
Colour
)
*(
PSt
.
l`
)
->
PSt
.
l`
)
!*(
PSt
.
l
)
->
*
PSt
.
l
getColourBoxColour
rgbId
cont
ps
#
(_,
ps
)
=
asyncSend
rgbId
(
InGet
cont
)
ps
=
ps
...
...
Util/tabcontrol.dcl
View file @
3a153dc9
...
...
@@ -12,7 +12,7 @@ class Panes pdef
where
getLC
::
!(
pdef
.
ls
(
PSt
.
l
))
!
Bool
!
Id
!*(
PSt
.
l
)
->
(![
String
],![
Id
],!
Xane
.
ls
.
l
,!*(
PSt
.
l
))
::
Xane
ls
l
:==
!
(
PSt
l
)
->
*(
!
*[
ControlState
ls
(
PSt
l
)],
!
(
PSt
l
))
::
Xane
ls
l
:==
(
PSt
l
)
->
*(*[
ControlState
ls
(
PSt
l
)],(
PSt
l
))
instance
Panes
(
Pane
c
)
|
Controls
c
instance
Panes
(:+:
c1
c2
)
|
Panes
c1
&
Panes
c2
...
...
Util/tabcontrol.icl
View file @
3a153dc9
...
...
@@ -63,14 +63,14 @@ where
//--
::
Handles
ls
pst
=
Handles
(
!
pst
->
*(
!
*[
ControlState
ls
pst
],
!
pst
))
::
Handles
ls
pst
=
Handles
(
pst
->
*(*[
ControlState
ls
pst
],
pst
))
instance
Controls
Handles
where
getControlType
_
=
"Handles"
controlToHandles
(
Handles
h
)
ps
=
h
ps
::
Xane
ls
l
:==
!
(
PSt
l
)
->
*(
!
*[
ControlState
ls
(
PSt
l
)],
!
(
PSt
l
))
::
Xane
ls
l
:==
(
PSt
l
)
->
*(*[
ControlState
ls
(
PSt
l
)],(
PSt
l
))
class
Panes
pdef
where
...
...
Prev
1
2
3
4
Next
Write
Preview
Supports
Markdown
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