ff-notes / ron

Haskell implementation of RON and RON-RDT
BSD 3-Clause "New" or "Revised" License
65 stars 9 forks source link

#82 Add ability to runStorage with specific identifier #107

Closed iupii closed 5 years ago

iupii commented 5 years ago

This change is Reviewable

iupii commented 5 years ago

ron-storage/lib/RON/Storage/FS.hs, line 154 at r1 (raw file):

Previously, cblp (Yuriy Syrovetskiy) wrote…
No need to run the generator if there is a mac address: ``` hReplicaId <- do mMacAddress <- getMacAddress case mMacAddress of Just mac -> pure mac ```

Maybe without do?

replicaId <- case macAddress of
        Just macAddress' -> pure macAddress'
        Nothing -> fst . random <$> newTFGen
cblp commented 5 years ago

Great start! Thanks!