Skip to content

Commit

Permalink
Fix benchmark compilation with ghc-9.0.1
Browse files Browse the repository at this point in the history
Problem: for some reason ghc-9.0.1 is unable to compile benchmark code
which is successfully compiled by older versions of ghc.

Solution: provide explicit type annotations to help ghc compile this
code, it appeared to be sufficient.
  • Loading branch information
gromakovsky committed Nov 16, 2021
1 parent 38fbda7 commit c1c6837
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions benchmark/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,11 @@ bgroupSuperComposition = bgroup "(...)"
]
]
where
super10 :: [()] -> Bool
super10 = null
... (: []) ... Unsafe.head ... pure ... Unsafe.head
... ((: []) ... Unsafe.head ... pure ... Unsafe.head
... (: [(), (), (), ()]) ... Unsafe.head ... (: []) ... Unsafe.head
... (: [()]) ... Unsafe.head ... (: [(), ()]) ... Unsafe.head
... (: [()]) ... Unsafe.head ... (: [(), ()]) ... Unsafe.head :: [()] -> [()])

norm10 = null
. (: []) . Unsafe.head . pure . Unsafe.head
Expand Down

0 comments on commit c1c6837

Please sign in to comment.