sbergot / ArgParser

BSD 3-Clause "New" or "Revised" License
9 stars 2 forks source link

Please export all of class `RawRead` #2

Open greyson opened 9 years ago

greyson commented 9 years ago

I would like to parse (as an argument) a custom type, but it seems I cannot without being able to implement rawParse which is hidden.

sbergot commented 9 years ago

You can use StdArgParam but I can see that it would be easier to define a new RawRead instance. I will make it visible.

agustinmista commented 7 years ago

I'm under the same problem here, cannot derive the following instance:

instance RawRead a => RawRead (Maybe a) where
    rawParse s = do 
        (val, rem) <- rawParse s
        return (Just val, rem)

Could you please confirm if rawParse will become visible? since I see this thread is very old.

EDIT: I've been using an old version of ArgParser from Hackage and I hadn't seen you have solved it here. It would be nice if you can update the Hackage version at some moment. Thanks!

weskerfoot commented 5 years ago

@agustinmista I realize this is an old issue but if you're using Stack you can do the following

extra-deps:
  - git: git@github.com:sbergot/ArgParser.git
    commit: 801ffac4551382a0b08a50ae3b98402ebbf35b30

And then put argparser in your .cabal file as a dependency.