on develop help sign in
Get generator package building again
bdfe880Michael Xavier
gen/.stylish-haskell.yaml+5−2
@@ -4,7 +4,10 @@ steps:
4 - language_pragmas:
4 - language_pragmas:
5 style: vertical
5 style: vertical
6 remove_redundant: true
6 remove_redundant: true
7+ - simple_align:
8+ cases: true
9+ top_level_patterns: true
7− - records: {}
10+ records: true
8 - trailing_whitespace: {}
11 - trailing_whitespace: {}
9
12
10columns: 80
13columns: 80
@@ -12,4 +15,4 @@ columns: 80
12language_extensions:
15language_extensions:
13 - MultiParamTypeClasses
16 - MultiParamTypeClasses
14 - TypeOperators
17 - TypeOperators
15− - DataKinds
18+ - DataKinds
gen/gogol-gen.cabal+1−1
@@ -60,7 +60,7 @@ executable gogol-gen
60 , lens
60 , lens
61 , mtl
61 , mtl
62 , optparse-applicative
62 , optparse-applicative
63− , pandoc
63+ , pandoc < 2.0
64 , parsec
64 , parsec
65 , semigroups
65 , semigroups
66 , system-fileio
66 , system-fileio
gen/src/Gen/Formatting.hs+1
@@ -10,6 +10,7 @@
10module Gen.Formatting
10module Gen.Formatting
11 ( module Gen.Formatting
11 ( module Gen.Formatting
12 , module Formatting
12 , module Formatting
13+ , module Formatting.Internal
13 , module Formatting.Time
14 , module Formatting.Time
14 ) where
15 ) where
15
16
gen/src/Gen/IO.hs+1−1
@@ -33,7 +33,7 @@ import qualified Filesystem as FS
33import qualified Text.EDE as EDE
33import qualified Text.EDE as EDE
34
34
35run :: ExceptT Error IO a -> IO a
35run :: ExceptT Error IO a -> IO a
36−run = runScript . fmapLT LText.toStrict
36+run = runScript . fmapLT LText.unpack
37
37
38io :: MonadIO m => IO a -> ExceptT Error m a
38io :: MonadIO m => IO a -> ExceptT Error m a
39io = ExceptT . fmap (first (LText.pack . show)) . liftIO . runUIO . fromIO
39io = ExceptT . fmap (first (LText.pack . show)) . liftIO . runUIO . fromIO
gen/src/Gen/Types/Help.hs+3−5
@@ -19,6 +19,7 @@ import Data.Aeson
19import Data.Char (isSpace)
19import Data.Char (isSpace)
20import Data.String
20import Data.String
21import Data.Text (Text)
21import Data.Text (Text)
22+import qualified Data.Text as T
22
23
23import Text.Pandoc as Pandoc
24import Text.Pandoc as Pandoc
24import Text.Pandoc.Pretty
25import Text.Pandoc.Pretty
@@ -54,7 +55,7 @@ rawHelpText = Raw
54
55
55instance FromJSON Help where
56instance FromJSON Help where
56 parseJSON = withText "help" $ \t ->
57 parseJSON = withText "help" $ \t ->
57− case Pandoc.runPure (Pandoc.readHtml def t) of
58+ case Pandoc.readHtml def (T.unpack t) of
58 Left e -> fail (show e)
59 Left e -> fail (show e)
59 Right x -> pure $! Pan x t
60 Right x -> pure $! Pan x t
60
61
@@ -83,10 +84,7 @@ flatten :: Help -> String
83flatten = \case
84flatten = \case
84 Help xs -> foldMap flatten xs
85 Help xs -> foldMap flatten xs
85 Raw t -> Text.unpack t
86 Raw t -> Text.unpack t
86− Pan d t -> Text.unpack $
87− case Pandoc.runPure (Pandoc.writeHaddock def d) of
87+ Pan d _t -> Pandoc.writeHaddock def d
88− Left {} -> t
89− Right x -> x
90
88
91wrap :: String -> String -> Text
89wrap :: String -> String -> Text
92wrap sep =
90wrap sep =
gen/stack.yaml−5
@@ -1,4 +1,3 @@
1−compiler: ghc-8.0.2
2resolver: lts-8.18
1resolver: lts-8.18
3
2
4flags: {}
3flags: {}
@@ -10,7 +9,3 @@ extra-deps:
10
9
11packages:
10packages:
12 - '.'
11 - '.'
13−
14−nix:
15− enable: true
16− packages: [zlib, icu]