Skip to content

Instantly share code, notes, and snippets.

@chuwy
Last active October 28, 2024 18:26
Show Gist options
  • Save chuwy/b42c579c0e6d9e24dd2368c7a7837e3f to your computer and use it in GitHub Desktop.
Save chuwy/b42c579c0e6d9e24dd2368c7a7837e3f to your computer and use it in GitHub Desktop.
Foo : [Foo I8]
Bar : [Bar U8]
Reader a : (a -> Str)
flatMap : Reader a, (a -> Reader b) -> Reader b
flatMap = crash "implement flatMap"
foo : Reader Foo
foo = crash "implement Reader Foo"
bar : Reader Bar
bar = crash "implement Reader Bar"
getBar : Foo -> Reader Bar
getBar = \f -> bar
unsound : Reader Bar
unsound = flatMap foo getBar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment