By | ~fr33domlover |
At | 2018-05-24 |
Title | Split hash parsing out of the patch info parser to allow reuse of the latter |
Description |
Edit file src/Development/Darcs/Internal/Inventory/Parser.hs 0 → 0
+ 35 , patchInfoRawP'
… … … … - 174 patchInfoRawP :: Parser (PatchInfoRaw, (Int, ByteString))
- 175 patchInfoRawP = do
+ 175 patchInfoRawP' :: Parser PatchInfoRaw
+ 176 patchInfoRawP' = do
… … … … - 192 string "] \nhash: "
- 193 + 193 string "] "
+ 194 + 195 return PatchInfoRaw
+ 196 { pirAuthor = author
+ 197 , pirTitle = title
+ 198 , pirDescription = lines
+ 199 , pirJunkPrefix = junkp
+ 200 , pirJunkContent = junkc
+ 201 , pirTime = (timeRaw, time)
+ 202 , pirInverted = inverted
+ 203 }
+ 204 + 205 patchInfoRawP :: Parser (PatchInfoRaw, (Int, ByteString))
+ 206 patchInfoRawP = do
+ 207 pir <- patchInfoRawP'
+ 208 string "\nhash: "
… … … … - 209 - 210 return
- 211 ( PatchInfoRaw
- 212 { pirAuthor = author
- 213 , pirTitle = title
- 214 , pirDescription = lines
- 215 , pirJunkPrefix = junkp
- 216 , pirJunkContent = junkc
- 217 , pirTime = (timeRaw, time)
- 218 , pirInverted = inverted
- 219 }
- 220 , hash
- 221 )
+ 224 return (pir, hash)
… … … …