haskell-servant / haskell-servant/servant

Empty/Unit type for (:>) combinator

Open
#863 7 comments 1 reaction 0 assignees View on GitHub
Dominant language
Haskell
Stars
2k
Forks
427
Avg merge
2d 23h
Merged PRs (30d)
5

Description

It might be useful to have a unit type for `(:>)` where all of the following routes are equivalent, particularly if you try to make routes with type level programming.

```haskell
"hello" :> Get '[JSON] Text
"hello" :> Empty :> Get '[JSON] Text
Empty :> "hello" :> Get '[JSON] Text
```

Are there any drawbacks or issues this would create?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.