consistentRecord ::
  (Ord t5, Show t5, Arith.Constant t5) =>
  Record.Record t t3 t1 t4 k [] t2 t5 -> Bool
consistentRecord (Record.Record _ m) =
  case Map.elems m of
       [xs, ys] -> consistentIndices xs ys
       zs -> error $ "consistentRecord: more or less than exactly two signals: "
                     ++ show zs
  where consistentIndices (Sig.TC (Data xs)) (Sig.TC (Data ys)) =
          let zs = xs ++ ys
          in all (<= Arith.zero) zs || all (Arith.zero <=) zs
consistentRecord ::
  (Ord t5, Show t5, Arith.Constant t5) =>
  Record.Record t t3 t1 t4 k [] t2 t5 -> Bool
consistentRecord (Record.Record _ m) =
  case Map.elems m of
       [xs, ys] -> consistentIndices xs ys
       zs -> error $ "consistentRecord: more or less than exactly two signals: "
                     ++ show zs
  where consistentIndices (Sig.TC (Data xs)) (Sig.TC (Data ys)) =
          let zs = xs ++ ys
          in all (<= Arith.zero) zs || all (Arith.zero <=) zs
consistentRecord (Record.Record _ m) =
  case Map.elems m of
       [xs, ys] -> consistentIndices xs ys
       zs -> error $ "consistentRecord: more or less than exactly two signals: "
                     ++ show zs
  where consistentIndices (Sig.TC (Data xs)) (Sig.TC (Data ys)) =
          let zs = xs ++ ys
          in all (<= Arith.zero) zs || all (Arith.zero <=) zs