The clash-ghc package

CλaSH (pronounced ‘clash’) is a functional hardware description language that
borrows both its syntax and semantics from the functional programming language
Haskell. The merits of using a functional language to describe hardware comes
from the fact that combinational circuits can be directly modelled as
mathematical functions and that functional languages lend themselves very well
at describing and (de-)composing mathematical functions.