mirror of https://github.com/voidlizard/hbs2
fixed fixme-new wtf with lazy io
This commit is contained in:
parent
cb70ac7c66
commit
109971d74c
|
@ -365,22 +365,23 @@ Issue text...
|
||||||
flip runContT pure $ callCC \exit -> do
|
flip runContT pure $ callCC \exit -> do
|
||||||
fname <- liftIO $ Temp.writeTempFile "." "fixme-issue" txt
|
fname <- liftIO $ Temp.writeTempFile "." "fixme-issue" txt
|
||||||
|
|
||||||
h1 <- liftIO $ try @_ @SomeException (LBS.readFile fname)
|
ContT $ bracket none (const $ rm fname)
|
||||||
<&> fromRight mempty
|
|
||||||
|
h1 <- liftIO (BS.readFile fname)
|
||||||
<&> hashObject @HbSync
|
<&> hashObject @HbSync
|
||||||
|
|
||||||
ContT $ bracket none (const $ rm fname)
|
debug $ "hash1" <+> pretty h1
|
||||||
|
|
||||||
void $ runProcess $ shell [qc|{editor} {fname}|]
|
void $ runProcess $ shell [qc|{editor} {fname}|]
|
||||||
|
|
||||||
s <- liftIO $ LBS.readFile fname
|
s <- liftIO $ BS.readFile fname <&> LBS.fromStrict
|
||||||
|
|
||||||
h2 <- liftIO $ try @_ @SomeException (LBS.readFile fname)
|
let h2 = hashObject @HbSync s
|
||||||
<&> fromRight mempty
|
|
||||||
<&> hashObject @HbSync
|
|
||||||
|
|
||||||
fxs <- lift $ scanBlobOpts NoIndents Nothing s
|
fxs <- lift $ scanBlobOpts NoIndents Nothing s
|
||||||
|
|
||||||
|
debug $ "hash before/after" <+> pretty h1 <+> pretty h2
|
||||||
|
|
||||||
when (h1 == h2) $ exit ()
|
when (h1 == h2) $ exit ()
|
||||||
|
|
||||||
lift $ withState $ transactional do
|
lift $ withState $ transactional do
|
||||||
|
|
Loading…
Reference in New Issue