Skip to content

Commit 1a099c4

Browse files
committed
Atoms: add docs
1 parent f9b3b99 commit 1a099c4

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/Nix/Atoms.hs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,19 @@ import Data.Text ( Text
2121
import GHC.Generics ( Generic )
2222
import Data.Binary ( Binary )
2323
import Data.Aeson.Types ( FromJSON
24-
, ToJSON
25-
)
24+
, ToJSON
25+
)
2626

27-
-- | Atoms are values that evaluate to themselves. This means that
27+
-- | Atoms are values that evaluate to themselves.
28+
-- In other words - this is a constructors that are literals in Nix.
29+
-- This means that
2830
-- they appear in both the parsed AST (in the form of literals) and
29-
-- the evaluated form.
31+
-- the evaluated form as themselves.
32+
-- Once HNix parsed or evaluated into atom - that is a literal
33+
-- further after, for any further evaluation it is in all cases stays
34+
-- constantly itself.
35+
-- "atom", Ancient Greek \( atomos \) - "indivisible" particle,
36+
-- indivisible expression.
3037
data NAtom
3138
-- | An URI like @https://example.com@.
3239
= NURI Text

0 commit comments

Comments
 (0)