goose_builtins = library( 'goose-builtins',
    'builtins.cpp',
    'helpers.cpp',

    'types/types.cpp',
    'types/basic.cpp',
    'types/decl.cpp',
    'types/init.cpp',
    'types/destroy.cpp',
    'types/drop.cpp',
    'types/lower.cpp',
    'types/convert.cpp',
    'types/pretty.cpp',

    'types/propositions/propositions.cpp',
    'types/propositions/drop.cpp',

    'types/predicates/predicates.cpp',
    'types/predicates/typecheck.cpp',

    'types/ghostcode/drop.cpp',

    'types/runtime/runtime.cpp',
    'types/runtime/basic.cpp',
    'types/runtime/pointer.cpp',
    'types/runtime/array.cpp',
    'types/runtime/record.cpp',
    'types/runtime/typecheck.cpp',
    'types/runtime/init.cpp',

    'types/tuple/tuple.cpp',
    'types/tuple/tupletype.cpp',
    'types/tuple/typecheck.cpp',
    'types/tuple/init.cpp',
    'types/tuple/destroy.cpp',
    'types/tuple/drop.cpp',
    'types/tuple/lower.cpp',

    'types/func/bfunc.cpp',
    'types/func/bintrinsic.cpp',
    'types/func/functype.cpp',
    'types/func/func.cpp',
    'types/func/build.cpp',
    'types/func/compile.cpp',
    'types/func/typecheck.cpp',
    'types/func/lower.cpp',

    'types/func/invocation/beagerfunc.cpp',
    'types/func/invocation/bfunc.cpp',
    'types/func/invocation/bintrinsic.cpp',
    'types/func/invocation/common.cpp',
    'types/func/invocation/func.cpp',
    'types/func/invocation/ghostfunc.cpp',
    'types/func/invocation/intrinsic.cpp',

    'types/template/tvec.cpp',
    'types/template/tvar.cpp',
    'types/template/ttvar.cpp',
    'types/template/tdecl.cpp',
    'types/template/tnameddecl.cpp',
    'types/template/tfunctype.cpp',
    'types/template/tfunc.cpp',
    'types/template/build.cpp',
    'types/template/invoke.cpp',
    'types/template/instantiate.cpp',
    'types/template/typecheck.cpp',
    'types/template/tc-tdecl.cpp',
    'types/template/pretty.cpp',

    'types/template/rules/tvar.cpp',
    'types/template/rules/decl.cpp',
    'types/template/rules/tnameddecl.cpp',
    'types/template/rules/tdecl.cpp',
    'types/template/rules/tvectype.cpp',
    'types/template/rules/value.cpp',
    'types/template/rules/tfunctype.cpp',

    'types/overloadset/overloadset.cpp',
    'types/overloadset/invoke.cpp',
    'types/overloadset/typecheck.cpp',
    'types/overloadset/helpers.cpp',

    'types/constrainedfunc/constrainedfunc.cpp',
    'types/constrainedfunc/invoke.cpp',
    'types/constrainedfunc/typecheck.cpp',

    'types/localvar/localvar.cpp',
    'types/localvar/typecheck.cpp',
    'types/localvar/drop.cpp',
    'types/localvar/invoke.cpp',

    'types/reference/reference.cpp',
    'types/reference/typecheck.cpp',
    'types/reference/parse.cpp',
    'types/reference/init.cpp',
    'types/reference/lower.cpp',

    'operators/semicolon.cpp',
    'operators/comma.cpp',
    'operators/dollar.cpp',
    'operators/logic.cpp',
    'operators/arith.cpp',
    'operators/comparison.cpp',
    'operators/assignment.cpp',
    'operators/compoundass.cpp',
    'operators/dot.cpp',
    'operators/intrinsic.cpp',
    'operators/ghost.cpp',
    'operators/contract.cpp',

    'statements/using.cpp',
    'statements/return.cpp',
    'statements/if.cpp',
    'statements/hif.cpp',
    'statements/while.cpp',
    'statements/break.cpp',
    'statements/continue.cpp',

    'builders/codebuilder.cpp',
    'builders/default_interface.cpp',
    'builders/cb_interface.cpp',
    'builders/props_interface.cpp',
    'builders/ghostcode_interface.cpp',

    include_directories: bsinc,
    dependencies: [tracy_dep]
)
