# `Feel.Value`
[🔗](https://github.com/FeeJai/BDM/blob/feel-v0.1.0/apps/feel/lib/feel/value.ex#L1)

FEEL values, and the FEEL type `Any`.

A FEEL value is a member of the semantic domain of DMN 1.6 (section 10.3.2.1).
Every value belongs to one of the FEEL types, and each type has a module under
this one that defines how its values are represented, in a type `t` of its own:

| FEEL type                   | Module                                  |
| --------------------------- | --------------------------------------- |
| null                        | `Feel.Value.Null`                       |
| boolean                     | `Feel.Value.Boolean`                    |
| string                      | `Feel.Value.String`                     |
| number                      | `Feel.Value.Number`                     |
| date                        | `Feel.Value.Date`                       |
| time                        | `Feel.Value.Time`                       |
| date and time               | `Feel.Value.DateTime`                   |
| years and months duration   | `Feel.Value.YearsAndMonthsDuration`     |
| days and time duration      | `Feel.Value.DaysAndTimeDuration`        |
| range                       | `Feel.Value.Range`                      |
| list                        | `Feel.Value.List`                       |
| context                     | `Feel.Value.Context`                    |
| function                    | `Feel.Value.Function`                   |

Each of those modules also has `type/0` (or `type/1` for the parameterised
types), which returns the descriptor of its type, and `value?/1`, which checks
whether a term is one of its values. `Feel.Type` is the other half: it
describes the types themselves as data, for checking and inference.

This module is the type `Any`, the top of the type lattice (section 10.3.2.9).
Every value is an instance of it, and every type conforms to it. It is the type
of a function parameter declared without a type. `t:t/0` is the union of all
the value types.

# `t`

```elixir
@type t() ::
  Feel.Value.Null.t()
  | Feel.Value.Boolean.t()
  | Feel.Value.String.t()
  | Feel.Value.Number.t()
  | Feel.Value.Date.t()
  | Feel.Value.Time.t()
  | Feel.Value.DateTime.t()
  | Feel.Value.YearsAndMonthsDuration.t()
  | Feel.Value.DaysAndTimeDuration.t()
  | Feel.Value.Range.t()
  | Feel.Value.List.t()
  | Feel.Value.Context.any_context()
  | Feel.Value.Function.t()
```

A FEEL value as seen by Elixir code.

# `type`

```elixir
@spec type() :: Feel.Type.t()
```

Returns the type descriptor of `Any`.

# `value?`

```elixir
@spec value?(term()) :: boolean()
```

Returns `true` when `term` is a FEEL value of any type.

Like the other `value?/1` functions, it looks only at the outermost shape: a
list is a list of anything, and a context is a `Feel.Value.Context` or a map with string keys.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
