stylish-haskell
stylish-haskell copied to clipboard
Bad requirement of MultiParamTypeClasses
{-# LANGUAGE FlexibleContexts #-}
module Test where
import Control.Monad.Reader
test :: MonadReader a m => m a
test = undefined
This code is OK for GHC, but stylish-haskell requires additional MultiParamTypeClasses.
The error is Language.Haskell.Stylish.Parse.parseModule: could not parse a.hs: ParseFailed (SrcLoc "<unknown>.hs" 7 28) "MultiParamTypeClasses language extension is not enabled. Please add {-# LANGUAGE MultiParamTypeClasses #-} pragma at the top of your module."
UPD. Depends on https://github.com/haskell-suite/haskell-src-exts/issues/304
This is a haskell-src-exts issue.
I opened corresponding https://github.com/haskell-suite/haskell-src-exts/issues/304
For user, this is a bug in stylish-haskell, because (1) it doesn't do what it promised and (2) it was stylish-haskell's author who decided to use haskell-src-exts as a parser.
Thank you for reopening.
See here for a workaround