From 472c1424ba425e2df9fa494f343e91c5fe71087e Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 5 May 2015 12:46:20 -0700 Subject: Deal with deprecation warning in Custom. --- src/Text/Pandoc/Writers/Custom.hs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Writers/Custom.hs b/src/Text/Pandoc/Writers/Custom.hs index 83e2af367..bdcbba275 100644 --- a/src/Text/Pandoc/Writers/Custom.hs +++ b/src/Text/Pandoc/Writers/Custom.hs @@ -1,6 +1,10 @@ -{-# LANGUAGE OverlappingInstances, FlexibleInstances, OverloadedStrings, - ScopedTypeVariables, DeriveDataTypeable #-} {-# OPTIONS_GHC -fno-warn-orphans #-} +{-# LANGUAGE FlexibleInstances, OverloadedStrings, + ScopedTypeVariables, DeriveDataTypeable, CPP #-} +#if MIN_VERSION_base(4,8,0) +#else +{-# LANGUAGE OverlappingInstances #-} +#endif {- Copyright (C) 2012-2015 John MacFarlane This program is free software; you can redistribute it and/or modify @@ -65,7 +69,11 @@ getList lua i' = do return (x : rest) else return [] +#if MIN_VERSION_base(4,8,0) +instance {-# OVERLAPS #-} StackValue a => StackValue [a] where +#else instance StackValue a => StackValue [a] where +#endif push lua xs = do Lua.createtable lua (length xs + 1) 0 let addValue (i, x) = Lua.push lua x >> Lua.rawseti lua (-2) i -- cgit v1.2.3