Commit Graph

4 Commits

Author SHA1 Message Date
Stew O'Connor
7a2a8fb28b refactoring new-runtime-transcripts
This adds a _base transcript which will be run as a prelude before the
other transcripts (not sure how yet). The goal is to cut down on the
boilerplate which has been creeping into the tests.

We also rename a few more of the builtin IO functions which return
Either Failure a
2021-02-23 23:56:04 -08:00
Stew O'Connor
4b7f49a688 Make IO functions that throw exceptions
closes: 1796

This adds two new abilities into IOSource.hs

    ability Throw e where
      throw: e -> x

    ability Exception where
      raise Failure -> x

All of the builtin functions which return an `Either Failure a` have
been renamed from `foo` to `foo.impl`, and for each of these functions
we implement a new function named `foo` in `IOSource.hs` which wraps
the `.impl` and `raises` a Failure using tyhe above `Exception`
ability.

Since we already have a Exception in `.base`, which should likely
coordinate this PR with one to the base repo which removes `Exception`
and `Either.toExcetpion`
2021-02-01 14:10:22 -08:00
Stew O'Connor
258ec6357f Add an Any parameter to the Failure type 2021-01-28 13:57:03 -08:00
Stew O'Connor
550d577e11 lots of IO tests working
we have transcripts for threads, mvars, net.
2021-01-13 14:20:57 -08:00