dhall-lang / dhall-lang/dhall-haskell

Apply a function to a Dhall expression supplied via STDIN or file

Open
#2,003 3 comments 0 reactions 1 assignee Claimed by @winitzki View on GitHub
enhancement
Dominant language
Dhall
Stars
973
Forks
224
Avg merge
1d 20h
Merged PRs (30d)
19

Description

I have a large JSON list in a file, and I wanted to use `json-to-dhall` output to get the length using a oneliner without . Is there a subcommand in the `dhall` executable that receives a Dhall function as a flag, another Dhall expression via STDIN or file and outputs the result of applying the function to that expression?

An example could be more descriptive:

```bash
# A list with a lot of elements
$ cat sample.json
[ ... ]
$ json-to-dhall --file sample.json | dhall --apply "List/length"
1234
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.