Skip to content

Commit 6e8d225

Browse files
committed
xlsx ghcid
1 parent ab1d07f commit 6e8d225

File tree

3 files changed

+71
-61
lines changed

3 files changed

+71
-61
lines changed

pub/xlsx/src/Codec/Xlsx/Types.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ _AutomaticHeight
165165
makePrisms ''RowHeight
166166
#endif
167167

168-
-- | Properties of a row. See §18.3.1.73 "row (Row)" for more details
168+
-- | Properties of a row. See 18.3.1.73 "row (Row)" for more details
169169
data RowProperties = RowProps
170170
{ -- | Row height in points
171171
rowHeight :: Maybe RowHeight,

pub/xlsx/test/StreamTests.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{-# LANGUAGE CPP #-}
22
{-# LANGUAGE OverloadedStrings #-}
3+
{-# LANGUAGE PackageImports #-}
34
{-# LANGUAGE QuasiQuotes #-}
45
{-# LANGUAGE ScopedTypeVariables #-}
56
{-# LANGUAGE TupleSections #-}
@@ -22,7 +23,7 @@ tests = testGroup
2223
#else
2324

2425
import Control.Exception
25-
import Codec.Archive.Zip as Zip
26+
import "zip" Codec.Archive.Zip as Zip
2627
import Codec.Xlsx
2728
import Codec.Xlsx.Parser.Stream
2829
import Conduit ((.|))

pub/xlsx/xlsx.cabal

Lines changed: 68 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
cabal-version: 3.0
12
name: xlsx
23
version: 1.1.2.2
34
synopsis: Simple and incomplete Excel file parser/writer
@@ -26,68 +27,19 @@ maintainer: [email protected]
2627
category: Codec
2728
build-type: Simple
2829
tested-with: GHC ==9.0.2 || ==9.2.8 || ==9.4.5 || ==9.6.2
29-
cabal-version: >=1.10
3030

3131
flag microlens
3232
default: False
3333
description: Use microlens instead of lens
3434

35-
library
36-
hs-source-dirs: src
37-
ghc-options: -Wall
38-
exposed-modules:
39-
Codec.Xlsx
40-
Codec.Xlsx.Formatted
41-
Codec.Xlsx.Lens
42-
Codec.Xlsx.Parser
43-
Codec.Xlsx.Parser.Internal
44-
Codec.Xlsx.Parser.Internal.Fast
45-
Codec.Xlsx.Parser.Internal.PivotTable
46-
Codec.Xlsx.Parser.Internal.Util
47-
Codec.Xlsx.Parser.Stream
48-
Codec.Xlsx.Types
49-
Codec.Xlsx.Types.AutoFilter
50-
Codec.Xlsx.Types.Cell
51-
Codec.Xlsx.Types.Comment
52-
Codec.Xlsx.Types.Common
53-
Codec.Xlsx.Types.ConditionalFormatting
54-
Codec.Xlsx.Types.DataValidation
55-
Codec.Xlsx.Types.Drawing
56-
Codec.Xlsx.Types.Drawing.Chart
57-
Codec.Xlsx.Types.Drawing.Common
58-
Codec.Xlsx.Types.Internal
59-
Codec.Xlsx.Types.Internal.CfPair
60-
Codec.Xlsx.Types.Internal.CommentTable
61-
Codec.Xlsx.Types.Internal.ContentTypes
62-
Codec.Xlsx.Types.Internal.CustomProperties
63-
Codec.Xlsx.Types.Internal.DvPair
64-
Codec.Xlsx.Types.Internal.FormulaData
65-
Codec.Xlsx.Types.Internal.Relationships
66-
Codec.Xlsx.Types.Internal.SharedStringTable
67-
Codec.Xlsx.Types.PageSetup
68-
Codec.Xlsx.Types.PivotTable
69-
Codec.Xlsx.Types.PivotTable.Internal
70-
Codec.Xlsx.Types.Protection
71-
Codec.Xlsx.Types.RichText
72-
Codec.Xlsx.Types.SheetViews
73-
Codec.Xlsx.Types.StyleSheet
74-
Codec.Xlsx.Types.Table
75-
Codec.Xlsx.Types.Variant
76-
Codec.Xlsx.Writer
77-
Codec.Xlsx.Writer.Internal
78-
Codec.Xlsx.Writer.Internal.PivotTable
79-
Codec.Xlsx.Writer.Internal.Stream
80-
Codec.Xlsx.Writer.Stream
81-
82-
-- The only function it exports is also hidden by the upstream library: https://github.com/the-real-blackh/hexpat/blob/master/Text/XML/Expat/SAX.hs#L227
83-
-- We could expose it but then this function is in the xlsx API for a long time.
84-
-- It be better to expose it in the upstream library instead I think. It was copied here so the parser can use it.
85-
other-modules:
86-
Codec.Xlsx.Parser.Internal.Memoize
87-
Codec.Xlsx.Parser.Stream.HexpatInternal
35+
flag ghcid
36+
default: False
37+
description: Run dev ghcid shell
8838

39+
common pkg
40+
hs-source-dirs: src
8941
build-depends:
90-
attoparsec
42+
, attoparsec
9143
, base >=4.9.0.0 && <5.0
9244
, base64-bytestring
9345
, binary-search
@@ -122,7 +74,7 @@ library
12274

12375
if flag(microlens)
12476
build-depends:
125-
indexed-traversable
77+
, indexed-traversable
12678
, microlens >=0.4 && <0.5
12779
, microlens-ghc
12880
, microlens-mtl
@@ -145,7 +97,64 @@ library
14597
RecordWildCards
14698
TupleSections
14799

100+
library
101+
import: pkg
102+
ghc-options: -Wall
103+
exposed-modules:
104+
Codec.Xlsx
105+
Codec.Xlsx.Formatted
106+
Codec.Xlsx.Lens
107+
Codec.Xlsx.Parser
108+
Codec.Xlsx.Parser.Internal
109+
Codec.Xlsx.Parser.Internal.Fast
110+
Codec.Xlsx.Parser.Internal.PivotTable
111+
Codec.Xlsx.Parser.Internal.Util
112+
Codec.Xlsx.Parser.Stream
113+
Codec.Xlsx.Types
114+
Codec.Xlsx.Types.AutoFilter
115+
Codec.Xlsx.Types.Cell
116+
Codec.Xlsx.Types.Comment
117+
Codec.Xlsx.Types.Common
118+
Codec.Xlsx.Types.ConditionalFormatting
119+
Codec.Xlsx.Types.DataValidation
120+
Codec.Xlsx.Types.Drawing
121+
Codec.Xlsx.Types.Drawing.Chart
122+
Codec.Xlsx.Types.Drawing.Common
123+
Codec.Xlsx.Types.Internal
124+
Codec.Xlsx.Types.Internal.CfPair
125+
Codec.Xlsx.Types.Internal.CommentTable
126+
Codec.Xlsx.Types.Internal.ContentTypes
127+
Codec.Xlsx.Types.Internal.CustomProperties
128+
Codec.Xlsx.Types.Internal.DvPair
129+
Codec.Xlsx.Types.Internal.FormulaData
130+
Codec.Xlsx.Types.Internal.Relationships
131+
Codec.Xlsx.Types.Internal.SharedStringTable
132+
Codec.Xlsx.Types.PageSetup
133+
Codec.Xlsx.Types.PivotTable
134+
Codec.Xlsx.Types.PivotTable.Internal
135+
Codec.Xlsx.Types.Protection
136+
Codec.Xlsx.Types.RichText
137+
Codec.Xlsx.Types.SheetViews
138+
Codec.Xlsx.Types.StyleSheet
139+
Codec.Xlsx.Types.Table
140+
Codec.Xlsx.Types.Variant
141+
Codec.Xlsx.Writer
142+
Codec.Xlsx.Writer.Internal
143+
Codec.Xlsx.Writer.Internal.PivotTable
144+
Codec.Xlsx.Writer.Internal.Stream
145+
Codec.Xlsx.Writer.Stream
146+
147+
-- The only function it exports is also hidden by the upstream library: https://github.com/the-real-blackh/hexpat/blob/master/Text/XML/Expat/SAX.hs#L227
148+
-- We could expose it but then this function is in the xlsx API for a long time.
149+
-- It be better to expose it in the upstream library instead I think. It was copied here so the parser can use it.
150+
other-modules:
151+
Codec.Xlsx.Parser.Internal.Memoize
152+
Codec.Xlsx.Parser.Stream.HexpatInternal
153+
148154
test-suite data-test
155+
if flag(ghcid)
156+
import: pkg
157+
149158
type: exitcode-stdio-1.0
150159
main-is: Main.hs
151160
hs-source-dirs: test/
@@ -163,7 +172,7 @@ test-suite data-test
163172
TestXlsx
164173

165174
build-depends:
166-
base
175+
, base
167176
, bytestring
168177
, conduit
169178
, containers
@@ -187,7 +196,7 @@ test-suite data-test
187196

188197
if flag(microlens)
189198
build-depends:
190-
microlens >=0.4 && <0.5
199+
, microlens >=0.4 && <0.5
191200
, microlens-mtl
192201
, microlens-platform
193202
, microlens-th
@@ -208,7 +217,7 @@ benchmark bench
208217
hs-source-dirs: benchmarks
209218
main-is: Main.hs
210219
build-depends:
211-
base
220+
, base
212221
, bytestring
213222
, conduit
214223
, criterion

0 commit comments

Comments
 (0)