-- replicate (length $ s^.symb) E

-- | Checks if two grammars are compatible.
--
-- TODO different inside/outside status might not be a big problem! years
-- later: let's see if that holds true!

opCompatible :: Grammar -> Grammar -> Either String ()
opCompatible l r
  | dim l /= dim r            = Left "Grammars have different dimensions"
--  | l^.outside /= r^.outside  = Left "Grammars have incompatible inside/outside status"
  | otherwise                 = Right ()
opCompatible :: Grammar -> Grammar -> Either String ()
opCompatible l r
  | dim l /= dim r            = Left "Grammars have different dimensions"
--  | l^.outside /= r^.outside  = Left "Grammars have incompatible inside/outside status"
  | otherwise                 = Right ()
opCompatible l r
  | dim l /= dim r            = Left "Grammars have different dimensions"
--  | l^.outside /= r^.outside  = Left "Grammars have incompatible inside/outside status"
  | otherwise                 = Right ()