@@ -88,7 +88,10 @@ let
8888
8989 let
9090 # The Stackage release referenced in the stack config
91− pkg-def = stackage.${stack-pkgs.resolver};
91+ pkg-def = stackage.${stack-pkgs.resolver} or (throw ''
92+ This version of stackage.nix does not know about the Stackage resolver ${stack-pkgs.resolver}.
93+ You may need to update haskell.nix to one that includes a newer stackage.nix.
94+ '');
9295 # The compiler referenced in the stack config
9396 compiler = (stack-pkgs.extras hackage).compiler or (pkg-def hackage).compiler;
9497 patchesModule = ghcHackagePatches.${compiler.nix-name} or {};
@@ -109,10 +112,11 @@ let
109112 pkg-def = plan-pkgs.pkgs;
110113 # The compiler referenced in the stack config
111114 compiler = (plan-pkgs.extras hackage).compiler or (pkg-def hackage).compiler;
115+ patchesModule = ghcHackagePatches.${compiler.nix-name} or {};
112116 in self.mkPkgSet {
113117 inherit pkg-def;
114118 pkg-def-extras = [ plan-pkgs.extras ] ++ pkg-def-extras;
115− modules = [ ghcHackagePatches.${compiler.nix-name} ] ++ modules;
119+ modules = [ patchesModule ] ++ modules;
116120 };
117121
118122 # Package sets for all stackage snapshots.