haskell-hvr / HsYAML

YAML 1.2 implementation in pure Haskell
https://hackage.haskell.org/package/HsYAML
GNU General Public License v2.0
55 stars 17 forks source link

Export getDoc #32

Closed sjakobi closed 4 years ago

sjakobi commented 4 years ago

It's just slightly inconvenient to have to pattern match on Doc.

sjakobi commented 4 years ago

Seems like this was recently fixed on the 0.2 branch.

sjakobi commented 4 years ago

Would be nice to get a release though! :)

hvr commented 4 years ago

@sjakobi are you sure? afaics, getDoc is currently not exported in the 0.2 branch...

sjakobi commented 4 years ago

Ah, I think I got confused by the export from Internal.hs, where it is exported.

hvr commented 4 years ago

@sjakobi I'll add something for 0.2.1

but out of curiosity, what kind of code are you writing that the newtype becomes awkward to use?

@sjakobi btw, I plan to release HsYAML-0.2.1 later today; so if there's anything else you'd like to see in it, lemme know asap :-)

sjakobi commented 4 years ago

what kind of code are you writing that the newtype becomes awkward to use?

I was just exploring a bit in the REPL with decodeNode. I probably saw getDoc in the show output and wondered why I couldn't use it or so.

sjakobi commented 4 years ago

I plan to release HsYAML-0.2.1 later today

Sounds great! :)

No specific wishes though. I haven't touched the YAML-handling it dhall yet.