Skip to content

Commit

Permalink
Change NoConstructors to newtype Void (#282)
Browse files Browse the repository at this point in the history
* Change NoConstructors to newtype Void

* Add changelog entry
  • Loading branch information
JordanMartinez authored Mar 14, 2022
1 parent 80b91b4 commit 2ab0477
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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

0 comments on commit 2ab0477

Please sign in to comment.