Skip to content

Commit

Permalink
Test makePrismLabels after declareFieldLabels
Browse files Browse the repository at this point in the history
  • Loading branch information
arybczak committed Sep 16, 2020
1 parent 691f15f commit aa9f865
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions optics-th/tests/Optics/TH/Tests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,13 @@ declareFieldLabels [d|
data Quark2 a = Qualified2 { gaffer2 :: a }
| Unqualified2 { gaffer2 :: a, tape2 :: a }
|]
makePrismLabels ''Quark2 -- after declareFieldLabels

checkQualified2 :: Prism' (Quark2 a) a
checkQualified2 = #_Qualified2

checkUnqualified2 :: Prism' (Quark2 a) (a, a)
checkUnqualified2 = #_Unqualified2

checkGaffer2 :: Lens' (Quark2 a) a
checkGaffer2 = #gaffer2
Expand Down

0 comments on commit aa9f865

Please sign in to comment.