testPatternUsing testEx (L1.L1PatternProduct ss args) = do
  let
    testProductPart (label, pat) = testPatternUsing (L1.L1ExApply ss (L1.L1ExProject ss label) testEx) pat
  lastTest <- (testProductPart (last args))
  foldM (\exOther prodThis -> L1.L1ExApply ss (L1.L1ExApply ss (L1.L1ExReference ss (pathGlobal ss "&&")) exOther)
                                               <$> testProductPart prodThis
        ) lastTest (init args)
testPatternUsing testEx (L1.L1PatternProduct ss args) = do
  let
    testProductPart (label, pat) = testPatternUsing (L1.L1ExApply ss (L1.L1ExProject ss label) testEx) pat
  lastTest <- (testProductPart (last args))
  foldM (\exOther prodThis -> L1.L1ExApply ss (L1.L1ExApply ss (L1.L1ExReference ss (pathGlobal ss "&&")) exOther)
                                               <$> testProductPart prodThis
        ) lastTest (init args)
testPatternUsing testEx (L1.L1PatternProduct ss args) = do
  let
    testProductPart (label, pat) = testPatternUsing (L1.L1ExApply ss (L1.L1ExProject ss label) testEx) pat
  lastTest <- (testProductPart (last args))
  foldM (\exOther prodThis -> L1.L1ExApply ss (L1.L1ExApply ss (L1.L1ExReference ss (pathGlobal ss "&&")) exOther)
                                               <$> testProductPart prodThis
        ) lastTest (init args)