# Sema: rename value resolution functions · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/67caf685056bcdbbe4e696cada927615b0dd6fe9)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 67caf685056bcdbbe4e696cada927615b0dd6fe9

Requested commit: 67caf685056bcdbbe4e696cada927615b0dd6fe9

Commit: 67caf685056bcdbbe4e696cada927615b0dd6fe9

Tree: 2f715cabde6864720c4943e006cab600c3416e5d

Author: mlugg

Committer: mlugg

## Message

```
Sema: rename value resolution functions

Having simplified these functions in a previous commit, I felt inclined
to refactor their names, which were previously quite inconsistent. There
are now 4 "core" functions:

* `resolveValue` (previously `resolveMaybeUndefVal`) allows runtime-known and undef values.
* `resolveConstValue` (previously `resolveConstMaybeUndefVal`) allows undef but not runtime-known values.
* `resolveDefinedValue` (name unchanged) allows runtime-known values but not comptime-known undef.
* `resolveConstDefinedValue` (previously `resolveConstValue`) does not allow runtime-known or undef values.

You can see the inconsistencies in the old names here - sometimes we
specified "maybe undef", and sometimes we went the other way by
specifying "defined". With the new names, the most common function,
`resolveValue`, has the shortest name and does the most general thing,
and is the baseline that the other functions are adding logic to.

Some other functions were also renamed:
* `resolveMaybeUndefLazyVal` -> `resolveValueResolveLazy`
* `resolveMaybeUndefValIntable` -> `resolveValueIntable`
* `resolveMaybeUndefValAllowVariables` -> `resolveValueAllowVariables`

```

## Parents

- [7882bdcb7e1b012ff388c4abe0b57aa048bb2ce3](https://git.cafe/gitcafe/zig/commit/7882bdcb7e1b012ff388c4abe0b57aa048bb2ce3?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/67caf685056bcdbbe4e696cada927615b0dd6fe9?format=markdown)
