use newly available character type in must_be/2
This commit is contained in:
@@ -57,13 +57,7 @@
|
|||||||
|
|
||||||
list_of_chars(Cs) :-
|
list_of_chars(Cs) :-
|
||||||
must_be(list, Cs),
|
must_be(list, Cs),
|
||||||
( ground(Cs) ->
|
maplist(must_be(character), Cs).
|
||||||
( member(C, Cs), \+ atom_length(C, 1) ->
|
|
||||||
type_error(char, C, files_and_directories)
|
|
||||||
; true
|
|
||||||
)
|
|
||||||
; instantiation_error(s)
|
|
||||||
).
|
|
||||||
|
|
||||||
directory_files(Directory, Files) :-
|
directory_files(Directory, Files) :-
|
||||||
list_of_chars(Directory),
|
list_of_chars(Directory),
|
||||||
|
|||||||
Reference in New Issue
Block a user