Adds a function to get a clauses' type.
Adds a function to get a clauses' type.

Also genericizes the sortBy functions, and adds a missing parameter to
`Database.saveDatabase`.

chrisdotcode/purescript-abstract-database