Plaster
New
List
Login
haskell
default
anonymous
2024.07.06 16:45:28
class M m where unitM :: a -> m a data Fun = forall m. Fun (Int -> m Int) -- v first k g :: M k => k Fun g = unitM (Fun h) -- v second k (different from first?) where h :: (Int -> k Int) h = unitM -- • Could not deduce (M k1) arising from a use of ‘unitM’ -- from the context: M k -- bound by the type signature for: -- g :: forall (k :: * -> *). M k => k Fun -- at help.hs:12:1-17 -- Possible fix: -- add (M k1) to the context of -- the type signature for: -- h :: forall (k1 :: * -> *). Int -> k1 Int -- • In the expression: unitM -- In an equation for ‘h’: h = unitM -- In an equation for ‘g’: -- g = unitM (Fun h) -- where -- h :: (Int -> k Int) -- h = unitM -- | -- 16 | h = unitM -- | ^^^^^
Raw
Annotate
Repaste
Edit