Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Either Error Success
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Tim McGilchrist
May 24, 2018
Programming
170
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Either Error Success
Tim McGilchrist
May 24, 2018
More Decks by Tim McGilchrist
See All by Tim McGilchrist
Dependently Typed State Machines
lambda_foo
0
210
Code reuse through polymorphic variants
lambda_foo
1
260
Idris States: Dependent types, not just for vectors?
lambda_foo
0
280
RAFT: Implementing Distributed Consensus with Erlang
lambda_foo
4
710
Other Decks in Programming
See All in Programming
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
240
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
150
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1.1k
【QA Test Talk Vol.8】AI-DLC による Whole Team Approach の加速
pkshadeck
PRO
0
220
仕様駆動開発の消費期限
watany
20
8.8k
仕様書を書く前にハーネスを作る - Agent Native開発は「探索を速く、判定を固く」
gotalab555
4
1.7k
How I Won Prize Money at a Hackathon Using Codex and Symphony Alpha
yasei_no_otoko
0
110
AI Engineeringは、AIプロダクトだけのものか? 〜AIがソフトウェアを作る時代の新しい当たり前〜 / No AI in your product. AI Engineering in your development.
rkaga
5
490
React本体のコードリーディング
high_g_engineer
1
150
Japan Community Day at Kubecon + CloudNativeCon Japan 2026: Learning Container Privilege Control by Building My Own Low-Level Container Runtime
ternbusty
1
170
VibeCodingからAgenticWorkflowへ
starfish719
0
700
MySQLとPostgreSQLって何が違うの?
akagami
0
120
Featured
See All Featured
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
650
Facilitating Awesome Meetings
lara
57
7.1k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
170
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
64
56k
Designing for Timeless Needs
cassininazir
1
450
Skip the Path - Find Your Career Trail
mkilby
1
190
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
490
The untapped power of vector embeddings
frankvandijk
2
1.8k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
270
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Transcript
None
Either Error Success FP-SYD 2018
Introduction • who, what, why, where, how questions • who
-> Tim McGilchrist @lambda_foo • what -> exciting area of error handling • where -> in Haskell mostly • how -> with functions and data types
–Mark H “I have people sitting around solutionizing”
Examples • Code
–Nick H “I will admit human error played a large
part”
The Async Problem • Asynchronous exceptions are a feature of
Haskell • No fancy effect systems or modular IO effects • Deal with it! • Code in IO can fail at any point with an exception
Exception Pattern • Code
Exception Pattern • type signature doesn’t indicate errors • exceptions
compose without effort • no stack traces by default • dealing with exceptions properly is hard
EitherT Pattern • Code
EitherT Pattern • pattern matching has your back • composition
is explicit (you need to think) • application stack traces • constrained exception handling • extra work • interfacing with exception heavy code
Transformers Either • Code
Either Examples • mismi - wrapper around Amazonka • mafia
- cabal build tool • boris - continuous integration / builds
Exception Examples • http-client - http library • stack -
Haskell build tool ++ • hs-tls - Native Haskell TLS / SSL implementation
Conclusion • make error behaviour explicit • use appropriate tool
for the job • EitherT yields more maintainable code • similar or less effort to exceptions
Resources • https://simonmar.github.io/posts/2017-01-24- asynchronous-exceptions.html • https://haskell-lang.org/library/safe-exceptions • https://www.fpcomplete.com/blog/2016/11/exceptions- best-practices-haskell •
https://simonmar.github.io/bib/papers/async.pdf