summaryrefslogtreecommitdiff
path: root/utils/haddock
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2020-01-23 23:03:04 +0300
committerVladislav Zavialov <vlad.z.4096@gmail.com>2020-02-28 17:11:37 +0300
commit0e697d541fadbe965c8185bdc10e3b68417401cc (patch)
treeb4a12cdb3d13babfdd1ed0221b5c20f57e147e2f /utils/haddock
parentf97d1fb614ff7638d13eb7c552d2a72fce4c613a (diff)
downloadhaskell-wip/monotonic-loc.tar.gz
Monotonic locations (#17632)wip/monotonic-loc
When GHC is parsing a file generated by a tool, e.g. by the C preprocessor, the tool may insert #line pragmas to adjust the locations reported to the user. As the result, the locations recorded in RealSrcLoc are not monotonic. Elements that appear later in the StringBuffer are not guaranteed to have a higher line/column number. In fact, there are no guarantees whatsoever, as #line pragmas can arbitrarily modify locations. This lack of guarantees makes ideas such as #17544 infeasible. This patch adds an additional bit of information to every SrcLoc: newtype BufPos = BufPos { bufPos :: Int } A BufPos represents the location in the StringBuffer, unaffected by any pragmas. Updates haddock submodule. Metric Increase: haddock.Cabal haddock.base haddock.compiler MultiLayerModules Naperian parsing001 T12150
Diffstat (limited to 'utils/haddock')
m---------utils/haddock0
1 files changed, 0 insertions, 0 deletions
diff --git a/utils/haddock b/utils/haddock
-Subproject 78d0e033a2f8ce5dc1f5e2e4eb8b823ee4d1d1b
+Subproject b104c573fdc6efcecc3bfaa2fb6084b7679f32d