resolveCommand :: String -> Shell [Resolved]
resolveCommand s = catMaybes `fmap` sequence -- special path?
                     [(fmap Alias . lookup s) `fmap` getAliases
                     ,return $ if s `elem` keywords then Just Keyword
                                                    else Nothing
                     ,fmap (uncurry Function) `fmap` getFunction s
                     ,fmap Builtin `fmap` builtin s
                     ,fmap Executable `fmap`
                           withMaybeHandler (findExecutable s)]
resolveCommand :: String -> Shell [Resolved]
resolveCommand s = catMaybes `fmap` sequence -- special path?
                     [(fmap Alias . lookup s) `fmap` getAliases
                     ,return $ if s `elem` keywords then Just Keyword
                                                    else Nothing
                     ,fmap (uncurry Function) `fmap` getFunction s
                     ,fmap Builtin `fmap` builtin s
                     ,fmap Executable `fmap`
                           withMaybeHandler (findExecutable s)]
resolveCommand s = catMaybes `fmap` sequence -- special path?
                     [(fmap Alias . lookup s) `fmap` getAliases
                     ,return $ if s `elem` keywords then Just Keyword
                                                    else Nothing
                     ,fmap (uncurry Function) `fmap` getFunction s
                     ,fmap Builtin `fmap` builtin s
                     ,fmap Executable `fmap`
                           withMaybeHandler (findExecutable s)]