You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the dhall-docs executable from the 1.42.0 release on the following file:
let isZero = \(x : Natural) -> x === 0
let errorGeneratingDocs
= \(n : Natural) -> \(p : isZero n) ->
True
in errorGeneratingDocs
results in:
dhall-docs: Prelude.head: empty list
A binary I compiled myself reveals some more detail:
CallStack (from HasCallStack):
error, called at libraries/base/GHC/List.hs:1646:3 in base:GHC.List
errorEmptyList, called at libraries/base/GHC/List.hs:85:11 in base:GHC.List
badHead, called at libraries/base/GHC/List.hs:81:28 in base:GHC.List
head, called at src/Dhall/Docs/CodeRenderer.hs:378:127 in dhall-docs-1.0.11-inplace:Dhall.Docs.CodeRenderer
-- calls to `head` and `last` here should never fail since `importLines`
-- have at least one element
let (firstImportLine, lastImportLine) = (head importLines, last importLines)
let prefixCols =Text.take (importStartCol - currCol) firstImportLine
let suffixCols =Text.drop (importEndCol - currCol) lastImportLine
What I found out is that the bug seems somehow related to whitespace (e.g. removing the indentation or even replacing tabs with spaces makes the error disappear).
The text was updated successfully, but these errors were encountered:
Running the
dhall-docs
executable from the 1.42.0 release on the following file:results in:
A binary I compiled myself reveals some more detail:
The relevant code is:
dhall-haskell/dhall-docs/src/Dhall/Docs/CodeRenderer.hs
Lines 375 to 379 in 4d21a18
What I found out is that the bug seems somehow related to whitespace (e.g. removing the indentation or even replacing tabs with spaces makes the error disappear).
The text was updated successfully, but these errors were encountered: