module Example where
import Control.Monad.Except (MonadError(..))
orFail :: MonadError e m => Maybe a -> e -> m a
orFail (Just a) _ = pure a
orFail Nothing e = throwError e
If I Prettify this file in Atom, nothing happens, and I don't get any indication of why.
If I run stylish-haskell on this file, I get the following output:
Armandos-MacBook-Pro% stylish-haskell src/Example.hs
Language.Haskell.Stylish.Parse.parseModule: could not parse src/Example.hs: \
ParseFailed (SrcLoc "<unknown>.hs" 4 29) "MultiParamTypeClasses language \
extension is not enabled. Please add {-# LANGUAGE MultiParamTypeClasses #-} \
pragma at the top of your module."
module Example where
import Control.Monad.Except (MonadError(..))
orFail :: MonadError e m => Maybe a -> e -> m a
orFail (Just a) _ = pure a
orFail Nothing e = throwError e
Once I add {-# LANGUAGE MultiParamTypeClasses #-} to my file, Prettify works in Atom.
It looks like this might be stylish-haskell's fault, as it returns 0 despite failing to parse the file.
Example file:
If I Prettify this file in Atom, nothing happens, and I don't get any indication of why.
If I run
stylish-haskell
on this file, I get the following output:Once I add
{-# LANGUAGE MultiParamTypeClasses #-}
to my file, Prettify works in Atom.It looks like this might be
stylish-haskell
's fault, as it returns0
despite failing to parse the file.