jwaldmann / star-exec-presenter

presentation platform for star-exec written in Haskell and based upon Yesod
2 stars 7 forks source link

How to _bracket in yesod-1.6? #185

Closed jwaldmann closed 6 years ago

jwaldmann commented 6 years ago

e.g., Presenter/StarExec/Connection.hs

runCon_exclusive :: Handler b -> Handler b
runCon_exclusive action = do
  lock <- conSem <$> getYesod
  -- Lock.withWrite lock action
  -- FIXME:
  -- bracket_
    -- ( liftIO $ Lock.acquireWrite lock )
    -- ( liftIO $ (Lock.releaseWrite >=> either throw return) lock)
  action
jwaldmann commented 6 years ago

cf. https://mail.haskell.org/pipermail/haskell-cafe/2018-April/128981.html and follow-up