We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8e3453 commit 894e8f9Copy full SHA for 894e8f9
src/Data/Generic/Rep.purs
@@ -2,6 +2,7 @@ module Data.Generic.Rep
2
( class Generic
3
, to
4
, from
5
+ , repOf
6
, NoConstructors
7
, NoArguments(..)
8
, Sum(..)
@@ -10,6 +11,8 @@ module Data.Generic.Rep
10
11
, Argument(..)
12
) where
13
14
+import Type.Proxy (Proxy(..))
15
+
16
-- | A representation for types with no constructors.
17
data NoConstructors
18
@@ -34,3 +37,6 @@ newtype Argument a = Argument a
34
37
class Generic a rep | a -> rep where
35
38
to :: rep -> a
36
39
from :: a -> rep
40
41
+repOf :: forall a rep. Generic a rep => Proxy a -> Proxy rep
42
+repOf _ = Proxy
0 commit comments