0

次のコードでは、警告が表示されました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.

(または警告ハットインターネットを無効にすることもお勧めします)

私の問題は、型を newtype でラップする方法が見つからないことですか?

4

1 に答える 1