{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
module Ouroboros.Consensus.Util.NormalForm.Invariant
(
noThunksInvariant
) where
import NoThunks.Class (NoThunks (..), unsafeNoThunks)
noThunksInvariant :: NoThunks a => a -> Maybe String
#ifdef ENABLE_EXPENSIVE_INVARIANTS
noThunksInvariant = fmap show . unsafeNoThunks
#else
noThunksInvariant :: forall a. NoThunks a => a -> Maybe String
noThunksInvariant = Maybe String -> a -> Maybe String
forall a b. a -> b -> a
const Maybe String
forall a. Maybe a
Nothing
#endif