user5844: I mark the function as inlinable but get the error that the function cannot be made inlinable. This does not appear to make sense as the function is known to be inlinable.

user5844: This was a problem with the Haskell compiler interfering with the code before it reached the Plutus compiler. The changes made in the Haskell compiler made it impossible to compile in Plutus.
This means the plugin doesn’t have access to implementation of the function, which it needs to be able to compile the function to Plutus Core. Some things you can do to fix it:
Make sure to add {-# INLINABLE functionname #-} to your function.
If there’s an extra $c in front of the function name in the error, GHC has generated a specialised version of your function, which prevents the plugin from accessing it. You can turn off specialisation with {-# OPTIONS_GHC -fno-specialise #-}
Other compiler options that can help:
{-# OPTIONS_GHC -fno-strictness #-}
{-# OPTIONS_GHC -fno-ignore-interface-pragmas #-}
{-# OPTIONS_GHC -fno-omit-interface-pragmas #-}
{-# OPTIONS_GHC -fobject-code #-}

5844: <p>I mark the function as inlinable but get the error that the function cannot be made inlinable. This does not appear to make sense as the function is known to be inlinable.</p>
 5844: <p>This was a problem with the Haskell compiler interfering with the code before it reached the Plutus compiler. The changes made in the Haskell compiler made it impossible to compile in Plutus.</p>
<p>This means the plugin doesn’t have access to implementation of the function, which it needs to be able to compile the function to Plutus Core. Some things you can do to fix it:</p>
<p>Make sure to add <code>{-# INLINABLE functionname #-}</code> to your function.</p>
<p>If there’s an extra <code>$c</code> in front of the function name in the error, GHC has generated a specialised version of your function, which prevents the plugin from accessing it. You can turn off specialisation with <code>{-# OPTIONS_GHC -fno-specialise #-}</code></p>
<p>Other compiler options that can help:</p>
<p><code>{-# OPTIONS_GHC -fno-strictness #-}</code></p>
<p><code>{-# OPTIONS_GHC -fno-ignore-interface-pragmas #-}</code></p>
<p><code>{-# OPTIONS_GHC -fno-omit-interface-pragmas #-}</code></p>
<p><code>{-# OPTIONS_GHC -fobject-code #-}</code></p>
