morphClassFromString :: Lua.OrNil BS.ByteString -> ExceptT GrLang.Error LuaGrLang (MorphismClass GrMorphism)
morphClassFromString strOrNil = case Lua.toMaybe strOrNil of
  Nothing -> return anyMorphism
  Just "all" -> return anyMorphism
  Just "monic" -> return monic
  Just "epic" -> return epic
  Just "'iso" -> return iso
  Just kind -> GrLang.throwError Nothing $ "Invalid kind of morphism '" <> pretty (show kind) <> "'"
morphClassFromString :: Lua.OrNil BS.ByteString -> ExceptT GrLang.Error LuaGrLang (MorphismClass GrMorphism)
morphClassFromString strOrNil = case Lua.toMaybe strOrNil of
  Nothing -> return anyMorphism
  Just "all" -> return anyMorphism
  Just "monic" -> return monic
  Just "epic" -> return epic
  Just "'iso" -> return iso
  Just kind -> GrLang.throwError Nothing $ "Invalid kind of morphism '" <> pretty (show kind) <> "'"
morphClassFromString strOrNil = case Lua.toMaybe strOrNil of
  Nothing -> return anyMorphism
  Just "all" -> return anyMorphism
  Just "monic" -> return monic
  Just "epic" -> return epic
  Just "'iso" -> return iso
  Just kind -> GrLang.throwError Nothing $ "Invalid kind of morphism '" <> pretty (show kind) <> "'"