aboutsummaryrefslogtreecommitdiff
path: root/src/index.ts
blob: 65349fc512fbba57387c43223cbadbef7faaf219 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { createContext } from './context'
import { evalList } from './eval'

const main = async () => {
  const ctx = createContext()
  const resultType = ctx.entryPoint.getType()
  const effects = resultType.isTuple()
    ? resultType.getTupleElements()
    : [resultType]
  await evalList(ctx, effects)
}

main()
  .then(() => process.exit(0))
  .catch((e) => (console.error(e), process.exit(1)))