hawk
hawk copied to clipboard
magic rules
The current code considers the uses at the top of this list to be more common than the uses at the bottom:
- manipulate the input as a table ([[_]] -> _)
- manipulate the input as a list of lines ([_] -> _)
- apply the expression to each line (_ -> _)
- evaluate the expression, ignoring the input (_)
So when magic encounters a case where what the user wants to do is ambiguous, it pick the most likely candidate. Perhaps there could be a --verbose mode in which we print to stderr which other interpretations would have made sense, and tell the user which flags they could use to force that interpretation?