@@ -617,7 +617,7 @@ checkFormulas env tr (ProdCons (fp, ep) (fc, ec)) =
617 [F.for_ cs $ checkImplication env ps | Conjunct cs <- S.toList css]
617 [F.for_ cs $ checkImplication env ps | Conjunct cs <- S.toList css]
619checkContradiction :: [Traced OpenApi (Condition t)] -> CompatFormula s ()
619checkContradiction :: [Traced OpenApi (Condition t)] -> CompatFormula s ()
620−checkContradiction = undefined -- TODO
620+checkContradiction _ = pure () -- TODO
622checkImplication
622checkImplication
623 :: (HasAll (CheckEnv Schema) xs, Typeable t)
623 :: (HasAll (CheckEnv Schema) xs, Typeable t)
@@ -760,11 +760,11 @@ instance Subtree Schema where
760 | InvalidSchema Text
760 | InvalidSchema Text
761 | NoMatchingCondition [SomeCondition]
761 | NoMatchingCondition [SomeCondition]
762 deriving stock (Eq, Ord, Show)
762 deriving stock (Eq, Ord, Show)
763− type CheckEnv Schema = '[Definitions Schema]
763+ type CheckEnv Schema = '[ProdCons (Definitions Schema)]
764 normalizeTrace = undefined
764 normalizeTrace = undefined
765 checkCompatibility env schs = withTrace $ \traces -> do
765 checkCompatibility env schs = withTrace $ \traces -> do
766 let defs = getH env
766 let defs = getH env
767− checkFormulas env (producer traces) $ schemaToFormula defs <$> (Traced <$> traces <*> schs)
767+ checkFormulas env (producer traces) $ schemaToFormula <$> defs <*> (Traced <$> traces <*> schs)
769instance Subtree (Referenced Schema) where
769instance Subtree (Referenced Schema) where
770 data CheckIssue (Referenced Schema)
770 data CheckIssue (Referenced Schema)
@@ -774,7 +774,7 @@ instance Subtree (Referenced Schema) where
774 checkCompatibility env refs = withTrace $ \traces -> do
774 checkCompatibility env refs = withTrace $ \traces -> do
776 defs = getH env
776 defs = getH env
777− schs = dereference defs <$> refs
777+ schs = dereference <$> defs <*> refs
778 schs' = retrace <$> traces <*> schs
778 schs' = retrace <$> traces <*> schs
779 localTrace (getTrace <$> schs) $ do
779 localTrace (getTrace <$> schs) $ do
780− checkFormulas env (producer $ getTrace <$> schs') $ schemaToFormula defs <$> schs'
780+ checkFormulas env (producer $ getTrace <$> schs') $ schemaToFormula <$> defs <*> schs'