catala icon indicating copy to clipboard operation
catala copied to clipboard

Explain plugin broken on demo example

Open denismerigoux opened this issue 1 year ago • 3 comments
trafficstars

On this file : https://github.com/CatalaLang/catala-examples/blob/exemple_explication/exemple_explication/apl_locatif.catala_fr

The command catala explain apl_locatif.catala_fr -s Exemple1 returns the error :

┌─[ERROR]─
│
│  Operator +$ applied to the wrong arguments (should not happen if the term was well-typed)
│
│ Operator (value +$):
├─➤ apl_locatif.catala_fr:116.22-116.23:
│     │
│ 116 │       loyer_éligible + montant_forfaitaire_charges_d823_16
│     │                      ‾
├─ Code de la construction est de l'habitation
│  └─ Article D823-16
│
│ Argument n°1, value $239.48
├─➤ apl_locatif.catala_fr:775.16-775.23:
│     │
│ 775 │     -- Zone1 : 239,48€
│     │                ‾‾‾‾‾‾‾
├─ Arrêté du 27 septembre 2019 relatif au calcul des aides personnelles au logement et de la prime de déménagement
│  └─ Article 16
│
│ Argument n°2, value PersonneSeule ()
├─➤ apl_locatif.catala_fr:847.59-847.72:
│     │
│ 847 │   définition calcul.situation_familiale_calcul_apl égal à PersonneSeule
│     │                                                           ‾‾‾‾‾‾‾‾‾‾‾‾‾
└─ Tests

Looks like there is a bug in the lazy evaluation...

denismerigoux avatar Oct 11 '24 12:10 denismerigoux

Apparently it only happens on one of my machines?

denismerigoux avatar Oct 11 '24 15:10 denismerigoux

I can reproduce on the new version of the example :/ Looking into it

AltGr avatar Oct 14 '24 12:10 AltGr

ok it's in the new stuff I added to remove neutral elements from operations that stg is going wrong so worst case we just need to disable that

AltGr avatar Oct 14 '24 13:10 AltGr