Commit ad561156 authored by John van Groningen's avatar John van Groningen Committed by Camil Staps

add missing strictness annotations to RemoveMembers and RemoveIndex

parent c4fa4a25
......@@ -498,7 +498,7 @@ RemoveMemberM e l :== removeMember_ e l
= [|a:removeMember_ e as]
removeMember_ e [|] = [|]
RemoveMembers:: u:(l e) .(l e) -> u:(l e) | List l e & Eq e
RemoveMembers :: !u:(l e) !.(l e) -> u:(l e) | List l e & Eq e
special
l=[],e=Int; l=[],e=Char; l=[],e=Real;
l=[!],e=Int; l=[!],e=Char; l=[!],e=Real;
......@@ -526,7 +526,7 @@ RemoveDupM l :== removeDup_ l
removeDup_ [|x:xs] = [|x:removeDup_ (Filter ((<>) x) xs)]
removeDup_ _ = [|]
RemoveIndex :: e !u:(l e) -> (Int,u:(l e)) | List l e & Eq e
RemoveIndex :: !e !u:(l e) -> (Int,u:(l e)) | List l e & Eq e
special
l=[],e=Int; l=[],e=Char; l=[],e=Real;
l=[!],e=Int; l=[!],e=Char; l=[!],e=Real;
......
......@@ -693,7 +693,7 @@ RemoveMemberM e l :== removeMember_ e l
= [|a:removeMember_ e as]
removeMember_ e [|] = [|]
RemoveMembers:: u:(l e) .(l e) -> u:(l e) | List l e & Eq e
RemoveMembers :: !u:(l e) !.(l e) -> u:(l e) | List l e & Eq e
RemoveMembers x [|] = x
RemoveMembers x [|b:y] = RemoveMembers (RemoveMember b x) y
......@@ -711,7 +711,7 @@ RemoveDupM l :== removeDup_ l
removeDup_ [|x:xs] = [|x:removeDup_ (Filter ((<>) x) xs)]
removeDup_ _ = [|]
RemoveIndex :: e !u:(l e) -> (Int,u:(l e)) | List l e & Eq e
RemoveIndex :: !e !u:(l e) -> (Int,u:(l e)) | List l e & Eq e
RemoveIndex e xs = removei e xs 0
where
removei :: a u:(l a) !Int -> (Int,u:(l a)) | List l a & == a;
......
Markdown is supported
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