Best workflow for decoupling JSON


need some help for dhall+JSON here,I am using dhall-json to convert json to dhall with as the schema but when trying to decouple the json into smaller files and import them back im getting :

 Error: Unbound variable: json

1│ json

Im guessing because the JSON variable/Type definition stayed in the main file, what should be the right way to approach this?


@countoren: Yeah, when a Dhall file imports another Dhall file the variables that were in scope within the parent Dhall expression are not threaded to the imported child Dhall expression.

The simplest way to fix this is to import json again within the child Dhall expression.

See also: