From 3b51a3a5c335293966447ccc5c758c19e9b669c2 Mon Sep 17 00:00:00 2001 From: Eugene Crosser Date: Fri, 2 May 2014 17:47:11 +0400 Subject: [PATCH] attempt to make portable build --- pdns-pipe-nmc.cabal | 4 ++-- pdns-pipe-nmc.hs | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pdns-pipe-nmc.cabal b/pdns-pipe-nmc.cabal index 3b4b576..d37a733 100644 --- a/pdns-pipe-nmc.cabal +++ b/pdns-pipe-nmc.cabal @@ -1,5 +1,5 @@ name: pdns-pipe-nmc -version: 0.9.0.0 +version: 0.9.0.1 synopsis: Namecoin pipe backend for PowerDNS description: Realtime bridge between Namecoin "d/" namespace (http://namecoin.info/) and DNS implemented as @@ -35,11 +35,11 @@ executable pdns-pipe-nmc , MissingH , vector , unordered-containers + , data-default >=0.5.1 , data-default-class >=0.0.1 , http-client >=0.2 , http-types >=0.6 , mtl >=2.0 , pretty-show , time - -- hs-source-dirs: default-language: Haskell98 diff --git a/pdns-pipe-nmc.hs b/pdns-pipe-nmc.hs index 5fc64fa..dbb7853 100644 --- a/pdns-pipe-nmc.hs +++ b/pdns-pipe-nmc.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module Main where @@ -21,9 +22,11 @@ import Data.Map.Lazy (Map, empty, lookup, insert, delete, size) import Data.Aeson (encode, decode, Value(..)) import Network.HTTP.Types import Network.HTTP.Client +#if MIN_VERSION_data_default(0,5,3) import Data.Default.Class (def) --- if you have data-default-0.5.1 import this instead of Data.Default.Class: --- import Data.Default (def) +#else +import Data.Default (def) +#endif import JsonRpcClient import Config -- 2.43.0