Enable partial fields warning (#179)
- Updates exported type `EventMessage` - so avoid exporting partial functions.
This commit is contained in:
parent
d82b093b6b
commit
e06bb4c949
@ -1,6 +1,10 @@
|
|||||||
Changelog
|
Changelog
|
||||||
==========
|
==========
|
||||||
|
|
||||||
|
## Version 1.7.0 -- Unreleased
|
||||||
|
|
||||||
|
* Fix data type `EventMessage` to not export partial fields
|
||||||
|
|
||||||
## Version 1.6.0
|
## Version 1.6.0
|
||||||
|
|
||||||
* HLint fixes - some types were changed to newtype (#173)
|
* HLint fixes - some types were changed to newtype (#173)
|
||||||
|
|||||||
19
Setup.hs
19
Setup.hs
@ -1,19 +0,0 @@
|
|||||||
--
|
|
||||||
-- MinIO Haskell SDK, (C) 2017 MinIO, Inc.
|
|
||||||
--
|
|
||||||
-- Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
-- you may not use this file except in compliance with the License.
|
|
||||||
-- You may obtain a copy of the License at
|
|
||||||
--
|
|
||||||
-- http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
--
|
|
||||||
-- Unless required by applicable law or agreed to in writing, software
|
|
||||||
-- distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
-- See the License for the specific language governing permissions and
|
|
||||||
-- limitations under the License.
|
|
||||||
--
|
|
||||||
|
|
||||||
import Distribution.Simple
|
|
||||||
|
|
||||||
main = defaultMain
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
cabal-version: 2.2
|
cabal-version: 2.4
|
||||||
name: minio-hs
|
name: minio-hs
|
||||||
version: 1.6.0
|
version: 1.6.0
|
||||||
synopsis: A MinIO Haskell Library for Amazon S3 compatible cloud
|
synopsis: A MinIO Haskell Library for Amazon S3 compatible cloud
|
||||||
@ -44,9 +44,9 @@ common base-settings
|
|||||||
|
|
||||||
-- Add this when we have time. Fixing partial-fields requires major version
|
-- Add this when we have time. Fixing partial-fields requires major version
|
||||||
-- bump at this time.
|
-- bump at this time.
|
||||||
-- if impl(ghc >= 8.4)
|
if impl(ghc >= 8.4)
|
||||||
-- ghc-options: -Wpartial-fields
|
ghc-options: -Wpartial-fields
|
||||||
-- -Wmissing-export-lists
|
-- -Wmissing-export-lists
|
||||||
|
|
||||||
if impl(ghc >= 8.8)
|
if impl(ghc >= 8.8)
|
||||||
ghc-options: -Wmissing-deriving-strategies
|
ghc-options: -Wmissing-deriving-strategies
|
||||||
|
|||||||
@ -963,13 +963,14 @@ outputJSONFromRecordDelimiter t =
|
|||||||
|
|
||||||
-- | An EventMessage represents each kind of message received from the server.
|
-- | An EventMessage represents each kind of message received from the server.
|
||||||
data EventMessage
|
data EventMessage
|
||||||
= ProgressEventMessage {emProgress :: Progress}
|
= ProgressEventMessage Progress
|
||||||
| StatsEventMessage {emStats :: Stats}
|
| StatsEventMessage Stats
|
||||||
| RequestLevelErrorMessage
|
| RequestLevelErrorMessage
|
||||||
{ emErrorCode :: Text,
|
Text
|
||||||
emErrorMessage :: Text
|
-- ^ Error code
|
||||||
}
|
Text
|
||||||
| RecordPayloadEventMessage {emPayloadBytes :: ByteString}
|
-- ^ Error message
|
||||||
|
| RecordPayloadEventMessage ByteString
|
||||||
deriving stock (Show, Eq)
|
deriving stock (Show, Eq)
|
||||||
|
|
||||||
data MsgHeaderName
|
data MsgHeaderName
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user