runExperiment1 :: Free (Sum ExpInstr BanditInstr) a -> RunHRRBackend a
runExperiment1 m conn = iterM run m
  where
    run :: Sum ExpInstr BanditInstr (IO a) -> IO a
    run (InL (LookupAssignment eid uid k)) = do
      undefined
    run (InL (NewAssignment eid uid k)) = do
      arm <- runExperiment1 (mkBandit undefined) conn
      k arm

    run (InL (NewReward eid uid rew k)) = do
      undefined

    run (InR (RandomProbability k)) = do
      undefined
    run (InR (RandomArm k)) = do
      undefined
    run (InR (ChooseArm i k)) = do
      undefined
    run (InR (Scan f n k)) = do
      undefined
    run (InR (Collect f k)) = do
      undefined

-- | Runs an experiment in the Free monad constructor.
runExperiment1 :: Free (Sum ExpInstr BanditInstr) a -> RunHRRBackend a
runExperiment1 m conn = iterM run m
  where
    run :: Sum ExpInstr BanditInstr (IO a) -> IO a
    run (InL (LookupAssignment eid uid k)) = do
      undefined
    run (InL (NewAssignment eid uid k)) = do
      arm <- runExperiment1 (mkBandit undefined) conn
      k arm

    run (InL (NewReward eid uid rew k)) = do
      undefined

    run (InR (RandomProbability k)) = do
      undefined
    run (InR (RandomArm k)) = do
      undefined
    run (InR (ChooseArm i k)) = do
      undefined
    run (InR (Scan f n k)) = do
      undefined
    run (InR (Collect f k)) = do
      undefined

-- | Runs an experiment in the Free monad constructor.
runExperiment1 m conn = iterM run m
  where
    run :: Sum ExpInstr BanditInstr (IO a) -> IO a
    run (InL (LookupAssignment eid uid k)) = do
      undefined
    run (InL (NewAssignment eid uid k)) = do
      arm <- runExperiment1 (mkBandit undefined) conn
      k arm

    run (InL (NewReward eid uid rew k)) = do
      undefined

    run (InR (RandomProbability k)) = do
      undefined
    run (InR (RandomArm k)) = do
      undefined
    run (InR (ChooseArm i k)) = do
      undefined
    run (InR (Scan f n k)) = do
      undefined
    run (InR (Collect f k)) = do
      undefined

-- | Runs an experiment in the Free monad constructor.