Skip to content

Commit ed21af4

Browse files
authored
Vendor the flat package (#7308)
1 parent 33dee5f commit ed21af4

File tree

106 files changed

+8771
-76
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+8771
-76
lines changed

plutus-benchmark/common/PlutusBenchmark/Common.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ import Criterion.Main
5050
import Criterion.Types (Config (..))
5151
import Data.ByteString qualified as BS
5252
import Data.SatInt (fromSatInt)
53-
import Flat qualified
5453
import GHC.IO.Encoding (setLocaleEncoding)
54+
import PlutusCore.Flat qualified as Flat
5555
import System.Directory
5656
import System.FilePath
5757
import System.IO

plutus-benchmark/coop/exe/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import PlutusTx
1313

1414
import Data.ByteString.Lazy qualified as BSL
1515
import Data.Foldable (traverse_)
16-
import Flat (flat, unflat)
16+
import PlutusCore.Flat (flat, unflat)
1717
import System.Directory (doesFileExist)
1818
import System.FilePath ((<.>), (</>))
1919

plutus-benchmark/nofib/exe/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import Data.Char (isSpace)
1515
import Data.Foldable (traverse_)
1616
import Data.SatInt
1717
import Data.String (fromString)
18-
import Flat qualified
1918
import Options.Applicative as Opt hiding (action)
19+
import PlutusCore.Flat qualified as Flat
2020
import Prettyprinter (Doc, indent, line, vsep)
2121
import System.Exit (exitFailure)
2222
import System.IO

plutus-benchmark/plutus-benchmark.cabal

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ library plutus-benchmark-common
9393
, deepseq
9494
, directory
9595
, filepath
96-
, flat ^>=0.6
9796
, plutus-core ^>=1.53
97+
, plutus-core:flat
9898
, plutus-ledger-api ^>=1.53
9999
, plutus-tx:plutus-tx-testlib
100100
, tasty
@@ -133,12 +133,12 @@ executable nofib-exe
133133
build-depends:
134134
, base >=4.9 && <5
135135
, bytestring
136-
, flat ^>=0.6
137136
, lens
138137
, nofib-internal
139138
, optparse-applicative
140139
, plutus-benchmark-common
141140
, plutus-core ^>=1.53
141+
, plutus-core:flat
142142
, plutus-tx ^>=1.53
143143
, prettyprinter
144144
, transformers
@@ -289,10 +289,10 @@ library validation-internal
289289
, criterion >=1.5.9.0
290290
, directory
291291
, filepath
292-
, flat ^>=0.6
293292
, optparse-applicative
294293
, plutus-benchmark-common
295294
, plutus-core ^>=1.53
295+
, plutus-core:flat
296296

297297
benchmark validation
298298
import: lang, os-support
@@ -317,9 +317,9 @@ test-suite validation-tests
317317
, bytestring
318318
, directory
319319
, filepath
320-
, flat ^>=0.6
321320
, plutus-benchmark-common
322321
, plutus-core ^>=1.53
322+
, plutus-core:flat
323323
, plutus-core:plutus-core-testlib
324324
, plutus-tx ^>=1.53
325325
, plutus-tx:plutus-tx-testlib
@@ -780,9 +780,9 @@ executable gen-coop-flat
780780
, coop
781781
, directory
782782
, filepath
783-
, flat
784783
, plutus-benchmark-common
785784
, plutus-core
785+
, plutus-core:flat
786786
, plutus-ledger-api
787787
, plutus-tx ^>=1.53
788788
, plutus-tx:plutus-tx-testlib

plutus-benchmark/validation/src/PlutusBenchmark/Validation/Common.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import Options.Applicative
2424

2525
import Data.ByteString qualified as BS
2626
import Data.List (isPrefixOf)
27-
import Flat
27+
import PlutusCore.Flat
2828
import System.Directory (listDirectory)
2929
import System.FilePath
3030

plutus-benchmark/validation/test/Spec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import PlutusTx.Test qualified as Tx
1414
import UntypedPlutusCore qualified as UPLC
1515

1616
import Data.ByteString qualified as BS
17-
import Flat
17+
import PlutusCore.Flat
1818
import System.Directory (listDirectory)
1919
import System.FilePath
2020

plutus-core/executables/plutus/AnyProgram/IO.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import Data.ByteString.Lazy qualified as BSL
2323
import Data.Maybe
2424
import Data.Singletons.Decide
2525
import Data.Text.Encoding qualified as T
26-
import Flat
26+
import PlutusCore.Flat
2727
import Prettyprinter
2828
import Prettyprinter.Render.Text
2929
import System.IO

plutus-core/executables/src/PlutusCore/Executable/AstIO.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import UntypedPlutusCore qualified as UPLC
3232

3333
import Control.Lens (traverseOf)
3434
import Data.ByteString.Lazy qualified as BSL
35-
import Flat (Flat, flat, unflat)
35+
import PlutusCore.Flat (Flat, flat, unflat)
3636

3737
type UplcProgDB ann = UPLC.Program PLC.DeBruijn PLC.DefaultUni PLC.DefaultFun ann
3838
type UplcProgNDB ann = UPLC.Program PLC.NamedDeBruijn PLC.DefaultUni PLC.DefaultFun ann

plutus-core/executables/src/PlutusCore/Executable/Common.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ import Data.Proxy (Proxy (..))
8080
import Data.SatInt
8181
import Data.Text qualified as T
8282
import Data.Text.IO qualified as T
83-
import Flat (Flat)
8483
import GHC.TypeLits (symbolVal)
84+
import PlutusCore.Flat (Flat)
8585
import Prettyprinter ((<+>))
8686

8787
import Text.Megaparsec (errorBundlePretty)

plutus-core/flat/LICENSE

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Copyright (c) 2016, Pasqualino `Titto` Assini
2+
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
11+
* Redistributions in binary form must reproduce the above
12+
copyright notice, this list of conditions and the following
13+
disclaimer in the documentation and/or other materials provided
14+
with the distribution.
15+
16+
* Neither the name of the copyright holder nor the names of other
17+
contributors may be used to endorse or promote products derived
18+
from this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)