When defining an index as part of a table definition, you must not give the table name, only the optional index name and specs.
(create db (table :users (integer :id :unique)
(varchar :name 255)
(index :idx_name [:name])))
That's because the table macro thread through its element passing a record that represent the table as the first argument.
I just realized the documentation was a little bit confusing on that subject, I'll improve it for the next release.