Skip to content

Commit

Permalink
Relocate a CPP
Browse files Browse the repository at this point in the history
  • Loading branch information
jasagredo committed Apr 16, 2024
1 parent df98b09 commit 419c03a
Showing 1 changed file with 8 additions and 5 deletions.
Expand Up @@ -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
Expand Down

0 comments on commit 419c03a

Please sign in to comment.