shayne-fletcher / ghc-lib-parser-ex

GHC API parse tree utilities
Other
10 stars 4 forks source link

patToStr and VarPat #35

Closed zliu41 closed 4 years ago

zliu41 commented 4 years ago

Should patToStr print the var if the input is a VarPat, so that patToStr . strToPar == id?

shayne-fletcher commented 4 years ago

Did you have a use-case in mind?

zliu41 commented 4 years ago

I don't any more. I was thinking of implementing a new hint in hlint, which would require extracting the var from VarPat, but I ended up giving up on the idea. I think unsafePrettyPrint would also do the job so it didn't necessarily need patToStr.

shayne-fletcher commented 4 years ago

Got it!