Skip to content

Commit 8d3af64

Browse files
committed
add some comments
1 parent 86922a1 commit 8d3af64

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/swarm-lang/Swarm/Language/Typecheck.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ data LocatedTCFrame = LocatedTCFrame SrcLoc TCFrame
121121
deriving (Show)
122122

123123
instance PrettyPrec LocatedTCFrame where
124-
-- TODO: print the SrcLoc somehow, need access to the original
124+
-- XXX: print the SrcLoc somehow, need access to the original
125125
-- source text though
126126
prettyPrec p (LocatedTCFrame _ f) = prettyPrec p f
127127

src/swarm-util/Swarm/Language/Syntax/Import.hs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ anchorToFilePath = \case
181181
Absolute -> "/"
182182
Web w -> into @FilePath w
183183

184-
-- XXX
184+
-- | Turn any anchor into a raw anchor.
185185
unresolveAnchor :: Anchor phase -> Anchor Raw
186186
unresolveAnchor = \case
187187
Absolute -> Absolute
@@ -262,7 +262,7 @@ dirToFilePath :: ImportDir Resolved -> FilePath
262262
dirToFilePath = withImportDir $ \a p ->
263263
anchorToFilePath a </> joinPath (map (into @FilePath) p)
264264

265-
-- XXX
265+
-- | Turn any import dir back into a raw one.
266266
unresolveImportDir :: ImportDir phase -> ImportDir Raw
267267
unresolveImportDir (ImportDir a p) = ImportDir (unresolveAnchor a) p
268268

@@ -330,7 +330,9 @@ importAnchor = withImportDir const . importDir
330330
locToFilePath :: ImportLoc Resolved -> FilePath
331331
locToFilePath (ImportLoc d f) = dirToFilePath d </> into @FilePath f
332332

333-
-- XXX
333+
-- | Append an import location to the end of an import dir, resulting
334+
-- in a new import location. That is, interpret the import location
335+
-- in the context of the given dir.
334336
(<//>) :: ImportDir phase -> ImportLoc phase -> ImportLoc phase
335337
d1 <//> ImportLoc d2 f = ImportLoc (d1 <> d2) f
336338

0 commit comments

Comments
 (0)