Skip to content

Commit 2ab0477

Browse files
Change NoConstructors to newtype Void (#282)
* Change NoConstructors to newtype Void * Add changelog entry
1 parent 80b91b4 commit 2ab0477

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Notable changes to this project are documented in this file. The format is based
66

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

1011
New features:
1112

src/Data/Generic/Rep.purs

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ module Data.Generic.Rep
1414
import Data.Semigroup ((<>))
1515
import Data.Show (class Show, show)
1616
import Data.Symbol (class IsSymbol, reflectSymbol)
17+
import Data.Void (Void)
1718
import Type.Proxy (Proxy(..))
1819

1920
-- | A representation for types with no constructors.
20-
data NoConstructors
21+
newtype NoConstructors = NoConstructors Void
2122

2223
-- | A representation for constructors with no arguments.
2324
data NoArguments = NoArguments

0 commit comments

Comments
 (0)