-
Notifications
You must be signed in to change notification settings - Fork 1
Add a subset of path manipulation functionality #1
Conversation
1eaba89
to
c3a1a41
Compare
c3a1a41
to
546ce86
Compare
hslua-module-system.cabal
Outdated
@@ -33,6 +33,7 @@ library | |||
, exceptions >= 0.8 && < 0.11 | |||
, hslua >= 1.0.3 && < 1.2 | |||
, temporary >= 1.2 && < 1.4 | |||
, filepath >= 1.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version might be reviewed here...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using filepath > 1.4 && < 1.5
will guarantee that there won't be unexpected breaking changes when filepath is updated. Supporting older filepath versions is not necessary, version 1.3 is more than 5 years old.
Thanks for the PR! It might take me a little longer than usual to review, probably not before next week. Thanks for being patient. |
ping :)...
Von meinem iPhone gesendet
… Am 20.07.2020 um 23:24 schrieb Albert Krewinkel ***@***.***>:
Thanks for the PR! It might take me a little longer than usual to review, probably not before next week. Thanks for being patient.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pong 🏓 🙂
Looking good so far. We'll also need to add documentation for all new functions to the README. Those docs will then be copied to the lua-filters manual.
take_filename fp = return $ Fp.takeFileName fp | ||
|
||
-- | See @System.FilePath.takeExtensions | ||
take_extensions :: FilePath -> Lua String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fp.takeExtension
has type FilePath -> FilePath
, so a type of FilePath -> Lua FilePath
would seem more appropriate here (though those are equivalent).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you see, that do you have code completion? I am in vs code.
When I look at the docs its: String
https://hackage.haskell.org/package/filepath-1.4.2.1/docs/System-FilePath-Posix.html#v:takeExtensions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, my bad. I was looking at takeExtensions
.
hslua-module-system.cabal
Outdated
@@ -33,6 +33,7 @@ library | |||
, exceptions >= 0.8 && < 0.11 | |||
, hslua >= 1.0.3 && < 1.2 | |||
, temporary >= 1.2 && < 1.4 | |||
, filepath >= 1.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using filepath > 1.4 && < 1.5
will guarantee that there won't be unexpected breaking changes when filepath is updated. Supporting older filepath versions is not necessary, version 1.3 is more than 5 years old.
Added the changes. Updated the readme, also fixed linting errors in markdown (-> more commonmark alike -> dont mix heading styles etc...) |
Thanks for merging. |
Do you rather want version |
527ce5d
to
f5a33e6
Compare
README.md
Outdated
|
||
- `take_directory (filepath)` wraps [System.FilePath.takeDirectory](https://hackage.haskell.org/package/filepath-1.4.2.1/docs/System-FilePath-Posix.html#v:takeDirectory) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These docs will be targeted at Lua users who may not even be aware of Haskell. There should be enough details for anybody to use the functions. Best to use the other docs as reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will add the change later
Version 0.2.2 is fine. I usually try to keep version changes separate, but I don't mind much either. |
Checked in the full lua documentation. Added also some examples from the haskell dok, but for lua. |
Great, thanks! |
pandoc/lua-filters#102 (comment)
As said I am really newbie, had some hard time to figure out how things work.
Thanks for revewing and giving me some advice on how to make it more correct... :-)
I have not yet understood the Lua.liftIO and stuff :-). its quite hard to get into Haskell and at the same time also understand Lua etc ;-)
Thanks for having a look. The tests work and I only added it for unix testing, which is the case on travis and since we anyway only forward to the another library, we leave the proper testing to them.