在下面的代码中,我收到了警告Orphan instance: instance (MonadIO m, Monad m) => GenerateUUID m
instance (MonadIO m, Monad m) => GenerateUUID m where
generateUUID = liftIO nextRandom
根据它,解决方案是
move the instance declaration to the module of the class or of the type, or
wrap the type with a newtype and declare the instance on the new type.
(或禁用警告帽子互联网也建议)
我的问题是我无法找到如何用新类型包装类型?