attoparsec parser for presence logs
This commit is contained in:
parent
bfc9039ead
commit
ef8ddaa713
3 changed files with 54 additions and 10 deletions
|
@ -17,6 +17,7 @@ import Prelude
|
|||
import Utility.Env
|
||||
import Utility.TimeStamp
|
||||
import Utility.QuickCheck
|
||||
import qualified Data.Attoparsec.ByteString.Lazy as A
|
||||
|
||||
-- | Some very old logs did not have any time stamp at all;
|
||||
-- Unknown is used for those.
|
||||
|
@ -44,3 +45,6 @@ formatVectorClock (VectorClock t) = show t
|
|||
|
||||
parseVectorClock :: String -> Maybe VectorClock
|
||||
parseVectorClock t = VectorClock <$> parsePOSIXTime t
|
||||
|
||||
vectorClockParser :: A.Parser VectorClock
|
||||
vectorClockParser = VectorClock <$> parserPOSIXTime
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue