You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Nicer DSL syntax for Maybe/Set types (Maybe (Set UTCTime), Set Int) #93
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.
Activity