Skip to content

Instantly share code, notes, and snippets.

@kozross
Created October 20, 2020 03:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kozross/a90e4554562d2f056d3c4c3c20da0545 to your computer and use it in GitHub Desktop.
Save kozross/a90e4554562d2f056d3c4c3c20da0545 to your computer and use it in GitHub Desktop.
module Reader where
data ReaderF (r :: Type) (a :: Type) where
Ask :: ReaderF r r
Local :: (r -> r) -> (Free (ReaderF r) a) -> ReaderF r a
newtype Reader (r :: Type) (a :: Type) = R (Free (ReaderF r) a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment