File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
swarm-lang/Swarm/Language
swarm-util/Swarm/Language/Syntax Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ data LocatedTCFrame = LocatedTCFrame SrcLoc TCFrame
121121 deriving (Show )
122122
123123instance 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
Original file line number Diff line number Diff 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.
185185unresolveAnchor :: Anchor phase -> Anchor Raw
186186unresolveAnchor = \ case
187187 Absolute -> Absolute
@@ -262,7 +262,7 @@ dirToFilePath :: ImportDir Resolved -> FilePath
262262dirToFilePath = withImportDir $ \ a p ->
263263 anchorToFilePath a </> joinPath (map (into @ FilePath ) p)
264264
265- -- XXX
265+ -- | Turn any import dir back into a raw one.
266266unresolveImportDir :: ImportDir phase -> ImportDir Raw
267267unresolveImportDir (ImportDir a p) = ImportDir (unresolveAnchor a) p
268268
@@ -330,7 +330,9 @@ importAnchor = withImportDir const . importDir
330330locToFilePath :: ImportLoc Resolved -> FilePath
331331locToFilePath (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
335337d1 <//> ImportLoc d2 f = ImportLoc (d1 <> d2) f
336338
You can’t perform that action at this time.
0 commit comments