Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] AbsolutePath, RelativeDir (etc) in pathnorms is the wrong abstraction #96

Open
timotheecour opened this issue Apr 8, 2020 · 0 comments

Comments

@timotheecour
Copy link
Owner

timotheecour commented Apr 8, 2020

(see also: nim-lang/RFCs#71)

eg: AbsoluteFile"foo" compiles, no checks done; and the fact that we have code like this proves the implicit contract is violated and not useful

proc prependCurDir*(f: AbsoluteFile): AbsoluteFile =
  when defined(unix):
    if os.isAbsolute(f.string): result = f
    else: result = AbsoluteFile("./" & f.string)
  else:
    result = f

links

@timotheecour timotheecour mentioned this issue Apr 8, 2020
1 task
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

No branches or pull requests

1 participant