runOnSemInput :: ProgStateRef -> CustomSem SemInput -> TestCase SemInput -> IO [GeniResult]
runOnSemInput pstRef wrangler tc = do
    pst <- readIORef pstRef
    let config = pa pst
        go = case getBuilderType config of
               SimpleBuilder         -> helper pst simpleBuilder_2p
               SimpleOnePhaseBuilder -> helper pst simpleBuilder_1p
    sort `fmap` go
  where
    helper pst b = (grResults . simplifyResults) <$>
        (runErrorT $ runGeni pst wrangler b tc)
runOnSemInput :: ProgStateRef -> CustomSem SemInput -> TestCase SemInput -> IO [GeniResult]
runOnSemInput pstRef wrangler tc = do
    pst <- readIORef pstRef
    let config = pa pst
        go = case getBuilderType config of
               SimpleBuilder         -> helper pst simpleBuilder_2p
               SimpleOnePhaseBuilder -> helper pst simpleBuilder_1p
    sort `fmap` go
  where
    helper pst b = (grResults . simplifyResults) <$>
        (runErrorT $ runGeni pst wrangler b tc)
runOnSemInput pstRef wrangler tc = do
    pst <- readIORef pstRef
    let config = pa pst
        go = case getBuilderType config of
               SimpleBuilder         -> helper pst simpleBuilder_2p
               SimpleOnePhaseBuilder -> helper pst simpleBuilder_1p
    sort `fmap` go
  where
    helper pst b = (grResults . simplifyResults) <$>
        (runErrorT $ runGeni pst wrangler b tc)