mirror of
https://github.com/haskell-nix/hnix-store.git
synced 2024-09-11 18:05:56 +03:00
remote: neaten readme
This commit is contained in:
parent
5e909dbbd5
commit
4562922d7e
@ -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
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user