Skip to content

Instantly share code, notes, and snippets.

@donabrams
Created June 12, 2017 14:30
Show Gist options
  • Select an option

  • Save donabrams/78a4245639436b311dcd884964f516c4 to your computer and use it in GitHub Desktop.

Select an option

Save donabrams/78a4245639436b311dcd884964f516c4 to your computer and use it in GitHub Desktop.
Mock API Gateway signature
start :: ApiGateway -> Request -> Response
create :: forall i, o.
{
method,
path,
intReq: Async (HTTPRequest -> i),
lambda: Async (i -> Tuple o Status),
intRes: Status -> o -> Async HTTPResponse
} -> ApiGateway
-- problems: does o differ per status but need to be synced between 7/8?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment