use newly available must_be(chars, ...) for better and shorter type test
This commit is contained in:
@@ -65,8 +65,7 @@
|
|||||||
|
|
||||||
hex_bytes(Hs, Bytes) :-
|
hex_bytes(Hs, Bytes) :-
|
||||||
( ground(Hs) ->
|
( ground(Hs) ->
|
||||||
must_be(list, Hs),
|
must_be(chars, Hs),
|
||||||
maplist(must_be(atom), Hs),
|
|
||||||
( phrase(hex_bytes(Hs), Bytes) ->
|
( phrase(hex_bytes(Hs), Bytes) ->
|
||||||
true
|
true
|
||||||
; domain_error(hex_encoding, Hs, hex_bytes/2)
|
; domain_error(hex_encoding, Hs, hex_bytes/2)
|
||||||
|
|||||||
Reference in New Issue
Block a user