mirror of
https://github.com/google/ormolu.git
synced 2024-12-11 21:09:47 +03:00
ba64967c03
Essentially, it simply indents the constraints one layer, instead of hanging the constraints off of `class` or `instance`.
26 lines
427 B
Haskell
26 lines
427 B
Haskell
{-# LANGUAGE FunctionalDependencies #-}
|
|
|
|
-- | Something.
|
|
class (MonadReader r s, MonadWriter w m) => MonadState s m | m -> s where
|
|
|
|
get :: m s
|
|
|
|
put :: s -> m ()
|
|
|
|
-- | 'MonadParsec'
|
|
class
|
|
( Stream s -- Token streams
|
|
, MonadPlus m -- Potential for failure
|
|
)
|
|
=> MonadParsec e s m
|
|
| m -> e s where
|
|
|
|
-- | 'getState' returns state
|
|
getState
|
|
:: m s
|
|
|
|
-- | 'putState' sets state
|
|
putState
|
|
:: s
|
|
-> m ()
|