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
There are some things you can construct by using the constructors directly that don't make sense, aren't useful, or can be represented in several ways
Choice[]-- Doesn't match anythingChoice [foo,foo] = foo
Choice [Choice foo] =Choice [foo]
Tuple[]=Constant (Aeson.ArrayVector.empty) =Array (LengthtBound (Just0) (Just0))
Null-- Same as Constant Aeson.NullLengthBound (Just-2) (Just-1) -- Doesn't match anything
Some of these are hard to fix we can not (afaict) use a (Hash)Set for Choice since Aeson doesn't implement Ord or Hashable.
We can fix some of this by unexposing the constructors and only using smart constructors instead, <|> for Choice, <+> for Tuple, Value etc could have a Maybe Bound instead so you can create one by doing mkBound <$> foo 1 <*> foo 2.
I'm going to remove Null in the next release, but I'll let the rest air out for a bit.
The text was updated successfully, but these errors were encountered:
But i just realized that if you want to inspect the schema you probably want the constructors, so we need to leave them exposed, but perhaps not from the top level module and instead expose the combinators from there.
There are some things you can construct by using the constructors directly that don't make sense, aren't useful, or can be represented in several ways
Some of these are hard to fix we can not (afaict) use a (Hash)Set for Choice since Aeson doesn't implement Ord or Hashable.
We can fix some of this by unexposing the constructors and only using smart constructors instead,
<|>
for Choice,<+>
for Tuple, Value etc could have a Maybe Bound instead so you can create one by doingmkBound <$> foo 1 <*> foo 2
.I'm going to remove
Null
in the next release, but I'll let the rest air out for a bit.The text was updated successfully, but these errors were encountered: