Commit 3a153dc9 authored by Diederik van Arkel's avatar Diederik van Arkel
Browse files

Remove unused strictness annotations

parent 449c3d5a
...@@ -4,7 +4,7 @@ import StdArray, StdBool, StdClass, StdInt, StdList, StdMisc, StdOrdList, StdStr ...@@ -4,7 +4,7 @@ import StdArray, StdBool, StdClass, StdInt, StdList, StdMisc, StdOrdList, StdStr
// A strict list data structure // A strict list data structure
:: List t = (:!) infixr 0 !t (!List t) :: List t = (:!) infixr 0 !t !(List t)
| Nil | Nil
instance toString (List a) | toString a instance toString (List a) | toString a
...@@ -28,7 +28,7 @@ Head :: !(List t) -> t; ...@@ -28,7 +28,7 @@ Head :: !(List t) -> t;
Head (h:!t) = h; Head (h:!t) = h;
Head list = abort "Head: Empty list"; 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 Concat (x:!xs) ys
#! xs = Concat xs ys; #! xs = Concat xs ys;
= x :! xs; = x :! xs;
...@@ -49,7 +49,7 @@ Length2 :: !Int !(List t) -> Int; ...@@ -49,7 +49,7 @@ Length2 :: !Int !(List t) -> Int;
Length2 n Nil = n; Length2 n Nil = n;
Length2 n (f:!r) = Length2 (inc n) r; Length2 n (f:!r) = Length2 (inc n) r;
Filter :: (!s -> Bool) !(List s) -> List s; Filter :: !(s -> Bool) !(List s) -> List s;
Filter _ Nil Filter _ Nil
= Nil; = Nil;
Filter p (h :! t) Filter p (h :! t)
...@@ -58,10 +58,10 @@ Filter p (h :! t) ...@@ -58,10 +58,10 @@ Filter p (h :! t)
// otherwise // otherwise
= Filter p t; = Filter p t;
FilterR :: (!s -> Bool) !(List s) -> List s; FilterR :: !(s -> Bool) !(List s) -> List s;
FilterR p list = FilterR2 p list Nil; 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 Nil acc = acc;
FilterR2 p (x:!xs) acc | p x = FilterR2 p xs (x:!acc); FilterR2 p (x:!xs) acc | p x = FilterR2 p xs (x:!acc);
= FilterR2 p xs acc; = FilterR2 p xs acc;
...@@ -93,14 +93,14 @@ FlattenList :: !(List (List .a)) -> List .a; ...@@ -93,14 +93,14 @@ FlattenList :: !(List (List .a)) -> List .a;
FlattenList (h:!t) = AppendLists h (FlattenList t); FlattenList (h:!t) = AppendLists h (FlattenList t);
FlattenList Nil = Nil; 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 P_MapR f Nil
= (Nil, True) = (Nil, True)
P_MapR f (x:!xs) P_MapR f (x:!xs)
# (fx,b) = f x # (fx,b) = f x
= P_MapR2 b f xs fx Nil = P_MapR2 b f xs fx Nil
where 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 P_MapR2 unchanged f Nil first acc
= (first:!acc, unchanged) = (first:!acc, unchanged)
P_MapR2 unchanged f (x:!xs) first acc P_MapR2 unchanged f (x:!xs) first acc
...@@ -181,14 +181,14 @@ ListToStrictList :: ![.a] -> (List .a); ...@@ -181,14 +181,14 @@ ListToStrictList :: ![.a] -> (List .a);
ListToStrictList list ListToStrictList list
= foldr (:!) Nil list; // RWS: wrong line number (change foldr to foldl) = 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 (a:!x) = (f a :! Map f x)
Map f Nil = Nil 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; 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 Nil acc = acc;
MapR2 f (x:!xs) acc = MapR2 f xs (f x :! acc); MapR2 f (x:!xs) acc = MapR2 f xs (f x :! acc);
...@@ -3,7 +3,7 @@ definition module colorpickcontrol ...@@ -3,7 +3,7 @@ definition module colorpickcontrol
import StdControl, StdControlClass, StdReceiver, StdId import StdControl, StdControlClass, StdReceiver, StdId
:: In l :: In l
= InGet ((Maybe Colour) !l -> l) = InGet ((Maybe Colour) l -> l)
| InSetI Id | InSetI Id
| InSetC Colour | InSetC Colour
| InSetC` Colour | InSetC` Colour
...@@ -38,5 +38,5 @@ SetColourBox` :: Id RGBColour !*(IOSt .l) -> *IOSt .l ...@@ -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
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 setColourBoxId :: !(RGBId (PSt .l)) Id !*(PSt .l) -> *PSt .l
...@@ -154,7 +154,7 @@ SetColourBox` id rgb iost ...@@ -154,7 +154,7 @@ SetColourBox` id rgb iost
/* The definition of the RGB access control: */ /* The definition of the RGB access control: */
:: In l :: In l
= InGet ((Maybe Colour) !l -> l) = InGet ((Maybe Colour) l -> l)
| InSetI Id | InSetI Id
| InSetC Colour | InSetC Colour
| InSetC` Colour | InSetC` Colour
...@@ -279,7 +279,7 @@ setColourBoxColour` rgbId colour ps ...@@ -279,7 +279,7 @@ setColourBoxColour` rgbId colour ps
# (_,ps) = asyncSend rgbId (InSetC` colour) ps # (_,ps) = asyncSend rgbId (InSetC` colour) ps
= 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 getColourBoxColour rgbId cont ps
# (_,ps) = asyncSend rgbId (InGet cont) ps # (_,ps) = asyncSend rgbId (InGet cont) ps
= ps = ps
......
...@@ -12,7 +12,7 @@ class Panes pdef ...@@ -12,7 +12,7 @@ class Panes pdef
where where
getLC :: !(pdef .ls (PSt .l)) !Bool !Id !*(PSt .l) -> (![String],![Id],!Xane .ls .l,!*(PSt .l)) 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 (Pane c) | Controls c
instance Panes (:+: c1 c2) | Panes c1 & Panes c2 instance Panes (:+: c1 c2) | Panes c1 & Panes c2
......
...@@ -63,14 +63,14 @@ where ...@@ -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 instance Controls Handles
where where
getControlType _ = "Handles" getControlType _ = "Handles"
controlToHandles (Handles h) ps = h ps 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 class Panes pdef
where where
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment