findEach :: Exp FilePath -> (Exp FilePath -> Action ()) -> Action ()
findEach spec act = do
    Value spec <- spec
    hdl <- var
    v <- var
    emit $ FindFirst hdl v spec
    while (return (Value $ val v)) $ do
        scope $ act $ return $ Value $ val v
        emit $ FindNext (val hdl) v
    emit $ FindClose $ val hdl
findEach :: Exp FilePath -> (Exp FilePath -> Action ()) -> Action ()
findEach spec act = do
    Value spec <- spec
    hdl <- var
    v <- var
    emit $ FindFirst hdl v spec
    while (return (Value $ val v)) $ do
        scope $ act $ return $ Value $ val v
        emit $ FindNext (val hdl) v
    emit $ FindClose $ val hdl
findEach spec act = do
    Value spec <- spec
    hdl <- var
    v <- var
    emit $ FindFirst hdl v spec
    while (return (Value $ val v)) $ do
        scope $ act $ return $ Value $ val v
        emit $ FindNext (val hdl) v
    emit $ FindClose $ val hdl