remote: neaten readme

This commit is contained in:
sorki 2023-12-09 16:42:36 +01:00
parent 5e909dbbd5
commit 4562922d7e

View File

@ -14,17 +14,14 @@ via `nix-daemon`.
```haskell ```haskell
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedStrings #-}
import Control.Monad (void)
import Control.Monad.IO.Class (liftIO)
import System.Nix.StorePath (mkStorePathName) import System.Nix.StorePath (mkStorePathName)
import System.Nix.Store.Remote import System.Nix.Store.Remote
main :: IO () main :: IO ()
main = do main = do
void $ runStore $ do runStore $ do
syncWithGC syncWithGC
roots <- findRoots roots <- findRoots
liftIO $ print roots
res <- case mkStorePathName "hnix-store" of res <- case mkStorePathName "hnix-store" of
Left e -> error (show e) Left e -> error (show e)
@ -33,5 +30,7 @@ main = do
(StoreText name "Hello World!") (StoreText name "Hello World!")
mempty mempty
RepairMode_DontRepair RepairMode_DontRepair
liftIO $ print res
pure (roots, res)
>>= print
``` ```