From 956e99918fefeb2d28f5826f51ea04d5d5fa6529 Mon Sep 17 00:00:00 2001 From: Daniel Firth <dan.firth@homotopic.tech> Date: Wed, 22 Feb 2023 15:01:23 +0000 Subject: [PATCH] add loadHorizon function --- shell/ShellRC.hs | 3 +++ shell/default.nix | 2 ++ 2 files changed, 5 insertions(+) diff --git a/shell/ShellRC.hs b/shell/ShellRC.hs index 38820cf7..5e234ee7 100644 --- a/shell/ShellRC.hs +++ b/shell/ShellRC.hs @@ -277,6 +277,9 @@ h :: HorizonExport -> Expr Src Import h (MakePackageSet (MkPackageSetExportSettings d _ (MkPackageSet _ (MkPackageList (Map.toList -> ys))))) = RecordLit $ DMap.fromList $ map ((\(MkName x, y) -> (x, y)) . uncurry f) ys +loadHorizon :: IO HorizonExport +loadHorizon = Dhall.inputFile @HorizonExport Dhall.auto "horizon.dhall" + go :: IO () go = do x <- Dhall.inputFile @HorizonExport Dhall.auto "horizon.dhall" diff --git a/shell/default.nix b/shell/default.nix index 184d5106..c1d2f165 100644 --- a/shell/default.nix +++ b/shell/default.nix @@ -54,6 +54,8 @@ let :set prompt-function promptFunction _init + + hz <- loadHorizon END grep -E '^import .*$' < ${shellrcSrc}/${shellrcModulePath} >> $out ''; -- GitLab