Fix warnings reporting and stdlib warnings (#367)
* Fix stdlib warnings * Mark unused includes when used from non-included files * Do not mark indirectly included files as unused * Show unused include warning only for files that are never used * Remove unused include from Option.aes * Consider functions passed as args as used * Return warnings as a sorted list * Fix failing tests * Fix dialyzer warning * Fix warning in Func.aes
This commit is contained in:
@@ -173,7 +173,7 @@ namespace List =
|
||||
if (n == 0) l
|
||||
else switch(l)
|
||||
[] => []
|
||||
h::t => drop_(n-1, t)
|
||||
_::t => drop_(n-1, t)
|
||||
|
||||
/** Get the longest prefix of a list in which every element
|
||||
* matches predicate `p`
|
||||
@@ -191,7 +191,7 @@ namespace List =
|
||||
/** Splits list into two lists of elements that respectively
|
||||
* match and don't match predicate `p`
|
||||
*/
|
||||
function partition(p : 'a => bool, l : list('a)) : (list('a) * list('a)) = switch(l)
|
||||
function partition(p : 'a => bool, lst : list('a)) : (list('a) * list('a)) = switch(lst)
|
||||
[] => ([], [])
|
||||
h::t =>
|
||||
let (l, r) = partition(p, t)
|
||||
@@ -313,4 +313,4 @@ namespace List =
|
||||
function enumerate(l : list('a)) : list(int * 'a) = enumerate_(l, 0)
|
||||
private function enumerate_(l : list('a), n : int) : list(int * 'a) = switch(l)
|
||||
[] => []
|
||||
h::t => (n, h)::enumerate_(t, n + 1)
|
||||
h::t => (n, h)::enumerate_(t, n + 1)
|
||||
|
||||
Reference in New Issue
Block a user