Skip to content

Commit f92a283

Browse files
Merge #975: add context notes
2 parents 03902a3 + 9dfec2b commit f92a283

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/Nix/Context.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Nix.Expr.Types.Annotated ( SrcSpan
99
)
1010
import Nix.Utils ( Has(..) )
1111

12+
-- 2021-07-18: NOTE: It should be Options -> Scopes -> Frames -> Source(span)
1213
data Context m t = Context
1314
{ scopes :: Scopes m t
1415
, source :: SrcSpan

src/Nix/Convert.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ instance ( Convertible e t f m
204204
(M.lookup "outPath" s)
205205
_ -> stub
206206

207+
-- 2021-07-18: NOTE: There may be cases where conversion wrongly marks the content to have a context.
208+
-- See: https://github.com/haskell-nix/hnix/pull/958#issuecomment-881949183 thread.
207209
fromValue = fromMayToValue $ TString HasContext
208210

209211
instance Convertible e t f m

src/Nix/String.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import Nix.Expr.Types ( VarName(..)
4646

4747
-- ** Context
4848

49+
-- 2021-07-18: NOTE: it should be ContextFlavor -> Varname.
4950
-- | A Nix 'StringContext' ...
5051
data StringContext =
5152
StringContext
@@ -104,6 +105,7 @@ type WithStringContext = WithStringContextT Identity
104105

105106
-- ** NixString
106107

108+
-- 2021-07-18: NOTE: It should be Context -> Contents.
107109
data NixString =
108110
NixString
109111
{ nsContents :: !Text

0 commit comments

Comments
 (0)