Created
April 17, 2018 15:33
-
-
Save deque-blog/ceb2bb812f4f5691a23eeed123658ab5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
newtype RequestCache req = | |
RequestCache (forall a. HashMap (req a) (MVar a)) | |
emptyCache :: RequestCache req | |
lookupCache :: IRequest req a => req a -> RequestCache req -> Maybe (MVar a) | |
insertCache :: IRequest req a => req a -> MVar a -> RequestCache req -> RequestCache req |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment