4

I would like to do something similar to:

curl -s http://example.com/some/file.bin >/usr/local/bin/foo

Since Shell is polymorphic, I can probably do this with Turtle as-is, but all the examples operate on lines of Shell Text and I haven't internalized enough Haskell to navigate it. Is there an idiomatic way to get Shell Bytestring or another solution?

mb14
  • 22,276
  • 7
  • 60
  • 102
drewr
  • 1,778
  • 1
  • 16
  • 20

2 Answers2

3

The answer is, not yet, but there is an issue open for this here:

https://github.com/Gabriel439/Haskell-Turtle-Library/issues/68

I proposed an example API for this in that issue and you might want to chime in on that issue to see if that API would be okay for your use case.

Gabriella Gonzalez
  • 34,863
  • 3
  • 77
  • 135
3

As of version 1.3.0, Turtle now has a Turtle.Bytes module just for this:

https://hackage.haskell.org/package/turtle/docs/Turtle-Bytes.html

William Casarin
  • 2,542
  • 2
  • 23
  • 24