diff options
| author | krasimir <krasimir@chalmers.se> | 2017-01-26 12:48:22 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2017-01-26 12:48:22 +0000 |
| commit | 3467a54965e532c07d43784609ddc05b54e958e5 (patch) | |
| tree | 59363c4b9d109da7af8cb418667894988ad8b668 /src/runtime/c/pgf/reasoner.c | |
| parent | 17163ae88163587f2c9615898a5789aaf3bee298 (diff) | |
bring the Haskell binding a bit closer to the pure Haskell API
Diffstat (limited to 'src/runtime/c/pgf/reasoner.c')
| -rw-r--r-- | src/runtime/c/pgf/reasoner.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/c/pgf/reasoner.c b/src/runtime/c/pgf/reasoner.c index 75f7ee0c6..5d604a4cc 100644 --- a/src/runtime/c/pgf/reasoner.c +++ b/src/runtime/c/pgf/reasoner.c @@ -454,7 +454,7 @@ pgf_new_reasoner(PgfPGF* pgf, GuExn* err, GuPool* pool, GuPool* out_pool) } PgfExprEnum* -pgf_generate_all(PgfPGF* pgf, PgfCId cat, GuExn* err, GuPool* pool, GuPool* out_pool) +pgf_generate_all(PgfPGF* pgf, PgfType* typ, GuExn* err, GuPool* pool, GuPool* out_pool) { PgfReasoner* rs = pgf_new_reasoner(pgf, err, pool, out_pool); @@ -462,9 +462,9 @@ pgf_generate_all(PgfPGF* pgf, PgfCId cat, GuExn* err, GuPool* pool, GuPool* out_ answers->parents = gu_new_buf(PgfExprState*, rs->pool); answers->exprs = rs->exprs; answers->outside_prob = 0; - gu_map_put(rs->table, cat, PgfAnswers*, answers); + gu_map_put(rs->table, typ->cid, PgfAnswers*, answers); - PgfAbsCat* abscat = gu_seq_binsearch(rs->abstract->cats, pgf_abscat_order, PgfAbsCat, cat); + PgfAbsCat* abscat = gu_seq_binsearch(rs->abstract->cats, pgf_abscat_order, PgfAbsCat, typ->cid); if (abscat != NULL) { rs->start = gu_new(PgfClosure, rs->pool); rs->start->code = abscat->predicate; |
