patch applied (hackage-server): "Make lexer monadic (avoid use of 'error')"
devnull at community.haskell.org
devnull at community.haskell.org
Wed Jul 31 18:42:06 CEST 2013
Wed Jul 31 11:55:59 BST 2013 Edsko de Vries <edsko at well-typed.com>
* Make lexer monadic (avoid use of 'error')
Ignore-this: 18ade47907e883b16d1ba5fadd6b6b4d
Importing package metadata was failing because the packageAddHook added by the
Search feature was parsing the package description, and if this had a lexical
error (as far as the Haddock lexer was concerned) it would throw a runtime
error which would eventually result in a Internal Error 500 error. The lexical
now returns a value in the Either String monad, just like the parser, so that
we can run
Haddock.tokenise >=> Haddock.parseHaddockParagraphs
to savely lex and parse, without worrying about exceptions in pure code.
M ./Distribution/Server/Features/Search/ExtractDescriptionTerms.hs -5 +4
M ./Distribution/Server/Pages/Package.hs -1 +1
M ./Distribution/Server/Pages/Package/HaddockLex.x -7 +8
More information about the cabal-devel
mailing list