Skip to content

Instantly share code, notes, and snippets.

@Akii
Created October 19, 2019 17:07
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 Akii/258ce3cd7dd9b7e12076b0ea6d663058 to your computer and use it in GitHub Desktop.
Save Akii/258ce3cd7dd9b7e12076b0ea6d663058 to your computer and use it in GitHub Desktop.
Must look like magic for some folks
executeForm :: FormV2 -> Bool -> PageM [TagTree LBS.ByteString]
executeForm FormV2 {..} doSubmit = do
initRequest
personalPage personal
disabilitiesPage disabilities
outwardMeetingPoints <- executeOutwardConnection outwardTrainRide (isJust returnTrainRide)
returnMeetingPoints <- executeReturnConnection returnTrainRide
meetingPointsPage outwardMeetingPoints returnMeetingPoints
aidServicesPage aidServices
res <- getCurrentResponse
when doSubmit executeSubmitForm
return res
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment