add order preserving tidy_trail, fix random_labeling/2

This commit is contained in:
Mark Thom
2019-10-19 00:29:50 -06:00
parent ab9a14cc6a
commit 24e5e39c28
9 changed files with 124 additions and 101 deletions

View File

@@ -20,7 +20,7 @@
'$default_attr_list'([PG | PGs], Module, AttrVar) -->
( { '$module_of'(Module, PG) } -> [Module:put_atts(AttrVar, PG)]
; true
; { true }
),
'$default_attr_list'(PGs, Module, AttrVar).
'$default_attr_list'([], _, _) --> [].

View File

@@ -130,11 +130,12 @@ variant(X, Y) :- '$variant'(X, Y).
maybe :- '$maybe'.
set_random(Seed) :-
( nonvar(Seed) ->
( nonvar(Seed) ->
( Seed = seed(S) ->
( integer(S) -> '$set_seed'(S)
( var(S) -> throw(error(instantiation_error, set_random/1))
; integer(S) -> '$set_seed'(S)
; throw(error(type_error(integer(S), set_random/1)))
)
)
)
; throw(error(instantiation_error, set_random/1))
).
).