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 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 diff --git a/src/Nix/String.hs b/src/Nix/String.hs index 262d43709..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 @@ -104,6 +105,7 @@ type WithStringContext = WithStringContextT Identity -- ** NixString +-- 2021-07-18: NOTE: It should be Context -> Contents. data NixString = NixString { nsContents :: !Text