mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 01:43:35 +00:00
Replace __ with . as the module qualifier symbol. Replace references to io.state with just io. Replace DCGs with state variables. Replace (C->T;E) syntax for if-then-elses with (if C then T else E) syntax. Replace if-then-elses with switches when possible and where this does not affect what is being tested. Replace separate pred and mode declarations with predmode declarations. Put predicate and function declarations just before the definition of the predicate or function. Delete unneeded module qualifications on predicate and function declarations and definitions. Update .exp files (and if needed, .inp files) for the line number changes that result from the above. For tests that have more than one .exp file and where one of those files is affected by the above, add a section to the source file header that says which .exp file is for what grade, with XXXs for the (as yet) unknown parts.
94 lines
2.6 KiB
Plaintext
94 lines
2.6 KiB
Plaintext
1: 1 1 CALL pred class_decl.main/2-0 (det) class_decl.m:43
|
|
mdb> echo on
|
|
Command echo enabled.
|
|
mdb> register --quiet
|
|
mdb> all_type_ctors class_decl
|
|
type constructor class_decl.t1/0
|
|
|
|
type constructor class_decl.t2/1
|
|
|
|
number of type constructors in module class_decl: 2
|
|
mdb> type_ctor class_decl t1 0
|
|
type constructor class_decl.t1/0
|
|
mdb> type_ctor -r class_decl t1 0
|
|
type constructor class_decl.t1/0: NOTAG_GROUND
|
|
mdb> type_ctor -f class_decl t1 0
|
|
type constructor class_decl.t1/0
|
|
t1/1
|
|
mdb> type_ctor -rf class_decl t1 0
|
|
type constructor class_decl.t1/0: NOTAG_GROUND
|
|
t1/1
|
|
mdb> type_ctor class_decl t2 1
|
|
type constructor class_decl.t2/1
|
|
mdb> type_ctor -r class_decl t2 1
|
|
type constructor class_decl.t2/1: DU
|
|
mdb> type_ctor -f class_decl t2 1
|
|
type constructor class_decl.t2/1
|
|
t2a/1, t2b/2
|
|
mdb> type_ctor -f -r class_decl t2 1
|
|
type constructor class_decl.t2/1: DU
|
|
t2a/1, t2b/2
|
|
mdb> type_ctor class_decl t1 1
|
|
there is no such type constructor
|
|
mdb> type_ctor class_decl nonexistent 3
|
|
there is no such type constructor
|
|
mdb> all_class_decls class_decl
|
|
type class class_decl.foo/1
|
|
|
|
type class class_decl.bar/2
|
|
|
|
number of type classes in module class_decl: 2
|
|
mdb> class_decl class_decl foo 1
|
|
type class class_decl.foo/1
|
|
mdb> class_decl -m class_decl foo 1
|
|
type class class_decl.foo/1
|
|
methods: pred foo_method/3
|
|
mdb> class_decl -i class_decl foo 1
|
|
type class class_decl.foo/1
|
|
instance builtin.string
|
|
instance class_decl.t1
|
|
instance class_decl.t2(T1)
|
|
mdb> class_decl -mi class_decl foo 1
|
|
type class class_decl.foo/1
|
|
methods: pred foo_method/3
|
|
instance builtin.string
|
|
instance class_decl.t1
|
|
instance class_decl.t2(T1)
|
|
mdb> class_decl class_decl bar 2
|
|
type class class_decl.bar/2
|
|
mdb> class_decl -m class_decl bar 2
|
|
type class class_decl.bar/2
|
|
methods: pred bar_method/4
|
|
mdb> class_decl -i class_decl bar 2
|
|
type class class_decl.bar/2
|
|
instance builtin.int, builtin.int
|
|
instance builtin.string, builtin.int
|
|
instance builtin.string, builtin.string
|
|
instance class_decl.t1, builtin.int
|
|
instance class_decl.t1, class_decl.t2(T1)
|
|
mdb> class_decl -mi class_decl bar 2
|
|
type class class_decl.bar/2
|
|
methods: pred bar_method/4
|
|
instance builtin.int, builtin.int
|
|
instance builtin.string, builtin.int
|
|
instance builtin.string, builtin.string
|
|
instance class_decl.t1, builtin.int
|
|
instance class_decl.t1, class_decl.t2(T1)
|
|
mdb> class_decl class_decl bar 1
|
|
there is no such type class
|
|
mdb> class_decl class_decl bad 2
|
|
there is no such type class
|
|
mdb> continue
|
|
string: zero
|
|
t1: 10
|
|
t2a: 20
|
|
t2b: 30, 40
|
|
t2b: "thirty", "forty"
|
|
ii: 11, 22
|
|
si: eleven, 22
|
|
ss: eleven, twentytwo
|
|
t1int: 111, 222
|
|
t1t2a: 333, 444
|
|
t1t2b: 333, 444, 555
|
|
t1t2b: 888, "sixsixsix", "sevensevenseven"
|