config: remove overlapping noise

This commit is contained in:
Sönke Hahn 2016-01-08 17:25:15 +01:00
parent 3cc3c5c986
commit d99bde5fcd

View file

@ -14,9 +14,9 @@
{-# LANGUAGE PolyKinds #-} {-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE UndecidableInstances #-}
#if !MIN_VERSION_base(4,8,0)
{-# LANGUAGE OverlappingInstances #-} #include "overlapping-compat.h"
#endif
module Servant.Server.Internal.Config where module Servant.Server.Internal.Config where
import Control.DeepSeq (NFData(rnf)) import Control.DeepSeq (NFData(rnf))
@ -61,16 +61,10 @@ infixr 4 .:
class HasConfigEntry (cfg :: [*]) (a :: k) (val :: *) | cfg a -> val where class HasConfigEntry (cfg :: [*]) (a :: k) (val :: *) | cfg a -> val where
getConfigEntry :: proxy a -> Config cfg -> val getConfigEntry :: proxy a -> Config cfg -> val
instance instance OVERLAPPABLE_
#if MIN_VERSION_base(4,8,0)
{-# OVERLAPPABLE #-}
#endif
HasConfigEntry xs tag val => HasConfigEntry (notIt ': xs) tag val where HasConfigEntry xs tag val => HasConfigEntry (notIt ': xs) tag val where
getConfigEntry p (ConsConfig _ xs) = getConfigEntry p xs getConfigEntry p (ConsConfig _ xs) = getConfigEntry p xs
instance instance OVERLAPPABLE_
#if MIN_VERSION_base(4,8,0)
{-# OVERLAPPABLE #-}
#endif
HasConfigEntry (ConfigEntry tag val ': xs) tag val where HasConfigEntry (ConfigEntry tag val ': xs) tag val where
getConfigEntry _ (ConsConfig x _) = unConfigEntry x getConfigEntry _ (ConsConfig x _) = unConfigEntry x