{"id":{"repo_id":"ku","oai_identifier":"oai:kuscholarworks.ku.edu:1808/34974"},"canonical_url":"https://search.ndltd.org/etd/ku/oai:kuscholarworks.ku.edu:1808/34974","repository":{"repo_id":"ku","name":"University of Kansas","base_url":"https://kuscholarworks.ku.edu/server/oai/request"},"display":{"title":"Promise Land: Proving Correctness with Strongly Typed Javascript-Style Promises","abstract":"Code that can run asynchronously is important in a wide variety of situations, from user interfacesto communication over networks, to the use of concurrency for performance gains. One widely- used method of specifying asynchronous control flow is the Promise model as used in Javascript. Promises are powerful, but can be confusing and hard to debug. This problem is exacerbated by Javascript’s permissive type system, where erroneous code is likely to fail silently, with values being implicitly coerced into unexpected types at runtime. The work presented here implements Javascript-style Promises in Haskell, translating the model to a strongly typed framework where we can use the type system to rule out some classes of bugs. Common errors — such as failure to call one of the callbacks of an executor, which would, in Javascript, leave the Promise in an eternally-pending deadlock state — can be detected for free by the type system at compile time and corrected without even needing to run the code. Along the way, we demonstrate that Promises form a monad, providing a monad instance that allows code using Promises to be written using Haskell’s do notation.","abstract_html":"Code that can run asynchronously is important in a wide variety of situations, from user interfacesto communication over networks, to the use of concurrency for performance gains. One widely- used method of specifying asynchronous control flow is the Promise model as used in Javascript. Promises are powerful, but can be confusing and hard to debug. This problem is exacerbated by Javascript’s permissive type system, where erroneous code is likely to fail silently, with values being implicitly coerced into unexpected types at runtime. The work presented here implements Javascript-style Promises in Haskell, translating the model to a strongly typed framework where we can use the type system to rule out some classes of bugs. Common errors — such as failure to call one of the callbacks of an executor, which would, in Javascript, leave the Promise in an eternally-pending deadlock state — can be detected for free by the type system at compile time and corrected without even needing to run the code. Along the way, we demonstrate that Promises form a monad, providing a monad instance that allows code using Promises to be written using Haskell’s do notation.","abstract_has_math":false,"creators":["Elliott, Andrei Darien"],"institution":"University of Kansas","degree_name":"M.S.","degree_level":null,"degree_discipline":"Electrical Engineering & Computer Science","degree_department":null,"school":null,"contributors":[],"advisors":["Moore, Matthew"],"committee_chairs":[],"committee_members":["Alexander, Perry","Davidson, Drew"],"year":2022,"date_issued":"2022-05-31","date_published":"2022-05-31","updated_at":"2026-11-19T04:50:05Z","subjects":["Computer science","asynchronous","haskell","javascript","promises"],"languages":["en"],"rights":["Copyright held by the author."],"rights_urls":[],"identifier_entries":[{"key":"dc:identifier.other","label":"Dc Identifier Other","values":["https://www.proquest.com/docview/2708716216"],"render_values":[{"text":"https://www.proquest.com/docview/2708716216","href":"https://www.proquest.com/docview/2708716216","code":true}]}],"person_identifier_entries":[{"key":"dc:identifier.orcid","label":"ORCID","values":["0000-0003-4680-6563"],"render_values":[{"text":"0000-0003-4680-6563","href":"https://orcid.org/0000-0003-4680-6563","code":true}]}]},"links":{"outbound_url":"https://hdl.handle.net/1808/34974","outbound_label":"Handle","outbound_source":"dc:identifier.uri","record_url":"https://hdl.handle.net/1808/34974","record_label":"Repository record","record_kind":"handle","record_source":"dc:identifier.uri","access_status":null,"embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Aku%3Aoai%3Akuscholarworks.ku.edu%3A1808%2F34974","prefix":"oai_dc"},"source_record":{"url":"https://kuscholarworks.ku.edu/server/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Akuscholarworks.ku.edu%3A1808%2F34974","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["Moore, Matthew"]},{"key":"dc:contributor.committeemember","label":"Committee Member","values":["Alexander, Perry","Davidson, Drew"]},{"key":"dc:creator","label":"Author","values":["Elliott, Andrei Darien"]},{"key":"dc:identifier.orcid","label":"ORCID","values":["0000-0003-4680-6563"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2024-03-29T22:29:41Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2024-03-29T22:29:41Z"]},{"key":"dc:date.issued","label":"Date","values":["2022-05-31"]},{"key":"dc:date.submitted","label":"Dc Date Submitted","values":["2022"]},{"key":"dc:publisher","label":"Institution","values":["University of Kansas"]},{"key":"dc:type","label":"Dc Type","values":["Thesis"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Electrical Engineering & Computer Science"]},{"key":"thesis:degree_name","label":"Degree Name","values":["M.S."]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Computer science","asynchronous","haskell","javascript","promises"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["en"]},{"key":"dc:rights","label":"Dc Rights","values":["Copyright held by the author."]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.other","label":"Dc Identifier Other","values":["https://www.proquest.com/docview/2708716216"]},{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/1808/34974"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["Code that can run asynchronously is important in a wide variety of situations, from user interfacesto communication over networks, to the use of concurrency for performance gains. One widely- used method of specifying asynchronous control flow is the Promise model as used in Javascript. Promises are powerful, but can be confusing and hard to debug. This problem is exacerbated by Javascript’s permissive type system, where erroneous code is likely to fail silently, with values being implicitly coerced into unexpected types at runtime. The work presented here implements Javascript-style Promises in Haskell, translating the model to a strongly typed framework where we can use the type system to rule out some classes of bugs. Common errors — such as failure to call one of the callbacks of an executor, which would, in Javascript, leave the Promise in an eternally-pending deadlock state — can be detected for free by the type system at compile time and corrected without even needing to run the code. Along the way, we demonstrate that Promises form a monad, providing a monad instance that allows code using Promises to be written using Haskell’s do notation."]},{"key":"dc:description.note","label":"Dc Description Note","values":["This item contains archived web content."]},{"key":"dc:format.extent","label":"Dc Format Extent","values":["35 pages"]},{"key":"dc:title","label":"Title","values":["Promise Land: Proving Correctness with Strongly Typed Javascript-Style Promises"]},{"key":"dspace:entity.type","label":"Dspace Entity Type","values":["Publication"]}]}],"canonical_facts":{"dc:contributor.advisor":["Moore, Matthew"],"dc:contributor.committeemember":["Alexander, Perry","Davidson, Drew"],"dc:creator":["Elliott, Andrei Darien"],"dc:date.accessioned":["2024-03-29T22:29:41Z"],"dc:date.available":["2024-03-29T22:29:41Z"],"dc:date.issued":["2022-05-31"],"dc:date.submitted":["2022"],"dc:description.abstract":["Code that can run asynchronously is important in a wide variety of situations, from user interfacesto communication over networks, to the use of concurrency for performance gains. One widely- used method of specifying asynchronous control flow is the Promise model as used in Javascript. Promises are powerful, but can be confusing and hard to debug. This problem is exacerbated by Javascript’s permissive type system, where erroneous code is likely to fail silently, with values being implicitly coerced into unexpected types at runtime. The work presented here implements Javascript-style Promises in Haskell, translating the model to a strongly typed framework where we can use the type system to rule out some classes of bugs. Common errors — such as failure to call one of the callbacks of an executor, which would, in Javascript, leave the Promise in an eternally-pending deadlock state — can be detected for free by the type system at compile time and corrected without even needing to run the code. Along the way, we demonstrate that Promises form a monad, providing a monad instance that allows code using Promises to be written using Haskell’s do notation."],"dc:description.note":["This item contains archived web content."],"dc:format.extent":["35 pages"],"dc:identifier.orcid":["0000-0003-4680-6563"],"dc:identifier.other":["https://www.proquest.com/docview/2708716216"],"dc:identifier.uri":["https://hdl.handle.net/1808/34974"],"dc:language.iso":["en"],"dc:publisher":["University of Kansas"],"dc:rights":["Copyright held by the author."],"dc:subject":["Computer science","asynchronous","haskell","javascript","promises"],"dc:title":["Promise Land: Proving Correctness with Strongly Typed Javascript-Style Promises"],"dc:type":["Thesis"],"dspace:entity.type":["Publication"],"thesis:degree_discipline":["Electrical Engineering & Computer Science"],"thesis:degree_name":["M.S."]},"updated_at":"2026-11-19T04:50:05Z"}