packages feed

hindent 4.5.7 → 4.6.0

raw patch · 3 files changed

+31/−24 lines, 3 filesdep −applicative-quotersdep ~haskell-src-exts

Dependencies removed: applicative-quoters

Dependency ranges changed: haskell-src-exts

Files

hindent.cabal view
@@ -1,5 +1,5 @@ name:                hindent-version:             4.5.7+version:             4.6.0 synopsis:            Extensible Haskell pretty printer description:         Extensible Haskell pretty printer. Both a library and an executable.                      .@@ -43,7 +43,7 @@                      HIndent.Styles.Gibiansky   build-depends:     base >= 4.7 && <5                    , data-default-                   , haskell-src-exts >= 1.16+                   , haskell-src-exts >= 1.17                    , monad-loops                    , mtl                    , text@@ -57,8 +57,7 @@                    , hindent                    , text                    , descriptive >= 0.7 && < 0.10-                   , haskell-src-exts >= 1.16-                   , applicative-quoters+                   , haskell-src-exts                    , ghc-prim                    , directory @@ -78,7 +77,7 @@   build-depends:     base >= 4 && <5                    , hindent                    , data-default-                   , haskell-src-exts >= 1.16+                   , haskell-src-exts                    , monad-loops                    , mtl                    , text
src/HIndent/Pretty.hs view
@@ -576,14 +576,20 @@            write " == "            pretty right       ty@TyPromoted{} -> pretty' ty-      TySplice{} ->-        error "FIXME: No implementation for TySplice."+      TySplice{} -> error "FIXME: No implementation for TySplice."+      TyWildCard _ name ->+        case name of+          Nothing -> write "_"+          Just n ->+            do write "_"+               pretty n  instance Pretty Exp where   prettyInternal = exp  -- | Render an expression. exp :: MonadState (PrintState s) m => Exp NodeInfo -> m ()+exp (ExprHole {}) = write "_" exp (InfixApp _ a op b) =   depend (do pretty a              space@@ -910,18 +916,21 @@ instance Pretty Asst where   prettyInternal x =     case x of-      ClassA _ name types ->-        spaced (pretty name :-                map pretty types)+      ClassA _ name types -> spaced (pretty name : map pretty types)       i@InfixA{} -> pretty' i-      IParam{} ->-        error "FIXME: No implementation for IParam."+      IParam{} -> error "FIXME: No implementation for IParam."       EqualP _ a b ->         do pretty a            write " ~ "            pretty b-      ParenA _ asst -> parens $ pretty asst-      VarA _ var -> pretty var+      ParenA _ asst -> parens (pretty asst)+      AppA _ name tys -> spaced (pretty name : map pretty tys)+      WildCardA _ name ->+        case name of+          Nothing -> write "_"+          Just n ->+            do write "_"+               pretty n  instance Pretty BangType where   prettyInternal x =
src/main/Main.hs view
@@ -12,7 +12,6 @@ import           HIndent.Types  import           Control.Applicative-import           Control.Applicative.QQ.Idiom import           Data.List import           Data.Text (Text) import qualified Data.Text as T@@ -62,18 +61,18 @@         => Consumer [Text] (Option Stoppers) m (Style,[Extension],Maybe FilePath) options =   ver *>-  [i|(,,) style exts file|]+  ((,,) <$> style <*> exts <*> file)   where ver =           stop (flag "version" "Print the version" Version)         style =-          [i|makeStyle (constant "--style" "Style to print with" () *>-                        foldr1 (<|>)-                               (map (\s ->-                                       constant (styleName s)-                                                (styleDescription s)-                                                s)-                                    styles))-                       lineLen|]+          makeStyle <$> (constant "--style" "Style to print with" () *>+                         foldr1 (<|>)+                                (map (\s ->+                                        constant (styleName s)+                                                 (styleDescription s)+                                                 s)+                                     styles))+                       <*> lineLen         exts =           fmap getExtensions (many (prefix "X" "Language extension"))         lineLen =