Skip to content

Change NoConstructors to newtype Void #282

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 3 commits into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Notable changes to this project are documented in this file. The format is based

Breaking changes:
- Migrated FFI to ES Modules (#287 by @kl0tl and @JordanMartinez)
- Change Generic Rep's `NoConstructors` to newtype `Void` (#282 by @JordanMartinez)

New features:

Expand Down
3 changes: 2 additions & 1 deletion src/Data/Generic/Rep.purs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ module Data.Generic.Rep
import Data.Semigroup ((<>))
import Data.Show (class Show, show)
import Data.Symbol (class IsSymbol, reflectSymbol)
import Data.Void (Void)
import Type.Proxy (Proxy(..))

-- | A representation for types with no constructors.
data NoConstructors
newtype NoConstructors = NoConstructors Void

-- | A representation for constructors with no arguments.
data NoArguments = NoArguments
Expand Down