I want to use my machine’s IP address in a configuration file, Is there a function call to find my machine’s IP?
The only way to do I/O in Dhall is to use imports. So if you want to rely on a service like http://ifconfig.me you can simply write
http://ifconfig.me as Text
If you don’t want to rely on some remote service, you could alternatively put the IP address into a local file and import that, e.g.
./my-ip-address.txt as Text
1 Like
What @sjakobi said, or you could use some non-Dhall means to get it in an environment variable, which might or might not be better suited to your usecase.
1 Like
That’s great, thank you!