-
Notifications
You must be signed in to change notification settings - Fork 8
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
proof-of-concept decode XLS from ByteString, typed cells #9
base: master
Are you sure you want to change the base?
Conversation
, conduit >= 1.1 && < 1.4 | ||
, filepath >= 1.0 && < 1.5 | ||
, resourcet >= 0.3 && < 1.3 | ||
, temporary |
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.
Can add bounds here. Also, bounds of transformers and resourcet can be bumped up.
decodeXlsIO filePath | ||
|
||
-- | Experimental: This function uses the @xls_open_buffer@ function of libxls. | ||
decodeXlsByteString' :: ByteString -> IO (Either XLSError [[[Cell]]]) |
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.
- It would be better to have the same signature as decodeXlsByteString. The only difference between the two is exception vs either return. Both are IO, so can use exception.
- We can say in the docs, that it does not use a temporary file, instead uses ...
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.
So you suggest to make XLSError
an instance of Exception
and use throwIO
instead of explicitly returning Either
?
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.
It is somewhat odd that there are two exception types: XLSError
from libxls and the XlsException
defined in this package. Proposal: We add XLSError
into the XlsException
type so that only one exception type is thrown by this library.
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.
I created a branch in my fork for unifying the error types.
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.
I created a branch in my fork for unifying the error types.
@olafklinke just a few minor suggestions. I also added you to the repo, please check your email for the invite. Once we have resolved and merged this, can you please also upload it to hackage? Let me know your hackage user name, I will add you to maintainers. |
this is my hackage identity: olf |
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.
Looks good. Minor points. Plus a comment on the aux change in your fork.
| TextCell String | ||
| BoolCell Bool | ||
| OtherCell o | ||
deriving (Functor,Show,Eq) |
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.
Is there a way/possiblity for users to use this type? otherwise we should not expose this type and if that's the case then we can just use a Cell
type instead of using it as a synonym to CellF ()
. Will keep things simple for users.
No description provided.