From dc492386c88e79b96f821cdfc9a303f12ea02ef9 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Sun, 18 Jul 2021 14:51:37 +0300 Subject: [PATCH 1/4] Convert: FromValue (to NixString): fromValue: add note on context --- src/Nix/Convert.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Nix/Convert.hs b/src/Nix/Convert.hs index dff195470..ab813fac4 100644 --- a/src/Nix/Convert.hs +++ b/src/Nix/Convert.hs @@ -204,6 +204,8 @@ instance ( Convertible e t f m (M.lookup "outPath" s) _ -> stub + -- 2021-07-18: NOTE: There may be cases where conversion wrongly marks the content to have a context. + -- See: https://github.com/haskell-nix/hnix/pull/958#issuecomment-881949183 thread. fromValue = fromMayToValue $ TString HasContext instance Convertible e t f m From c520798eec0bdee079aff954a4a9be05498ec8e9 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Sun, 18 Jul 2021 14:52:49 +0300 Subject: [PATCH 2/4] String: NixString: add note --- src/Nix/String.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Nix/String.hs b/src/Nix/String.hs index 262d43709..3ad4c17cc 100644 --- a/src/Nix/String.hs +++ b/src/Nix/String.hs @@ -104,6 +104,7 @@ type WithStringContext = WithStringContextT Identity -- ** NixString +-- 2021-07-18: NOTE: It should be Context -> Contents. data NixString = NixString { nsContents :: !Text From 28a01d1797fd76f7eaad4911010783eb7e7e59ee Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Sun, 18 Jul 2021 14:53:25 +0300 Subject: [PATCH 3/4] Context: Context: add note --- src/Nix/Context.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Nix/Context.hs b/src/Nix/Context.hs index 1b4ee60fa..f7b943f1c 100644 --- a/src/Nix/Context.hs +++ b/src/Nix/Context.hs @@ -9,6 +9,7 @@ import Nix.Expr.Types.Annotated ( SrcSpan ) import Nix.Utils ( Has(..) ) +-- 2021-07-18: NOTE: It should be Options -> Scopes -> Frames -> Source(span) data Context m t = Context { scopes :: Scopes m t , source :: SrcSpan From 9dfec2ba33f4b274db49810757b45f88d9a32199 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Sun, 18 Jul 2021 14:55:51 +0300 Subject: [PATCH 4/4] String: StringContext: add note --- src/Nix/String.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Nix/String.hs b/src/Nix/String.hs index 3ad4c17cc..27c6b2faa 100644 --- a/src/Nix/String.hs +++ b/src/Nix/String.hs @@ -46,6 +46,7 @@ import Nix.Expr.Types ( VarName(..) -- ** Context +-- 2021-07-18: NOTE: it should be ContextFlavor -> Varname. -- | A Nix 'StringContext' ... data StringContext = StringContext