newtype with gadt-like constraint

后端 未结 0 1807
孤独总比滥情好
孤独总比滥情好 2021-02-05 05:34

I understand why you can\'t do this:

{-# LANGUAGE GADTs  #-}

newtype NG a  where MkNG :: Eq a => a -> NG a

-- \'A newtype constructor cannot have a contex         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题