@@ -94,26 +94,32 @@ instance Issuable 'TypedSchemaLevel where
9494 describeIssue Backward (NoMatchingEnum v) = para "The following enum value has been removed:" <> showJSONValue v
9595 describeIssue Forward (NoMatchingMaximum b) = para $ "Upper bound has been added:" <> showBound b <> "."
9696 describeIssue Backward (NoMatchingMaximum b) = para $ "Upper bound has been removed:" <> showBound b <> "."
97− describeIssue _ (MatchingMaximumWeak (ProdCons p c)) = para $ "Upper bound changed from " <> showBound p <> " to " <> showBound c <> "."
97+ describeIssue ori (MatchingMaximumWeak (orientProdCons ori -> ProdCons p c)) =
98+ para $ "Upper bound changed from " <> showBound p <> " to " <> showBound c <> "."
9899 describeIssue Forward (NoMatchingMinimum b) = para $ "Lower bound has been added: " <> showBound b <> "."
99100 describeIssue Backward (NoMatchingMinimum b) = para $ "Lower bound has been removed: " <> showBound b <> "."
100− describeIssue _ (MatchingMinimumWeak (ProdCons p c)) = para $ "Lower bound changed from " <> showBound p <> " to " <> showBound c <> "."
101+ describeIssue ori (MatchingMinimumWeak (orientProdCons ori -> ProdCons p c)) =
102+ para $ "Lower bound changed from " <> showBound p <> " to " <> showBound c <> "."
101103 describeIssue Forward (NoMatchingMultipleOf n) = para $ "Value is now a multiple of " <> show' n <> "."
102104 describeIssue Backward (NoMatchingMultipleOf n) = para $ "Value is no longer a multiple of " <> show' n <> "."
103− describeIssue _ (MatchingMultipleOfWeak (ProdCons p c)) = para $ "Value changed from being a multiple of " <> show' p <> " to being a multiple of " <> show' c <> "."
105+ describeIssue ori (MatchingMultipleOfWeak (orientProdCons ori -> ProdCons p c)) =
106+ para $ "Value changed from being a multiple of " <> show' p <> " to being a multiple of " <> show' c <> "."
104107 describeIssue Forward (NoMatchingFormat f) = para $ "Format added: " <> code f <> "."
105108 describeIssue Backward (NoMatchingFormat f) = para $ "Format removed: " <> code f <> "."
106109 describeIssue Forward (NoMatchingMaxLength n) = para $ "Maximum length added: " <> show' n <> "."
107110 describeIssue Backward (NoMatchingMaxLength n) = para $ "Maximum length removed: " <> show' n <> "."
108− describeIssue _ (MatchingMaxLengthWeak (ProdCons p c)) = para $ "Maximum length of the string changed from " <> show' p <> " to " <> show' c <> "."
111+ describeIssue ori (MatchingMaxLengthWeak (orientProdCons ori -> ProdCons p c)) =
112+ para $ "Maximum length of the string changed from " <> show' p <> " to " <> show' c <> "."
109113 describeIssue Forward (NoMatchingMinLength n) = para $ "Minimum length of the string added: " <> show' n <> "."
110114 describeIssue Backward (NoMatchingMinLength n) = para $ "Minimum length of the string removed: " <> show' n <> "."
111− describeIssue _ (MatchingMinLengthWeak (ProdCons p c)) = para $ "Minimum length of the string changed from " <> show' p <> " to " <> show' c <> "."
115+ describeIssue ori (MatchingMinLengthWeak (orientProdCons ori -> ProdCons p c)) =
116+ para $ "Minimum length of the string changed from " <> show' p <> " to " <> show' c <> "."
112117 describeIssue Forward (NoMatchingPattern p) = para "Pattern (regular expression) added: " <> codeBlock p
113118 describeIssue Backward (NoMatchingPattern p) = para "Pattern (regular expression) removed: " <> codeBlock p
114119 describeIssue Forward NoMatchingItems = para "Array item schema has been added."
115120 describeIssue Backward NoMatchingItems = para "Array item schema has been removed."
116− describeIssue _ (TupleItemsLengthChanged (ProdCons p c)) = para $ "Tuple length changed from " <> show' p <> " to " <> show' c <> "."
121+ describeIssue ori (TupleItemsLengthChanged (orientProdCons ori -> ProdCons p c)) =
122+ para $ "Tuple length changed from " <> show' p <> " to " <> show' c <> "."
117123 describeIssue Forward ArrayToTuple = para "The array is now explicitly defined as a tuple."
118124 describeIssue Backward ArrayToTuple = para "The array is no longer explicitly defined as a tuple."
119125 describeIssue Forward TupleToArray = para "The array is no longer explicitly defined as a tuple."
@@ -122,10 +128,12 @@ instance Issuable 'TypedSchemaLevel where
122128 describeIssue Backward NoMatchingTupleItems = para "The array is no longer explicitly defined as a tuple."
123129 describeIssue Forward (NoMatchingMaxItems n) = para $ "Maximum length of the array has been added " <> show' n <> "."
124130 describeIssue Backward (NoMatchingMaxItems n) = para $ "Maximum length of the array has been removed " <> show' n <> "."
125− describeIssue _ (MatchingMaxItemsWeak (ProdCons p c)) = para $ "Maximum length of the array changed from " <> show' p <> " to " <> show' c <> "."
131+ describeIssue ori (MatchingMaxItemsWeak (orientProdCons ori -> ProdCons p c)) =
132+ para $ "Maximum length of the array changed from " <> show' p <> " to " <> show' c <> "."
126133 describeIssue Forward (NoMatchingMinItems n) = para $ "Minimum length of the array added: " <> show' n <> "."
127134 describeIssue Backward (NoMatchingMinItems n) = para $ "Minimum length of the array removed: " <> show' n <> "."
128− describeIssue _ (MatchingMinItemsWeak (ProdCons p c)) = para $ "Minimum length of the array changed from " <> show' p <> " to " <> show' c <> "."
135+ describeIssue ori (MatchingMinItemsWeak (orientProdCons ori -> ProdCons p c)) =
136+ para $ "Minimum length of the array changed from " <> show' p <> " to " <> show' c <> "."
129137 describeIssue Forward NoMatchingUniqueItems = para "Items are now required to be unique."
130138 describeIssue Backward NoMatchingUniqueItems = para "Items are no longer required to be unique."
131139 describeIssue Forward NoMatchingProperties = para "Property added."
@@ -134,17 +142,20 @@ instance Issuable 'TypedSchemaLevel where
134142 describeIssue Backward NoAdditionalProperties = para "Additional properties have been added."
135143 describeIssue Forward (NoMatchingMaxProperties n) = para $ "Maximum number of properties has been added: " <> show' n <> "."
136144 describeIssue Backward (NoMatchingMaxProperties n) = para $ "Maximum number of properties has been removed: " <> show' n <> "."
137− describeIssue _ (MatchingMaxPropertiesWeak (ProdCons p c)) = para $ "Maximum number of properties has changed from " <> show' p <> " to " <> show' c <> "."
145+ describeIssue ori (MatchingMaxPropertiesWeak (orientProdCons ori -> ProdCons p c)) =
146+ para $ "Maximum number of properties has changed from " <> show' p <> " to " <> show' c <> "."
138147 describeIssue Forward (NoMatchingMinProperties n) = para $ "Minimum number of properties added: " <> show' n <> "."
139148 describeIssue Backward (NoMatchingMinProperties n) = para $ "Minimum number of properties removed: " <> show' n <> "."
140− describeIssue _ (MatchingMinPropertiesWeak (ProdCons p c)) = para $ "Minimum number of properties has changed from " <> show' p <> " to " <> show' c <> "."
149+ describeIssue ori (MatchingMinPropertiesWeak (orientProdCons ori -> ProdCons p c)) =
150+ para $ "Minimum number of properties has changed from " <> show' p <> " to " <> show' c <> "."
141151 describeIssue _ (NoMatchingCondition mPart conds) =
142152 para
143− (case mPart of
144− Nothing -> "Could not verify that the following conditions hold (please file a bug if you see this):"
145− Just locPart ->
146− "In cases where " <> showPartition locPart
147− <> " – could not verify that the following conditions hold (please file a bug if you see this):")
153+ ( case mPart of
154+ Nothing -> "Could not verify that the following conditions hold (please file a bug if you see this):"
155+ Just locPart ->
156+ "In cases where " <> showPartition locPart
157+ <> " – could not verify that the following conditions hold (please file a bug if you see this):"
158+ )
148159 <> bulletList ((\(SomeCondition c) -> showCondition c) <$> conds)
149160 describeIssue Forward TypeBecomesEmpty = para "The type has been removed."
150161 describeIssue Backward TypeBecomesEmpty = para "The type has been added."