I'm trying to use the SPECIALIZE pragma to a type I get through hsc2hs's #type
.
I tried something like this:
{-# SPECIALIZE someFn :: #{type DWORD} -> #{type DWORD} -> Bool #-}
someFn :: Eq a => a -> a -> Bool
That attempt fails with a parse error on input '#'
(on the first #{type DWORD}
).
I've put an answer that I found to work but I'm really hoping for something cleaner -- or more precisely: something that doesn't impact the entire module's code.