# LibTmux.Query.exactlyOne

- **Package:** libtmux-haskell
- **Language:** Haskell
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-haskell/blob/663e212622a02aa74a9bdc8ff71e2b45fcb1d4d5/internal/LibTmux/Internal/Query.hs#L42
- **Page:** https://libtmux.org/en/haskell/latest/reference/libtmux-query-v-exactlyone/

```haskell
exactlyOne :: [row] -> Either CardinalityError row
```

Signature types: [`Either`](https://hackage.haskell.org/package/base-4.22.0.0/docs/Data-Either.html#t:Either), [`CardinalityError`](/en/haskell/latest/reference/libtmux-query-t-cardinalityerror/).

Require exactly one value. Uniqueness can require traversing the entire
 input; ambiguity is established at the second match without forcing its tail.
 This neither acquires data nor reserves a live command target.

## Referenced declarations

- [`LibTmux.Query.CardinalityError`](/en/haskell/latest/reference/libtmux-query-t-cardinalityerror/) (data type)

## Guides

Pages that discuss `exactlyOne`.

- [Typed queries](/en/haskell/latest/guides/query/)
