Quantcast
Channel: How does GADTs affect type inference in this case? - Stack Overflow
Browsing index pages (2 articles)

How does GADTs affect type inference in this case?

Say I have a monad that emits soft failure through Writer. A simplified version goes like this (for the record, I'm using GHC 9.0.2):{-# LANGUAGE BlockArguments #-}{-# LANGUAGE FlexibleContexts #-}--...

View Article


Answer by fluffyyboii for How does GADTs affect type inference in this case?

The problem is not GADTs but MonoLocalBinds, which is automatically enabled by GADTs. The issue is that isJust' :: String -> Maybe a -> m () has a polymorphic type signature, meaning you get to...

View Article

Browsing index pages (2 articles)


Latest Images