-
Notifications
You must be signed in to change notification settings - Fork 463
/
plutus-core.cabal
1086 lines (1013 loc) · 30.1 KB
/
plutus-core.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
cabal-version: 3.0
name: plutus-core
version: 1.25.0.0
license: Apache-2.0
license-files:
LICENSE
NOTICE
maintainer: michael.peyton-jones@iohk.io
author: Plutus Core Team
synopsis: Language library for Plutus Core
description: Pretty-printer, parser, and typechecker for Plutus Core.
category: Language, Plutus
build-type: Simple
extra-doc-files:
CHANGELOG.md
README.md
extra-source-files:
cost-model/data/*.R
cost-model/data/benching.csv
cost-model/data/builtinCostModel.json
cost-model/data/cekMachineCosts.json
plutus-core/test/CostModelInterface/defaultCostModelParams.json
source-repository head
type: git
location: https://github.com/IntersectMBO/plutus
-- inline-r is a problematic dependency. It doesn't build with newer
-- versions of R, so if we depend on it then people need to install
-- an old R. This is not so bad for people working on plutus itself
-- (use Nix or work it out), although we may want to eventually
-- purge it. However, due to a cabal bug (https://github.com/haskell/cabal/issues/4087),
-- in some cases cabal will require R to be installed _at solving time_,
-- even though it never wants to build it. This means that the problem
-- leaks into our downstream dependencies. So our solution is to guard
-- the dependency behind a flag, off by default, and turn it on for
-- ourselves locally.
flag with-inline-r
description: Enable build of packages that use `inline-r`.
manual: True
default: False
flag with-cert
description: Enable build of packages that use `plutus-cert`.
manual: True
default: False
common lang
default-language: Haskell2010
default-extensions:
DeriveFoldable
DeriveFunctor
DeriveGeneric
DeriveLift
DeriveTraversable
DerivingStrategies
DerivingVia
ExplicitForAll
FlexibleContexts
GeneralizedNewtypeDeriving
ImportQualifiedPost
ScopedTypeVariables
StandaloneDeriving
ghc-options:
-Wall -Wnoncanonical-monad-instances -Wincomplete-uni-patterns
-Wincomplete-record-updates -Wredundant-constraints -Widentities
-Wunused-packages -Wmissing-deriving-strategies
if impl(ghc >=9.8)
ghc-options: -Wno-x-partial
-- This contains UPLC+TPLC, PIR must be explicitly included by depending
-- on the public sub-library.
-- In due course UPLC and TPLC should be split, with the main library
-- containing UPLC.
library
import: lang
exposed-modules:
Data.Aeson.THReader
Data.Either.Extras
Data.List.Extras
Data.MultiSet.Lens
PlutusCore
PlutusCore.Analysis.Definitions
PlutusCore.Annotation
PlutusCore.Arity
PlutusCore.Bitwise.Convert
PlutusCore.Builtin
PlutusCore.Builtin.Debug
PlutusCore.Builtin.Elaborate
PlutusCore.Builtin.Emitter
PlutusCore.Check.Normal
PlutusCore.Check.Scoping
PlutusCore.Check.Uniques
PlutusCore.Check.Value
PlutusCore.Compiler
PlutusCore.Compiler.Erase
PlutusCore.Compiler.Opts
PlutusCore.Compiler.Types
PlutusCore.Core
PlutusCore.Crypto.BLS12_381.Error
PlutusCore.Crypto.BLS12_381.G1
PlutusCore.Crypto.BLS12_381.G2
PlutusCore.Crypto.BLS12_381.Pairing
PlutusCore.Crypto.Ed25519
PlutusCore.Crypto.Hash
PlutusCore.Crypto.Secp256k1
PlutusCore.Data
PlutusCore.DataFilePaths
PlutusCore.DeBruijn
PlutusCore.DeBruijn.Internal
PlutusCore.Default
PlutusCore.Default.Builtins
PlutusCore.Error
PlutusCore.Evaluation.ErrorWithCause
PlutusCore.Evaluation.Machine.BuiltinCostModel
PlutusCore.Evaluation.Machine.Ck
PlutusCore.Evaluation.Machine.CostingFun.Core
PlutusCore.Evaluation.Machine.CostingFun.JSON
PlutusCore.Evaluation.Machine.CostingFun.SimpleJSON
PlutusCore.Evaluation.Machine.CostModelInterface
PlutusCore.Evaluation.Machine.CostStream
PlutusCore.Evaluation.Machine.ExBudget
PlutusCore.Evaluation.Machine.ExBudgetingDefaults
PlutusCore.Evaluation.Machine.ExBudgetStream
PlutusCore.Evaluation.Machine.Exception
PlutusCore.Evaluation.Machine.ExMemory
PlutusCore.Evaluation.Machine.ExMemoryUsage
PlutusCore.Evaluation.Machine.MachineParameters
PlutusCore.Evaluation.Machine.MachineParameters.Default
PlutusCore.Evaluation.Machine.SimpleBuiltinCostModel
PlutusCore.Evaluation.Result
PlutusCore.Examples.Builtins
PlutusCore.Examples.Data.Data
PlutusCore.Examples.Data.Function
PlutusCore.Examples.Data.InterList
PlutusCore.Examples.Data.List
PlutusCore.Examples.Data.Pair
PlutusCore.Examples.Data.Shad
PlutusCore.Examples.Data.TreeForest
PlutusCore.Examples.Data.Vec
PlutusCore.Examples.Everything
PlutusCore.Flat
PlutusCore.FsTree
PlutusCore.Mark
PlutusCore.MkPlc
PlutusCore.Name.Unique
PlutusCore.Name.UniqueMap
PlutusCore.Name.UniqueSet
PlutusCore.Normalize
PlutusCore.Normalize.Internal
PlutusCore.Parser
PlutusCore.Pretty
PlutusCore.Quote
PlutusCore.Rename
PlutusCore.Rename.Internal
PlutusCore.Rename.Monad
PlutusCore.Size
PlutusCore.StdLib.Data.Bool
PlutusCore.StdLib.Data.ChurchNat
PlutusCore.StdLib.Data.Data
PlutusCore.StdLib.Data.Function
PlutusCore.StdLib.Data.Integer
PlutusCore.StdLib.Data.List
PlutusCore.StdLib.Data.Nat
PlutusCore.StdLib.Data.Pair
PlutusCore.StdLib.Data.ScottList
PlutusCore.StdLib.Data.ScottUnit
PlutusCore.StdLib.Data.Sum
PlutusCore.StdLib.Data.Unit
PlutusCore.StdLib.Everything
PlutusCore.StdLib.Meta
PlutusCore.StdLib.Meta.Data.Function
PlutusCore.StdLib.Meta.Data.Tuple
PlutusCore.StdLib.Type
PlutusCore.Subst
PlutusCore.TypeCheck
PlutusCore.TypeCheck.Internal
PlutusCore.Version
PlutusPrelude
Prettyprinter.Custom
Universe
UntypedPlutusCore
UntypedPlutusCore.Check.Scope
UntypedPlutusCore.Check.Uniques
UntypedPlutusCore.Core
UntypedPlutusCore.Core.Type
UntypedPlutusCore.Core.Zip
UntypedPlutusCore.DeBruijn
UntypedPlutusCore.Evaluation.Machine.Cek
UntypedPlutusCore.Evaluation.Machine.Cek.CekMachineCosts
UntypedPlutusCore.Evaluation.Machine.Cek.Internal
UntypedPlutusCore.Evaluation.Machine.Cek.StepCounter
UntypedPlutusCore.Evaluation.Machine.SteppableCek
UntypedPlutusCore.Evaluation.Machine.SteppableCek.DebugDriver
UntypedPlutusCore.Evaluation.Machine.SteppableCek.Internal
UntypedPlutusCore.MkUPlc
UntypedPlutusCore.Parser
UntypedPlutusCore.Purity
UntypedPlutusCore.Rename
other-modules:
Data.Aeson.Flatten
Data.Functor.Foldable.Monadic
PlutusCore.Builtin.HasConstant
PlutusCore.Builtin.KnownKind
PlutusCore.Builtin.KnownType
PlutusCore.Builtin.KnownTypeAst
PlutusCore.Builtin.Meaning
PlutusCore.Builtin.Polymorphism
PlutusCore.Builtin.Result
PlutusCore.Builtin.Runtime
PlutusCore.Builtin.TestKnown
PlutusCore.Builtin.TypeScheme
PlutusCore.Core.Instance
PlutusCore.Core.Instance.Eq
PlutusCore.Core.Instance.Pretty
PlutusCore.Core.Instance.Pretty.Classic
PlutusCore.Core.Instance.Pretty.Default
PlutusCore.Core.Instance.Pretty.Plc
PlutusCore.Core.Instance.Pretty.Readable
PlutusCore.Core.Instance.Scoping
PlutusCore.Core.Plated
PlutusCore.Core.Type
PlutusCore.Crypto.Utils
PlutusCore.Default.Universe
PlutusCore.Eq
PlutusCore.Parser.Builtin
PlutusCore.Parser.ParserCommon
PlutusCore.Parser.Type
PlutusCore.Pretty.Classic
PlutusCore.Pretty.ConfigName
PlutusCore.Pretty.Default
PlutusCore.Pretty.Extra
PlutusCore.Pretty.Plc
PlutusCore.Pretty.PrettyConst
PlutusCore.Pretty.Readable
PlutusCore.Pretty.Utils
Universe.Core
UntypedPlutusCore.Analysis.Definitions
UntypedPlutusCore.Analysis.Usages
UntypedPlutusCore.Core.Instance
UntypedPlutusCore.Core.Instance.Eq
UntypedPlutusCore.Core.Instance.Flat
UntypedPlutusCore.Core.Instance.Pretty
UntypedPlutusCore.Core.Instance.Pretty.Classic
UntypedPlutusCore.Core.Instance.Pretty.Default
UntypedPlutusCore.Core.Instance.Pretty.Plc
UntypedPlutusCore.Core.Instance.Pretty.Readable
UntypedPlutusCore.Core.Plated
UntypedPlutusCore.Evaluation.Machine.Cek.EmitterMode
UntypedPlutusCore.Evaluation.Machine.Cek.ExBudgetMode
UntypedPlutusCore.Evaluation.Machine.CommonAPI
UntypedPlutusCore.Mark
UntypedPlutusCore.Rename.Internal
UntypedPlutusCore.Simplify
UntypedPlutusCore.Simplify.Opts
UntypedPlutusCore.Size
UntypedPlutusCore.Subst
UntypedPlutusCore.Transform.CaseOfCase
UntypedPlutusCore.Transform.CaseReduce
UntypedPlutusCore.Transform.Cse
UntypedPlutusCore.Transform.FloatDelay
UntypedPlutusCore.Transform.ForceDelay
UntypedPlutusCore.Transform.Inline
reexported-modules: Data.SatInt
hs-source-dirs:
plutus-core/src plutus-core/stdlib plutus-core/examples
untyped-plutus-core/src prelude
-- Notes on dependencies:
-- * Bound on cardano-crypto-class for the fixed SECP primitives and 9.6 support
-- * The bound on 'dependent-sum' is needed to avoid https://github.com/obsidiansystems/dependent-sum/issues/72
build-depends:
, aeson
, array
, barbies
, base >=4.9 && <5
, base64-bytestring
, bimap
, bytestring
, bytestring-strict-builder
, cardano-crypto
, cardano-crypto-class ^>=2.1.2
, cassava
, cborg
, composition-prelude >=1.1.0.1
, containers
, cryptonite
, data-default-class
, deepseq
, dependent-sum >=0.7.1.0
, deriving-aeson >=0.2.3
, deriving-compat
, dlist
, exceptions
, extra
, filepath
, flat ^>=0.6
, free
, ghc-prim
, hashable >=1.4
, hedgehog >=1.0
, index-envs
, lens
, megaparsec
, mmorph
, mono-traversable
, monoidal-containers
, mtl
, multiset
, nothunks ^>=0.1.5
, parser-combinators >=0.4.0
, prettyprinter >=1.1.0.1
, prettyprinter-configurable ^>=1.25
, primitive
, profunctors
, recursion-schemes
, satint
, semigroups >=0.19.1
, serialise
, some
, template-haskell
, text
, th-compat
, th-lift
, th-lift-instances
, th-utilities
, time
, transformers
, unordered-containers
, vector
, witherable
if impl(ghc <9.0)
build-depends: integer-gmp
test-suite plutus-core-test
import: lang
-- needs linux 'diff' available
if os(windows)
buildable: False
type: exitcode-stdio-1.0
main-is: Spec.hs
hs-source-dirs: plutus-core/test
ghc-options: -threaded -rtsopts -with-rtsopts=-N
other-modules:
CBOR.DataStability
Check.Spec
CostModelInterface.Spec
CostModelSafety.Spec
Evaluation.Machines
Evaluation.Spec
Generators.QuickCheck.Utils
Names.Spec
Normalization.Check
Normalization.Type
Parser.Spec
Pretty.Readable
TypeSynthesis.Spec
default-language: Haskell2010
build-depends:
, aeson
, base >=4.9 && <5
, bytestring
, containers
, data-default-class
, extra
, filepath
, flat ^>=0.6
, hedgehog
, hex-text
, mmorph
, mtl
, plutus-core:{plutus-core, plutus-core-testlib} ^>=1.25
, prettyprinter
, serialise
, tasty
, tasty-golden
, tasty-hedgehog
, tasty-hunit
, tasty-quickcheck
, template-haskell
, text
, th-lift-instances
, th-utilities
test-suite untyped-plutus-core-test
import: lang
-- needs linux 'diff' available
if os(windows)
buildable: False
type: exitcode-stdio-1.0
main-is: Spec.hs
hs-source-dirs: untyped-plutus-core/test
ghc-options: -O2 -threaded -rtsopts -with-rtsopts=-N
other-modules:
Analysis.Spec
DeBruijn.FlatNatWord
DeBruijn.Scope
DeBruijn.Spec
DeBruijn.UnDeBruijnify
Evaluation.Builtins
Evaluation.Builtins.BLS12_381
Evaluation.Builtins.BLS12_381.TestClasses
Evaluation.Builtins.BLS12_381.Utils
Evaluation.Builtins.Common
Evaluation.Builtins.Conversion
Evaluation.Builtins.Costing
Evaluation.Builtins.Definition
Evaluation.Builtins.MakeRead
Evaluation.Builtins.SignatureVerification
Evaluation.Debug
Evaluation.FreeVars
Evaluation.Golden
Evaluation.Machines
Evaluation.Regressions
Flat.Spec
Generators
Transform.Simplify
build-depends:
, base >=4.9 && <5
, bytestring
, cardano-crypto-class
, dlist
, flat ^>=0.6
, hedgehog
, lens
, mtl
, plutus-core:{plutus-core, plutus-core-testlib} ^>=1.25
, pretty-show
, prettyprinter
, QuickCheck
, serialise
, split
, tasty
, tasty-golden
, tasty-hedgehog
, tasty-hunit
, tasty-quickcheck
, text
, vector
executable plc
import: lang
main-is: plc/Main.hs
hs-source-dirs: executables
build-depends:
, base >=4.9 && <5
, bytestring
, flat ^>=0.6
, optparse-applicative
, plutus-core ^>=1.25
, plutus-core-execlib ^>=1.25
, text
executable uplc
import: lang
main-is: uplc/Main.hs
hs-source-dirs: executables
build-depends:
, base >=4.9 && <5
, bytestring
, criterion
, deepseq
, flat ^>=0.6
, haskeline
, mtl
, optparse-applicative
, plutus-core ^>=1.25
, plutus-core-execlib ^>=1.25
, prettyprinter
, split
, text
----------------------------------------------
-- plutus-ir
----------------------------------------------
library plutus-ir
import: lang
visibility: public
hs-source-dirs: plutus-ir/src
exposed-modules:
PlutusIR
PlutusIR.Analysis.Builtins
PlutusIR.Analysis.Dependencies
PlutusIR.Analysis.RetainedSize
PlutusIR.Analysis.VarInfo
PlutusIR.Check.Uniques
PlutusIR.Compiler
PlutusIR.Compiler.Datatype
PlutusIR.Compiler.Definitions
PlutusIR.Compiler.Let
PlutusIR.Compiler.Names
PlutusIR.Compiler.Provenance
PlutusIR.Compiler.Types
PlutusIR.Contexts
PlutusIR.Core
PlutusIR.Core.Instance
PlutusIR.Core.Instance.Flat
PlutusIR.Core.Instance.Pretty
PlutusIR.Core.Instance.Pretty.Readable
PlutusIR.Core.Instance.Scoping
PlutusIR.Core.Plated
PlutusIR.Core.Type
PlutusIR.Error
PlutusIR.Mark
PlutusIR.MkPir
PlutusIR.Parser
PlutusIR.Pass
PlutusIR.Purity
PlutusIR.Subst
PlutusIR.Transform.Beta
PlutusIR.Transform.CaseOfCase
PlutusIR.Transform.CaseReduce
PlutusIR.Transform.DeadCode
PlutusIR.Transform.EvaluateBuiltins
PlutusIR.Transform.Inline.CallSiteInline
PlutusIR.Transform.Inline.Inline
PlutusIR.Transform.Inline.Utils
PlutusIR.Transform.KnownCon
PlutusIR.Transform.LetFloatIn
PlutusIR.Transform.LetFloatOut
PlutusIR.Transform.LetMerge
PlutusIR.Transform.NonStrict
PlutusIR.Transform.RecSplit
PlutusIR.Transform.Rename
PlutusIR.Transform.RewriteRules
PlutusIR.Transform.RewriteRules.CommuteFnWithConst
PlutusIR.Transform.StrictifyBindings
PlutusIR.Transform.Substitute
PlutusIR.Transform.ThunkRecursions
PlutusIR.Transform.Unwrap
PlutusIR.TypeCheck
PlutusIR.TypeCheck.Internal
other-modules:
PlutusIR.Analysis.Definitions
PlutusIR.Analysis.Size
PlutusIR.Analysis.Usages
PlutusIR.Compiler.Error
PlutusIR.Compiler.Lower
PlutusIR.Compiler.Recursion
PlutusIR.Normalize
PlutusIR.Transform.RewriteRules.Common
PlutusIR.Transform.RewriteRules.Internal
PlutusIR.Transform.RewriteRules.UnConstrConstrData
build-depends:
, algebraic-graphs >=0.7
, base >=4.9 && <5
, containers
, dlist
, dom-lt
, extra
, flat ^>=0.6
, hashable
, lens
, megaparsec
, mmorph
, monoidal-containers
, mtl
, multiset
, parser-combinators >=0.4.0
, plutus-core ^>=1.25
, prettyprinter >=1.1.0.1
, profunctors
, semigroupoids
, semigroups >=0.19.1
, text
, transformers
, witherable
if impl(ghc <9.0)
build-depends: integer-gmp
test-suite plutus-ir-test
import: lang
-- needs linux 'diff' available
if os(windows)
buildable: False
type: exitcode-stdio-1.0
main-is: Driver.hs
hs-source-dirs: plutus-ir/test
ghc-options: -threaded -rtsopts -with-rtsopts=-N
other-modules:
PlutusCore.Generators.QuickCheck.BuiltinsTests
PlutusCore.Generators.QuickCheck.SubstitutionTests
PlutusCore.Generators.QuickCheck.TypesTests
PlutusIR.Analysis.RetainedSize.Tests
PlutusIR.Check.Uniques.Tests
PlutusIR.Compiler.Datatype.Tests
PlutusIR.Compiler.Error.Tests
PlutusIR.Compiler.Let.Tests
PlutusIR.Compiler.Recursion.Tests
PlutusIR.Core.Tests
PlutusIR.Generators.QuickCheck.Tests
PlutusIR.Parser.Tests
PlutusIR.Purity.Tests
PlutusIR.Scoping.Tests
PlutusIR.Transform.Beta.Tests
PlutusIR.Transform.CaseOfCase.Tests
PlutusIR.Transform.CaseReduce.Tests
PlutusIR.Transform.DeadCode.Tests
PlutusIR.Transform.EvaluateBuiltins.Tests
PlutusIR.Transform.Inline.Tests
PlutusIR.Transform.KnownCon.Tests
PlutusIR.Transform.LetFloatIn.Tests
PlutusIR.Transform.LetFloatOut.Tests
PlutusIR.Transform.NonStrict.Tests
PlutusIR.Transform.RecSplit.Tests
PlutusIR.Transform.Rename.Tests
PlutusIR.Transform.RewriteRules.Tests
PlutusIR.Transform.StrictifyBindings.Tests
PlutusIR.Transform.ThunkRecursions.Tests
PlutusIR.Transform.Unwrap.Tests
PlutusIR.TypeCheck.Tests
build-tool-depends: tasty-discover:tasty-discover
build-depends:
, base >=4.9 && <5
, containers
, flat ^>=0.6
, hashable
, hedgehog
, lens
, mtl
, plutus-core:{plutus-core, plutus-core-testlib, plutus-ir} ^>=1.25
, QuickCheck
, serialise
, tasty
, tasty-expected-failure
, tasty-hedgehog
, tasty-hunit
, tasty-quickcheck
, text
, unordered-containers
executable pir
import: lang
main-is: pir/Main.hs
hs-source-dirs: executables
build-depends:
, base >=4.9 && <5
, bytestring
, cassava
, containers
, lens
, megaparsec
, optparse-applicative
, plutus-core-execlib ^>=1.25
, plutus-core:{plutus-core, plutus-ir} ^>=1.25
, text
, transformers
----------------------------------------------
-- support libs
----------------------------------------------
library plutus-core-execlib
import: lang
visibility: public
hs-source-dirs: executables/src
exposed-modules:
PlutusCore.Executable.AstIO
PlutusCore.Executable.Common
PlutusCore.Executable.Parsers
PlutusCore.Executable.Types
build-depends:
, aeson
, base >=4.9 && <5
, bytestring
, flat ^>=0.6
, lens
, megaparsec
, monoidal-containers
, mtl
, optparse-applicative
, plutus-core:{plutus-core, plutus-core-testlib, plutus-ir} ^>=1.25
, prettyprinter
, text
-- could split this up if we split up the main library for UPLC/PLC/PIR
library plutus-core-testlib
import: lang
visibility: public
hs-source-dirs: testlib
exposed-modules:
PlutusCore.Generators.Hedgehog
PlutusCore.Generators.Hedgehog.AST
PlutusCore.Generators.Hedgehog.Builtin
PlutusCore.Generators.Hedgehog.Denotation
PlutusCore.Generators.Hedgehog.Entity
PlutusCore.Generators.Hedgehog.Interesting
PlutusCore.Generators.Hedgehog.Test
PlutusCore.Generators.Hedgehog.TypedBuiltinGen
PlutusCore.Generators.Hedgehog.TypeEvalCheck
PlutusCore.Generators.Hedgehog.Utils
PlutusCore.Generators.NEAT.Common
PlutusCore.Generators.NEAT.Spec
PlutusCore.Generators.NEAT.Term
PlutusCore.Generators.NEAT.Type
PlutusCore.Generators.QuickCheck
PlutusCore.Generators.QuickCheck.Builtin
PlutusCore.Generators.QuickCheck.Common
PlutusCore.Generators.QuickCheck.GenerateKinds
PlutusCore.Generators.QuickCheck.GenerateTypes
PlutusCore.Generators.QuickCheck.GenTm
PlutusCore.Generators.QuickCheck.ShrinkTypes
PlutusCore.Generators.QuickCheck.Split
PlutusCore.Generators.QuickCheck.Substitutions
PlutusCore.Generators.QuickCheck.Unification
PlutusCore.Generators.QuickCheck.Utils
PlutusCore.Test
PlutusIR.Generators.AST
PlutusIR.Generators.QuickCheck
PlutusIR.Generators.QuickCheck.Common
PlutusIR.Generators.QuickCheck.GenerateTerms
PlutusIR.Generators.QuickCheck.ShrinkTerms
PlutusIR.Pass.Test
PlutusIR.Test
Test.Tasty.Extras
UntypedPlutusCore.Test.DeBruijn.Bad
UntypedPlutusCore.Test.DeBruijn.Good
build-depends:
, base >=4.9 && <5
, bifunctors
, bytestring
, containers
, data-default-class
, dependent-map >=0.4.0.0
, filepath
, hashable
, hedgehog >=1.0
, lazy-search
, lens
, mmorph
, mtl
, multiset
, plutus-core:{plutus-core, plutus-ir} ^>=1.25
, prettyprinter >=1.1.0.1
, prettyprinter-configurable ^>=1.25
, QuickCheck
, quickcheck-instances
, quickcheck-transformer
, size-based
, Stream
, tagged
, tasty
, tasty-golden
, tasty-hedgehog
, tasty-hunit
, text
-- This wraps up the use of the certifier library
-- so we can present a consistent inteface whether we
-- are building with it or not. If we aren't building
-- with it, we present a conservative stub implementation
-- that just always says everything is fine.
library plutus-ir-cert
import: lang
if flag(with-cert)
hs-source-dirs: plutus-ir/cert
build-depends: plutus-cert
else
hs-source-dirs: plutus-ir/cert-stub
default-language: Haskell2010
exposed-modules: PlutusIR.Certifier
build-depends:
, base
, plutus-core:{plutus-core, plutus-ir} ^>=1.25
----------------------------------------------
-- debugger
----------------------------------------------
executable debugger
import: lang
main-is: Main.hs
-- brick does not work on windows
if os(windows)
buildable: False
hs-source-dirs: executables/debugger
other-modules:
Draw
Event
Types
ghc-options: -O2 -threaded -rtsopts -with-rtsopts=-N
build-depends:
, base >=4.9 && <5
, brick
, containers
, exceptions
, filepath
, megaparsec
, microlens
, microlens-th ^>=0.4
, mono-traversable
, mtl
, optparse-applicative
, plutus-core ^>=1.25
, plutus-core-execlib ^>=1.25
, prettyprinter
, primitive
, text
, text-zipper
, vty ^>=6
, vty-crossplatform ^>=0.2
----------------------------------------------
-- profiling
----------------------------------------------
executable traceToStacks
import: lang
main-is: Main.hs
hs-source-dirs: executables/traceToStacks
other-modules: Common
build-depends:
, base >=4.9 && <5
, bytestring
, cassava
, optparse-applicative
, text
, vector
-- Tests for functions called by @traceToStacks@.
test-suite traceToStacks-test
import: lang
type: exitcode-stdio-1.0
hs-source-dirs: executables/traceToStacks
default-language: Haskell2010
ghc-options: -threaded -rtsopts -with-rtsopts=-N
main-is: TestGetStacks.hs
other-modules: Common
build-depends:
, base >=4.9 && <5
, bytestring
, cassava
, tasty
, tasty-hunit
, text
, vector
----------------------------------------------
-- cost-model
----------------------------------------------
-- This runs the microbenchmarks used to generate the cost models for built-in
-- functions, saving the results in a CSV file which must be specified on the
-- commmand line. It will take several hours.
executable cost-model-budgeting-bench
import: lang
main-is: Main.hs
other-modules:
Benchmarks.Bitwise
Benchmarks.Bool
Benchmarks.ByteStrings
Benchmarks.Crypto
Benchmarks.Data
Benchmarks.Integers
Benchmarks.Lists
Benchmarks.Misc
Benchmarks.Nops
Benchmarks.Pairs
Benchmarks.Strings
Benchmarks.Tracing
Benchmarks.Unit
Common
CriterionExtensions
Generators
hs-source-dirs: cost-model/budgeting-bench
build-depends:
, base >=4.9 && <5
, bytestring
, cardano-crypto-class
, criterion
, criterion-measurement
, deepseq
, directory
, filepath
, hedgehog
, mtl
, optparse-applicative
, plutus-core ^>=1.25
, QuickCheck
, quickcheck-instances
, random
, text
, time
-- This reads CSV data generated by cost-model-budgeting-bench, uses R to build
-- the cost models for built-in functions, and saves them in a specified
-- JSON file (see the help). The 'official' cost model should be checked in
-- in plutus-core/cost-model/data/builtinCostModel.json.
executable generate-cost-model
import: lang
main-is: Main.hs
hs-source-dirs: cost-model/create-cost-model
ghc-options: -threaded -rtsopts -with-rtsopts=-N
if !flag(with-inline-r)
buildable: False
-- This fails on Darwin with strange errors and I don't know why
-- > Error: C stack usage 17556409549320 is too close to the limit
-- > Fatal error: unable to initialize the JI
if os(osx)
buildable: False
build-depends:
, aeson-pretty
, barbies
, base >=4.9 && <5
, bytestring
, directory
, inline-r >=1.0.1
, optparse-applicative
, plutus-core ^>=1.25
, text
-- , exceptions
other-modules:
BuiltinMemoryModels
CreateBuiltinCostModel
-- The cost models for builtins are generated using R and converted into a JSON
-- form that can later be used to construct Haskell functions. This tests that
-- the predictions of the Haskell version are (approximately) identical to the R
-- ones. This test is problematic in CI: pretending that it's a benchmark will
-- prevent it from being run automatically but will still allow us to run it
-- manually; `cabal bench` also sets the working directory to the root of the
-- relevant package, which makes it easier to find the cost model data files
-- (unlike `cabal run` for exectuables, which sets the working directory to the
-- current shell directory).
benchmark cost-model-test
import: lang
type: exitcode-stdio-1.0
main-is: TestCostModels.hs
other-modules: TH
hs-source-dirs: cost-model/test cost-model/create-cost-model
if !flag(with-inline-r)
buildable: False
-- This fails on Darwin with strange errors and I don't know why
-- > Error: C stack usage 17556409549320 is too close to the limit
-- > Fatal error: unable to initialize the JI
if os(osx)
buildable: False
build-depends:
, barbies
, base >=4.9 && <5
, bytestring
, hedgehog
, inline-r >=1.0.1
, mmorph
, plutus-core ^>=1.25
, template-haskell
, text
other-modules:
BuiltinMemoryModels
CreateBuiltinCostModel
executable print-cost-model
import: lang
main-is: Main.hs
hs-source-dirs: cost-model/print-cost-model
other-modules: Paths_plutus_core
build-depends:
, aeson
, base >=4.9 && <5
, bytestring
, plutus-core ^>=1.25
----------------------------------------------