Skip to content

Conversation

@sternenseemann
Copy link
Contributor

@sternenseemann sternenseemann commented Sep 23, 2025

renameFile will raise the exception InappropriateType if “Either path refers to an existing directory”. renamePath needs to be used if the first argument may also be a directory as the documentation of mv indicates. renamePath is available since 1.2.7.0 which is older than the minimum version turtle requires.

Current symptoms:

ghci> import Turtle
ghci> mkdir "foo"
ghci> mv "foo" "lol"
*** Exception: foo: renameFile: inappropriate type (is a directory)

I discovered this while debugging
purescript/spago-legacy#4. I do not know whether directory was less strict at some point in the past (seems like it).

`renameFile` will raise the exception InappropriateType if “Either path
refers to an existing directory”. `renamePath` needs to be used if the
first argument may also be a directory as the documentation of `mv`
indicates. `renamePath` is available since 1.2.7.0 which is older than
the minimum version turtle requires.

Current symptoms:

    ghci> import Turtle
    ghci> mkdir "foo"
    ghci> mv "foo" "lol"
    *** Exception: foo: renameFile: inappropriate type (is a directory)

I discovered this while debugging
purescript/spago-legacy#4. I do not know
whether directory was less strict at some point in the past (seems like
it).
@Gabriella439 Gabriella439 merged commit b397553 into Gabriella439:main Sep 23, 2025
0 of 12 checks passed
@sternenseemann sternenseemann deleted the mv-dirs branch October 18, 2025 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants