My SQLite component (see below) has mismatches. Similar statements run from the
Alice interpreter work fine, as far as I can see.
"SQLiteCreateTable.aml":
import structure SQLite from "x-alice:/lib/sqlite/SQLite"
structure Test =
struct
fun main () =
let
val db=SQLite.opendb("test2.db");
val createTable = "create table tname"^
"(firstname text not null,"^
"lastname text not null)"
val ct:unit list = await (SQLite.query(db,createTable))
in
OS.Process.success
end
val _ = OS.Process.exit (main())
end
compile with:
alicec -x SQLiteCreateTable.aml
run with:
alicerun SQLiteCreateTable
produces:
alicerun: failure type-checking x-alice:/lib/sqlite/SQLite
as requested by file:/home/wurmli/alice/work/SQLiteCreateTable
Reason:
structure SQLite
does not match, because
val opendb : string -> SQLite'.db
does not match
val opendb : string -> SQLite'.db
because
SQLite'.db
is incompatible with
SQLite'.db
Backtrace:
- ByteCode build3/lib/rtt/Inf.aml:2191.8 frame 0xb65ae5a8
- ByteCode build3/lib/rtt/Inf.aml:2191.8 frame 0xb65ae5a8
- ByteCode build3/lib/system/Component.aml:267.12 frame 0xb65ae598
- Select SQLite$
- Select opendb
- Push Call
- ByteCode SQLiteCreateTable.aml:6.8 frame 0xb65ae578
- ByteCode SQLiteCreateTable.aml:0.0 frame 0xb65ae580
- ByteCode build3/lib/system/Component.aml:358.12 frame 0xb65ae590
- ByteCode build3/lib/system/Component.aml:336.33 frame 0xb65ae56c
- ByteCode build3/lib/system/Component.aml:448.12 frame 0xb65ae578
- ByteCode build3/lib/system/Boot.aml:110.4 frame 0xb65ae568
_______________________________________________
alice-users mailing list
[email protected]
http://www.ps.uni-sb.de/mailman/listinfo/alice-users