Commit 692a7019 authored by John van Groningen's avatar John van Groningen

add missing strictness annotations to RemoveMembers and RemoveIndex

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