diff --git a/src/Juvix/Compiler/Pipeline/Lockfile.hs b/src/Juvix/Compiler/Pipeline/Lockfile.hs index df9876e3ee..02657bec30 100644 --- a/src/Juvix/Compiler/Pipeline/Lockfile.hs +++ b/src/Juvix/Compiler/Pipeline/Lockfile.hs @@ -108,11 +108,14 @@ lockfileEncodeConfig = setConfCompare keyCompare defConfig writeLockfile :: (Members '[Files] r) => Path Abs Dir -> Lockfile -> Sem r () writeLockfile root lf = do ensureDir' (parent lockfilePath) - writeFileBS lockfilePath (encodePretty lockfileEncodeConfig lf) + writeFileBS lockfilePath (header <> encodePretty lockfileEncodeConfig lf) where lockfilePath :: Path Abs File lockfilePath = mkPackageLockfilePath root + header :: ByteString + header = "# This file was autogenerated by Juvix.\n# Do not edit this file manually.\n\n" + -- | Extract a lockfileInfo associated with an immediate dependency. Returns Nothing -- if the dependency is not specified at the root of the lockfile. extractLockfileInfo :: LockfileInfo -> Dependency -> Maybe LockfileInfo