Add withXxx and withXxxOpen wrappers for begin/end pairs (#49)

Adds dependency on unliftio for monad-preserving brackets.

Fixes #32
This commit is contained in:
Alexander Bondarenko
2021-04-18 13:10:20 +03:00
committed by GitHub
parent b921a72960
commit 8723ac2625
3 changed files with 202 additions and 2 deletions

View File

@ -55,7 +55,7 @@ mainLoop w = do
newFrame
-- Build the GUI
bracket_ (begin "Hello, ImGui!") end do
withWindowOpen "Hello, ImGui!" do
-- Add a text widget
text "Hello, ImGui!"