Follow-up from PR #79 review (@adamgundry):
As we discussed, it would be nice to be able to write Maybe (Set UTCTime) for ? Set utc and similarly Set Int instead of Set integer (while keeping backwards compatibility for the old syntax). I suggest we save that for a follow-up PR though.
Goal
Extend the schema DSL parser to accept Haskell-style type syntax as an alternative to the current one:
| Current syntax |
Desired alternative |
? Set utc |
Maybe (Set UTCTime) |
Set integer |
Set Int |
? T |
Maybe T |
Requirements
- Backwards compatible: existing schemas using
? T, Set integer, etc. must keep working unchanged.
- This likely means supporting the Haskell type constructor names (
Int, UTCTime, ...) alongside the current lowercase DSL keywords (integer, utc, ...), mapping to the same APIType.
Follow-up from PR #79 review (@adamgundry):
Goal
Extend the schema DSL parser to accept Haskell-style type syntax as an alternative to the current one:
? Set utcMaybe (Set UTCTime)Set integerSet Int? TMaybe TRequirements
? T,Set integer, etc. must keep working unchanged.Int,UTCTime, ...) alongside the current lowercase DSL keywords (integer,utc, ...), mapping to the sameAPIType.