[augeas-devel] Recursive lens and "malformed node" error in put direction

David Lutterkort lutter at redhat.com
Wed Feb 16 01:50:27 UTC 2011


On Tue, 2011-02-15 at 11:27 +0100, Raphaël Pinson wrote:
> Here is some more debug, depending on the definition of lns.
> 
> 
> +------------------------------+--------------------------+
> |       let lns =              |    save error            |
> +------------------------------+--------------------------+
> | ( empty | comment | entry    |                          |
> |         | include | clear )* | Malformed child node     |
> +------------------------------+--------------------------+
> | entry                        | No error                 |
> +------------------------------+--------------------------+
> | entry*                       | Malformed child node     |
> +------------------------------+--------------------------+
> | empty | entry                | None of the alternatives |
> |                              | in the union match       |
> +------------------------------+--------------------------+
> | comment | entry              | None of the alternatives |
> |                              | in the union match       |
> +------------------------------+--------------------------+
> 
> 
> The save goes for any union between entry and another lens.

Not good. Can you send me a patch against HEAD with the module and
tests ?

One last thing you can try is turn entry into a regular lens, and see if
the typechecker is happy with it or not. To do that, just remove any
mention of 'entry' in the definition of the entry lens, and optionally
change 'let rec' to 'let'.

David





More information about the augeas-devel mailing list