Test the version of template haskell, not GHC
This is more portable between compilers as well as between variants on GHC (ex: HaLVM is building off of head so GHC appears as 7.8.3 while TH is 2.10).
commit84ae2a91fe1c434976e5691fb09ffc42c5e6e638
authorThomas M. DuBuisson <Thomas.DuBuisson@gmail.com>
dateMon 16 Jun 2014, 17:34 (12 years ago)
parent0db49c9
Data/Aeson/TH.hs+1−1
@@ -872,7 +872,7 @@ valueConName Null = "Null"
872872applyCon :: Name -> [Name] -> Q [Pred]
873873applyCon con typeNames = return (map apply typeNames)
874874 where apply t =
875−#if __GLASGOW_HASKELL__ >= 709
875+#if MIN_VERSION_template_haskell(2,10,0)
876876 AppT (ConT con) (VarT t)
877877#else
878878 ClassP con [VarT t]