updateStateGetSelectedSens :: ProofState
        -> ListBox String -- ^ axioms listbox
        -> ListBox String -- ^ theorems listbox
        -> IO ProofState
updateStateGetSelectedSens s lbAxs lbThs = do
       selA <- getSelection lbAxs :: IO (Maybe [Int])
       selT <- getSelection lbThs :: IO (Maybe [Int])
       return (s { includedAxioms = maybe [] (fil $ toAxioms s) selA
                 , includedTheorems = maybe [] (fil $ toGoals s) selT })
    where fil = map . (!!)

{- |
 Depending on the first argument all entries in a ListBox are selected
  or deselected
-}
updateStateGetSelectedSens :: ProofState
        -> ListBox String -- ^ axioms listbox
        -> ListBox String -- ^ theorems listbox
        -> IO ProofState
updateStateGetSelectedSens s lbAxs lbThs = do
       selA <- getSelection lbAxs :: IO (Maybe [Int])
       selT <- getSelection lbThs :: IO (Maybe [Int])
       return (s { includedAxioms = maybe [] (fil $ toAxioms s) selA
                 , includedTheorems = maybe [] (fil $ toGoals s) selT })
    where fil = map . (!!)

{- |
 Depending on the first argument all entries in a ListBox are selected
  or deselected
-}
updateStateGetSelectedSens s lbAxs lbThs = do
       selA <- getSelection lbAxs :: IO (Maybe [Int])
       selT <- getSelection lbThs :: IO (Maybe [Int])
       return (s { includedAxioms = maybe [] (fil $ toAxioms s) selA
                 , includedTheorems = maybe [] (fil $ toGoals s) selT })
    where fil = map . (!!)

{- |
 Depending on the first argument all entries in a ListBox are selected
  or deselected
-}