Questions tagged [haskell-turtle]

turtle is a reimplementation of the Unix command line environment in Haskell so that you can use Haskell as both a shell and a scripting language.

turtle is a reimplementation of the Unix command line environment in Haskell so that you can use Haskell as both a shell and a scripting language.

Features include:

  • Batteries included: Command an extended suite of predefined utilities

  • Interoperability: You can still run external shell commands

  • Portability: Works on Windows, OS X, and Linux

  • Exception safety: Safely acquire and release resources

  • Streaming: Transform or fold command output in constant space

  • Patterns: Use typed regular expressions that can parse structured values

  • Formatting: Type-safe printf-style text formatting

  • Modern: Supports text and system-filepath

Read Turtle.Tutorial for a detailed tutorial or Turtle.Prelude for a quick-start guide

turtle is designed to be beginner-friendly, but as a result lacks certain features, like tracing commands. If you feel comfortable using turtle then you should also check out the Shelly library which provides similar functionality.

ref: https://hackage.haskell.org/package/turtle

49 questions
0
votes
0 answers

Turtle: dealing with non-utf8 input

In my path to learning Pipes, I've run into problems when dealing with non-utf8 files. That is why I've took a detour into the Turtle library to try to understand how to solve the problem there, at higher level of abstraction. The exercise I want to…
Damian Nadales
  • 4,907
  • 1
  • 21
  • 34
0
votes
0 answers

Launching GHCi with a Turtle Script

Suppose one has a turtle script, but doesn't want to run it. Is there a way to launch a stack ghci environment with all of the functions loaded from the script?
George
  • 6,927
  • 4
  • 34
  • 67
0
votes
0 answers

facing issues still when trying to turn some bash scripts into turtle, null terminated strings in particular being at the culprit

When trying to turn some (for me:) common bash idioms into turtle scripts, I still encounter issues. This is a long post, sorry - you may just skip the introductory explanations, and jump to the actual issues towards the end - but I hope to get my…
0
votes
1 answer

compile more than one turtle scripts in the same directory

while I can use several turtle scripts in the same directory (have eg. pretty.hs and srv.hs interpreted), I learned that I can have only have one of them compiled eg. with ghc -no-user-package-db -package-db .cabal-sandbox/*-packages.conf.d -O2…
1 2 3
4