Skip to content

Commit 67e14ca

Browse files
committed
Handle errors located in raw strings
1 parent 820499d commit 67e14ca

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Nix/Render.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ posAndMsg (SourcePos _ lineNo _) msg = FancyError
7777

7878
renderLocation :: MonadFile m => SrcSpan -> Doc a -> m (Doc a)
7979
renderLocation (SrcSpan (SourcePos file begLine begCol) (SourcePos file' endLine endCol)) msg
80+
| file == file' && file == "<string>" && begLine == endLine
81+
= pure $ "In raw input string at position " <> pretty (unPos begCol)
82+
8083
| file /= "<string>" && file == file'
8184
= do
8285
exist <- doesFileExist file

0 commit comments

Comments
 (0)