Open chshersh opened 4 years ago
If you have a function of type:
foo :: MonadIO m => m a
then the following specializations are either useless or too restrictive:
{-# SPECIALIZE foo :: MonadIO m => m () #-} {-# SPECIALIZE foo :: IO () #-}
The only correct one is:
{-# SPECIALIZE foo :: IO a #-}
But since GHC doesn't warn on such cases, it's useful for Stan to provide such type of analysis.
If you have a function of type:
then the following specializations are either useless or too restrictive:
The only correct one is:
But since GHC doesn't warn on such cases, it's useful for Stan to provide such type of analysis.