Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
flohofwoe
1y ago
0 comments
Save
Share
How do you talk to typical OS-, IO- or GUI-APIs (which all essentially represent global mutable state) in Haskell with pure functional code?
0 comments
2 comments · 2 top-level
top
newest
oldest
IsTom
1y ago
A toy mental model could be e.g. a function that takes OS/IO/GUI events and produces actions (which are then executed by the caller) and then iterate it as long as the program runs. This function in itself can be pure.
louthy
1y ago
via the IO monad.
j
/
k
navigate · click thread line to collapse