From e2ad934492eeac9881527610e4a1c1cf31ea1115 Mon Sep 17 00:00:00 2001 From: Guillaume Maudoux Date: Mon, 16 Nov 2020 14:30:30 +0100 Subject: [PATCH] Make `->` right assosciative As per the nix source code https://github.com/haskell-nix/nix/blob/61e816217bfdfffd39c130c7cd24f07e640098fc/src/libexpr/parser.y#L296-L307 The bug was found while parsing firefox https://github.com/NixOS/nixpkgs/blob/5030e5cdc7f4782e895c470e8ea9fa574274b223/pkgs/applications/networking/browsers/firefox/common.nix#L76-L77 --- src/Nix/Parser.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Nix/Parser.hs b/src/Nix/Parser.hs index 6167cd5..4992cb9 100644 --- a/src/Nix/Parser.hs +++ b/src/Nix/Parser.hs @@ -643,7 +643,7 @@ nixOperators selector = , {- 13 -} [binaryL "||" NOr] , {- 14 -} - [binaryN "->" NImpl] + [binaryR "->" NImpl] ] data OperatorInfo = OperatorInfo