Skip to content

Commit c2df298

Browse files
authored
Add documentation Manual.md and DesignPrinciples.md (#5044)
* Added sub directory src/Constrained/Min where we keep a minimal version of the system. The idea is that is easier to explain, since it doesn't have things like Generics. It consists of Constrained.Min.Base.hs, Constraied.Min.Syntax.hs, Constrained.Min.Model.hs, and Constrained.Min.Tuple.hs Added the file docs/constrained/DesignPrinciples.md that describes this minimal system. * Describe computeSpecSimplified, the use of SolverPlan and propagageSpec. * parent 90eeb3a author Tim Sheard <sheard@pdx.edu> 1747246081 -0700 committer Tim Sheard <sheard@pdx.edu> 1750253688 -0400 Added a second document docs/constrained_generators/manual.md This is a basic manual about how to write constraints, but does not go into details about how the system is implemented.
1 parent 53665cc commit c2df298

File tree

12 files changed

+7360
-169
lines changed

12 files changed

+7360
-169
lines changed

docs/constrained-generators/DesignPrinciples.md

Lines changed: 2336 additions & 0 deletions
Large diffs are not rendered by default.

docs/constrained-generators/manual.md

Lines changed: 1392 additions & 163 deletions
Large diffs are not rendered by default.

eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Proposals.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{-# LANGUAGE AllowAmbiguousTypes #-}
2+
{-# LANGUAGE LambdaCase #-}
23
{-# LANGUAGE NamedFieldPuns #-}
34
{-# LANGUAGE ScopedTypeVariables #-}
45

hie.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ cradle:
306306
- path: "libs/constrained-generators/src"
307307
component: "lib:constrained-generators"
308308

309+
- path: "libs/constrained-generators/testlib"
310+
component: "constrained-generators:lib:testlib"
311+
309312
- path: "libs/constrained-generators/test"
310313
component: "constrained-generators:test:constrained"
311314

libs/constrained-generators/constrained-generators.cabal

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ library
3131
Constrained.Examples.Either
3232
Constrained.Examples.Fold
3333
Constrained.Examples.List
34+
Constrained.Examples.ManualExamples
3435
Constrained.Examples.Map
3536
Constrained.Examples.Set
3637
Constrained.Examples.Tree
@@ -74,6 +75,32 @@ library
7475
random,
7576
template-haskell,
7677

78+
library testlib
79+
exposed-modules:
80+
Test.Minimal.Base
81+
Test.Minimal.Model
82+
Test.Minimal.Syntax
83+
Test.Minimal.Tuple
84+
85+
hs-source-dirs: testlib
86+
default-language: Haskell2010
87+
ghc-options:
88+
-Wall
89+
-Wcompat
90+
-Wincomplete-record-updates
91+
-Wincomplete-uni-patterns
92+
-Wpartial-fields
93+
-Wredundant-constraints
94+
-Wunused-packages
95+
96+
build-depends:
97+
QuickCheck >=2.14,
98+
base >=4.18 && <5,
99+
constrained-generators,
100+
containers,
101+
mtl,
102+
prettyprinter,
103+
77104
test-suite constrained
78105
type: exitcode-stdio-1.0
79106
main-is: Tests.hs
@@ -105,12 +132,6 @@ benchmark bench
105132
default-language: Haskell2010
106133
ghc-options:
107134
-Wall
108-
-Wcompat
109-
-Wincomplete-record-updates
110-
-Wincomplete-uni-patterns
111-
-Wpartial-fields
112-
-Wredundant-constraints
113-
-Wunused-packages
114135
-rtsopts
115136

116137
build-depends:

0 commit comments

Comments
 (0)