@@ -9,15 +9,12 @@
9{-# LANGUAGE ScopedTypeVariables #-}
9{-# LANGUAGE ScopedTypeVariables #-}
10{-# LANGUAGE TypeApplications #-}
10{-# LANGUAGE TypeApplications #-}
11{-# LANGUAGE TemplateHaskell #-}
11{-# LANGUAGE TemplateHaskell #-}
14module Main where
13module Main where
16import GHC.Generics
15import GHC.Generics
17import Data.Generics.Product
16import Data.Generics.Product
18−#if MIN_VERSION_GLASGOW_HASKELL(8,2,0,0)
19import Test.Inspection
17import Test.Inspection
22main :: IO ()
19main :: IO ()
23main = putStrLn "Hello world"
20main = putStrLn "Hello world"
@@ -63,11 +60,7 @@ fieldALensPos = position @1
63subtypeLensGeneric :: Lens' Record Record2
60subtypeLensGeneric :: Lens' Record Record2
64subtypeLensGeneric = super
61subtypeLensGeneric = super
66−#if MIN_VERSION_GLASGOW_HASKELL(8,2,0,0)
67−-- It turns out that these equalities only hold with ghc-8.2 or newer,
68−-- probably due to improvements to CSE
69inspect $ 'fieldALensManual === 'fieldALensName
63inspect $ 'fieldALensManual === 'fieldALensName
70inspect $ 'fieldALensManual === 'fieldALensType
64inspect $ 'fieldALensManual === 'fieldALensType
71inspect $ 'fieldALensManual === 'fieldALensPos
65inspect $ 'fieldALensManual === 'fieldALensPos
72inspect $ 'subtypeLensManual === 'subtypeLensGeneric
66inspect $ 'subtypeLensManual === 'subtypeLensGeneric