morphismtech / squeal

Squeal, a deep embedding of SQL in Haskell
362 stars 32 forks source link

Sublist & SubDB #269

Closed echatav closed 3 years ago

echatav commented 4 years ago

Sublist & SubDB type families should unlock a new form of type safety. Because any SQL statement which is valid in the scope of a given set of schemas will be valid in the scope of a larger set of schemas, any Squeal code which is typechecked against a db0 :: SchemasType, should also work for a db1 for which SubDB db0 db1 ~ 'True.

adamwespiser commented 4 years ago

Thanks for adding this!

echatav commented 4 years ago

I added a couple new type families to check for subsets regardless of ordering.