Giter Site home page Giter Site logo

Comments (4)

Gabriella439 avatar Gabriella439 commented on June 29, 2024

Yeah, there is a better way to do what you want. I believe what you want is:

 defaultConfig with field1.?.foo.?.bar.? = 2

{ field1 = Some { foo = Some { bar = Some 2, baz = 42 } }, field2 = 0 }

from dhall-lang.

rockboynton avatar rockboynton commented on June 29, 2024

@Gabriella439 Thank you for the prompt response!

I'm getting this error

1 | defaultConfig with field1.?.foo.?.bar.? = 2
  |                           ^
unexpected '?'
expecting any label or whitespace

Is that a new feature? I can't seem to find it in the docs

[nix-shell:~]$ dhall --version
1.40.2

from dhall-lang.

mmhat avatar mmhat commented on June 29, 2024

@rockboynton The .? syntax got introduced in the Dhall standard v22.0.0 which is supported in the Dhall Haskell implementation since 1.41.0.
TLDR; Your need to update your Dhall interpreter to use this.

from dhall-lang.

rockboynton avatar rockboynton commented on June 29, 2024

@mmhat Thank you, that does the trick. Would be nice to have the docs mention this feature as well.

from dhall-lang.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.