packages feed

purescript-0.15.15: tests/purs/warning/NewtypeInstance2.purs

-- @shouldWarnWith MissingNewtypeSuperclassInstance
module Main where

import Prelude
import Data.Tuple (Tuple(..))

class (Monad m, Monoid w) <= MonadWriter w m | m -> w where
  tell :: w -> m Unit

instance monadWriterTuple :: Monoid w => MonadWriter w (Tuple w) where
  tell w = Tuple w unit

newtype MyWriter w a = MyWriter (Tuple w a)

derive newtype instance monadWriterMyWriter :: Monoid w => MonadWriter w (MyWriter w)