docs: function compile(
    source,
    filename = '',
    includeModule = false,
    debugMode = false,
  ) {
    let res
    let resName
    let errors
  
    try {
      const [moduleName, bsCode, diagnosticErrors] = Retyped.compile(filename, source, debugMode)
      const fmtCode = format(bsCode)
      res = fmtCode
      resName = moduleName
      errors = diagnosticErrors
    } catch (e) {
      console.error(e)
      throw new Error(`${e[0][0]}`)
    }
  
    if (res.includes('SYNTAX ERROR>')) {
      throw new Error(res)
    }
  
    if (!includeModule) {
      return res
    } else {
      return {
        moduleName: resName,
        bsCode: res,
        diagnosticErrors: errors
      }
    }
  }