From 419c03ab87ec15eff645a81930fecfab973771d1 Mon Sep 17 00:00:00 2001 From: Javier Sagredo Date: Wed, 10 Apr 2024 17:02:29 +0200 Subject: [PATCH] Relocate a CPP --- .../Ouroboros/Consensus/Block/RealPoint.hs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Block/RealPoint.hs b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Block/RealPoint.hs index b802ca90c1..cb264a732c 100644 --- a/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Block/RealPoint.hs +++ b/ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Block/RealPoint.hs @@ -86,12 +86,15 @@ blockRealPoint blk = RealPoint s h where HeaderFields { headerFieldSlot = s, headerFieldHash = h } = getHeaderFields blk -#if __GLASGOW_HASKELL__ >= 906 -headerRealPoint :: (HasHeader blk, HasHeader (Header blk)) => Header blk -> RealPoint blk -#else --- GHC 9.6 considiers these constraints insufficient. -headerRealPoint :: HasHeader (Header blk) => Header blk -> RealPoint blk +headerRealPoint :: + ( HasHeader (Header blk) +#if __GLASGOW_HASKELL__ >= 904 +-- GHC 9.4+ considers these constraints insufficient. + , HasHeader blk #endif + ) + => Header blk + -> RealPoint blk headerRealPoint hdr = RealPoint s h where HeaderFields { headerFieldSlot = s, headerFieldHash = h } = getHeaderFields hdr