on master help sign in
Use TemplateHaskellQuotes with GHC8
commit125b641785e1ce3f9facfaf7199de2917d42042e authorOleg Grenrus <oleg.grenrus@iki.fi> dateThu 28 Jan 2016, 10:55 (11 years ago) parent32908ac
2 files changed+18−3
Data/Aeson/TH.hs+9−2 Data/Aeson/Types/Internal.hs+9−1
Data/Aeson/TH.hs+9−2
@@ -1,6 +1,13 @@
11{-# LANGUAGE CPP, FlexibleInstances, NamedFieldPuns,
2− NoImplicitPrelude, TemplateHaskell,
3− UndecidableInstances #-}
2+ NoImplicitPrelude, UndecidableInstances #-}
3+#if __GLASGOW_HASKELL >= 800
4+-- a) THQ works on cross-compilers and unregisterised GHCs
5+-- b) may make compilation faster as no dynamic loading is ever needed (not sure about this)
6+-- c) removes one hindrance to have code inferred as SafeHaskell safe
7+{-# LANGUAGE TemplateHaskellQuotes #-}
8+#else
9+{-# LANGUAGE TemplateHaskell #-}
10+#endif
411
512#include "overlapping-compat.h"
613
Data/Aeson/Types/Internal.hs+9−1
@@ -1,5 +1,13 @@
11{-# LANGUAGE CPP, DeriveDataTypeable, GeneralizedNewtypeDeriving, Rank2Types,
2− RecordWildCards, TemplateHaskell #-}
2+ RecordWildCards #-}
3+#if __GLASGOW_HASKELL >= 800
4+-- a) THQ works on cross-compilers and unregisterised GHCs
5+-- b) may make compilation faster as no dynamic loading is ever needed (not sure about this)
6+-- c) removes one hindrance to have code inferred as SafeHaskell safe
7+{-# LANGUAGE TemplateHaskellQuotes #-}
8+#else
9+{-# LANGUAGE TemplateHaskell #-}
10+#endif
311
412-- |
513-- Module: Data.Aeson.Types.Internal