registerPipelineInternal :: PipelineId -> Pipeline -> PipelineSchema -> GLRenderer -> LambdaCubeEnv t -> IO ()
registerPipelineInternal i ps pl r LambdaCubeEnv{..} = do
  atomicModifyIORef' lambdaEnvPipelines $ (, ()) . M.insert i info
  where
    info = PipelineInfo {
        pipeInfoRenderer = r
      , pipeInfoSchema = pl
      , pipeInfoPipeline = ps
      }

-- | Removes pipeline from state and deletes it, also destroys all storages of the pipeline
registerPipelineInternal :: PipelineId -> Pipeline -> PipelineSchema -> GLRenderer -> LambdaCubeEnv t -> IO ()
registerPipelineInternal i ps pl r LambdaCubeEnv{..} = do
  atomicModifyIORef' lambdaEnvPipelines $ (, ()) . M.insert i info
  where
    info = PipelineInfo {
        pipeInfoRenderer = r
      , pipeInfoSchema = pl
      , pipeInfoPipeline = ps
      }

-- | Removes pipeline from state and deletes it, also destroys all storages of the pipeline
registerPipelineInternal i ps pl r LambdaCubeEnv{..} = do
  atomicModifyIORef' lambdaEnvPipelines $ (, ()) . M.insert i info
  where
    info = PipelineInfo {
        pipeInfoRenderer = r
      , pipeInfoSchema = pl
      , pipeInfoPipeline = ps
      }

-- | Removes pipeline from state and deletes it, also destroys all storages of the pipeline