on master help sign in
Explicit export list for HasConstructor
8a9bc63Csongor Kiss
.gitignore+1
@@ -1,2 +1,3 @@
1+tags
1dist*
2dist*
2.stack-work
3.stack-work
src/Data/Generics/Sum/HasConstructor.hs+5−7
@@ -32,6 +32,8 @@
32-- | Qux
32-- | Qux
33-- deriving (Show, Generic)
33-- deriving (Show, Generic)
34--
34--
35+-- @
36+--
35-- >>> Bar 5 "coconut" ^? as @"Bar"
37-- >>> Bar 5 "coconut" ^? as @"Bar"
36-- Just (5, "coconut")
38-- Just (5, "coconut")
37--
39--
@@ -41,16 +43,12 @@
41-- >>> as @"Bar" # (5, "asd") :: FooBar
43-- >>> as @"Bar" # (5, "asd") :: FooBar
42-- Bar 5 "asd"
44-- Bar 5 "asd"
43--
45--
44−-- >>> as @"Barz" # (5, "asd") :: FooBar
45−--
46−-- <interactive>:264:1: error:
47−-- • FooBar has no constructor with name "Barz"
48−-- @
49−--
50
46
51-----------------------------------------------------------------------------
47-----------------------------------------------------------------------------
52
48
53−module Data.Generics.Sum.HasConstructor where
49+module Data.Generics.Sum.HasConstructor
50+ ( HasConstructor (..)
51+ ) where
54
52
55import Data.Generics.Internal.Lens
53import Data.Generics.Internal.Lens
56
54