File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1202,6 +1202,16 @@ throwNix mnv =
12021202
12031203 throwError . ErrorCall . toString $ stringIgnoreContext ns
12041204
1205+ -- | Implementation of Nix @import@ clause.
1206+ --
1207+ -- Because Nix @import@s work strictly
1208+ -- (import gets fully evaluated befor bringing it into the scope it was called from)
1209+ -- - that property raises a requirement for execution phase of the interpreter go into evaluation phase
1210+ -- & then also go into parsing phase on the imports.
1211+ -- So it is not possible (more precise - not practical) to do a full parse Nix code phase fully & then go into evaluation phase.
1212+ -- As it is not possible to "import them lazily", as import is strict & it is not possible to establish
1213+ -- what imports whould be needed up until where it would be determined & they import strictly
1214+ --
12051215importNix
12061216 :: forall e t f m . MonadNix e t f m => NValue t f m -> m (NValue t f m )
12071217importNix = scopedImportNix $ nvSet mempty mempty
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ instance Convertible e t f m
211211 => FromValue ByteString m (NValue' t f m (NValue t f m )) where
212212
213213 fromValueMay =
214- pure .
214+ pure .
215215 \ case
216216 NVStr' ns -> encodeUtf8 <$> getStringNoContext ns
217217 _ -> mempty
You can’t perform that action at this time.
0 commit comments