Update only specific field of specific item (data) in List from YAML I don't like the logic to update [Repository] list here because I need to map whole list to change only specific field of specific node,  I especially don't like that I need to provide all other fields in changing node alike (location x) etc... Major trouble there is that if I will edit data model I will be forced to edit a lot of code where I use it like this.

hashupdate :: String -&gt; String -&gt; IO ()
hashupdate hash rep =
  withConfig $ \ymlx -&gt;
    let ymlprocess = ifSo $ do
        rsdata &lt;- yDecode ymlx :: IO [Repository]
        let ed = map enR rsdata
                        where enR x = if rep == (location x)
                                            then (Repository (location x)
                                                             (branches x)
                                                             (upstream x)
                                                             (enabled x)
                                                             (clean x)
                                                             (post_rebuild x)
                                                             (syncGroup x)
                                                             (Just hash))
                                            else x
        yEncode ymlx ed
    in doesFileExist ymlx &gt;&gt;= ymlprocess


The other definitions used there is here:

data Repository = Repository { location      :: String
                             , branches      :: [String]
                             , upstream      :: String
                             , enabled       :: Maybe Bool
                             , clean         :: Maybe Bool
                             , post_rebuild  :: Maybe [String]
                             , syncGroup     :: Maybe String
                             , hash          :: Maybe String
                             } deriving (Show, Eq)

yEncode :: ToJSON iToJSONable =&gt; FilePath -&gt; iToJSONable -&gt; IO()
yEncode fnm dat = do
  let bs = Data.Yaml.encode dat
  BS.writeFile fnm bs
I don't like that I need to provide all other fields in changing node
  alike (location x) etc...


You can "update" a field of a record like so:

where enR x = if rep == location x then x { hash = Just hash } else x


I would recommend against names like fnm, dat, ed, enR, etc. You should also use consistent casing (postRebuild instead of post_rebuild).