나는 WAI
인터페이스를 흥미롭게 보았고 단순 해 보이지만 현재의 형태로 안정화하는데 얼마나 많은 반복이 필요한지를보고 놀랐다.WAI 어플리케이션을 5 번 재 설계 한 이유는 무엇입니까?
저는 리소스 안전을위한 CPS 스타일이 가장 흥미로운 것이라 가정했지만, 배울 점이 많습니다.
$ git log -p --reverse -- wai/Network/Wai.hs | grep '\+type Application'
+type Application = Request -> Iteratee B.ByteString IO Response
+type Application = Request -> ResourceT IO Response
+type Application = Request -> C.ResourceT IO Response
+type Application = Request -> IO Response
+type Application = Request -> (forall b. (Response -> IO b) -> IO b)
+type Application = Request -> (Response -> IO ResponseReceived)
-> IO ResponseReceived
일부 고고학 수익률이 다소 만족스럽지 못한 결과 :
$ git log --reverse -G 'type Application' --pretty=oneline -- wai/Network/Wai.hs | cat
879d4a23047c3585e1cba4cdd7c3e8fc13e17592 Moved everything to wai subfolder
360442ac74f7e79bb0e320110056b3f44e15107c Began moving wai/warp to conduit
af7d1a79cbcada0b18883bcc5e5e19a1cd06ae7b conduit 0.3
fe2032ad4c7435709ed79683acac3b91110bba04 Pass around an InternalState instead of living in ResourceT
63ad533299a0a5bad01a36171d98511fdf8d5821 Application uses bracket pattern
1e1b8c222cce96c3d58cd27318922c318642050d ResponseReceived, to avoid existential issues
나는 재 설계 뒤에 * 힘 *을 주장하는 유혹을받을 수있다. – Carl