Open
Description
Docs typecheck blocks containing elements named the same but with different implementations render only first implementation.
This comes up when documenting different examples of how to write a given expression. In one doc element you may reference a term which happens to have the same name across examples.
(example term attached here because transcript parser is struggling with triple backticks).
fundamentals.abilities.exercises.ex1 : Doc
fundamentals.abilities.exercises.ex1 =
use Map get
{{
Given the type signatures below, implement the functions to satisfy the
compiler using the request operations of the Ability or functions found in
''.base''
@typecheck ```
getWithAbort : a -> Map a b ->{Abort} b
g`etWithAbort key map = base.todo "implement me!"
```
@typecheck ```
getWithAbort : a -> Map a b ->{Abort} b
getWithAbort key map = toAbort (get key map)
```
@typecheck ```
getWithAbort : a -> Map a b ->{Abort} b
getWithAbort key map =
match get key map with
Some a -> a
None -> abort
```
}}