unison/unison-src/transcripts/unsafe-coerce.output.md
Greg Pfeil 0031542faf
Add a space before code block info strings
This is for consistency with the `cmark` style. Now the blocks we still
pretty-print ourselves will match the bulk of them that `cmark`
produces.
2024-07-10 13:56:07 -06:00

936 B

f : '{} Nat
f _ = 5

fc : '{IO, Exception} Nat
fc = unsafe.coerceAbilities f

main : '{IO, Exception} [Result]
main _ =
  n = !fc
  if n == 5 then [Ok ""] else [Fail ""]

  Loading changes detected in scratch.u.

  I found and typechecked these definitions in scratch.u. If you
  do an `add` or `update`, here's how your codebase would
  change:
  
    ⍟ These new definitions are ok to `add`:
    
      f    : 'Nat
      fc   : '{IO, Exception} Nat
      main : '{IO, Exception} [Result]

scratch/main> find unsafe.coerceAbilities

  1. builtin.unsafe.coerceAbilities : (a ->{e1} b) -> a -> b
  

scratch/main> add

  ⍟ I've added these definitions:
  
    f    : 'Nat
    fc   : '{IO, Exception} Nat
    main : '{IO, Exception} [Result]

scratch/main> io.test main

    New test results:
  
    1. main   ◉ 
  
  ✅ 1 test(s) passing
  
  Tip: Use view 1 to view the source of a test.