Skip to content

Commit d09182f

Browse files
committed
Add CustomInstances.hs and don't git clean every time
1 parent 8ee0cbf commit d09182f

File tree

13 files changed

+181
-3
lines changed

13 files changed

+181
-3
lines changed

flake.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
3838
# Copy handwritten files
3939
cp ${./handwritten/CustomTypes.hs} "$out/lib/Kubernetes/OpenAPI/CustomTypes.hs"
40+
cp ${./handwritten/CustomInstances.hs} "$out/tests/CustomInstances.hs"
4041
4142
# Fill in the package version
4243
${pkgs.gnused}/bin/sed -i "s/^version:\s*\(.*\)/version: $PACKAGE_VERSION/" "$out/kubernetes-api.cabal"
@@ -55,9 +56,6 @@
5556
packages:
5657
- zlib
5758
EOM
58-
59-
# Remove unnecessary files
60-
git clean -fdx "$out"
6159
'';
6260

6361
set-stack-version = pkgs.writeShellScriptBin "build-kubernetes-api-client.sh" ''

handwritten/CustomInstances.hs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module CustomInstances where
2+
3+
import Kubernetes.OpenAPI.Model
4+
5+
import Test.QuickCheck
6+
import Data.Text (pack)
7+
8+
instance Arbitrary IntOrString where
9+
arbitrary =
10+
oneof [ IntOrStringI <$> arbitrary
11+
, IntOrStringS <$> (pack <$> arbitrary)
12+
]
13+
14+
instance Arbitrary Quantity where
15+
arbitrary = Quantity <$> (pack <$> arbitrary)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module CustomInstances where
2+
3+
import Kubernetes.OpenAPI.Model
4+
5+
import Test.QuickCheck
6+
import Data.Text (pack)
7+
8+
instance Arbitrary IntOrString where
9+
arbitrary =
10+
oneof [ IntOrStringI <$> arbitrary
11+
, IntOrStringS <$> (pack <$> arbitrary)
12+
]
13+
14+
instance Arbitrary Quantity where
15+
arbitrary = Quantity <$> (pack <$> arbitrary)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module CustomInstances where
2+
3+
import Kubernetes.OpenAPI.Model
4+
5+
import Test.QuickCheck
6+
import Data.Text (pack)
7+
8+
instance Arbitrary IntOrString where
9+
arbitrary =
10+
oneof [ IntOrStringI <$> arbitrary
11+
, IntOrStringS <$> (pack <$> arbitrary)
12+
]
13+
14+
instance Arbitrary Quantity where
15+
arbitrary = Quantity <$> (pack <$> arbitrary)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module CustomInstances where
2+
3+
import Kubernetes.OpenAPI.Model
4+
5+
import Test.QuickCheck
6+
import Data.Text (pack)
7+
8+
instance Arbitrary IntOrString where
9+
arbitrary =
10+
oneof [ IntOrStringI <$> arbitrary
11+
, IntOrStringS <$> (pack <$> arbitrary)
12+
]
13+
14+
instance Arbitrary Quantity where
15+
arbitrary = Quantity <$> (pack <$> arbitrary)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module CustomInstances where
2+
3+
import Kubernetes.OpenAPI.Model
4+
5+
import Test.QuickCheck
6+
import Data.Text (pack)
7+
8+
instance Arbitrary IntOrString where
9+
arbitrary =
10+
oneof [ IntOrStringI <$> arbitrary
11+
, IntOrStringS <$> (pack <$> arbitrary)
12+
]
13+
14+
instance Arbitrary Quantity where
15+
arbitrary = Quantity <$> (pack <$> arbitrary)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module CustomInstances where
2+
3+
import Kubernetes.OpenAPI.Model
4+
5+
import Test.QuickCheck
6+
import Data.Text (pack)
7+
8+
instance Arbitrary IntOrString where
9+
arbitrary =
10+
oneof [ IntOrStringI <$> arbitrary
11+
, IntOrStringS <$> (pack <$> arbitrary)
12+
]
13+
14+
instance Arbitrary Quantity where
15+
arbitrary = Quantity <$> (pack <$> arbitrary)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module CustomInstances where
2+
3+
import Kubernetes.OpenAPI.Model
4+
5+
import Test.QuickCheck
6+
import Data.Text (pack)
7+
8+
instance Arbitrary IntOrString where
9+
arbitrary =
10+
oneof [ IntOrStringI <$> arbitrary
11+
, IntOrStringS <$> (pack <$> arbitrary)
12+
]
13+
14+
instance Arbitrary Quantity where
15+
arbitrary = Quantity <$> (pack <$> arbitrary)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module CustomInstances where
2+
3+
import Kubernetes.OpenAPI.Model
4+
5+
import Test.QuickCheck
6+
import Data.Text (pack)
7+
8+
instance Arbitrary IntOrString where
9+
arbitrary =
10+
oneof [ IntOrStringI <$> arbitrary
11+
, IntOrStringS <$> (pack <$> arbitrary)
12+
]
13+
14+
instance Arbitrary Quantity where
15+
arbitrary = Quantity <$> (pack <$> arbitrary)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module CustomInstances where
2+
3+
import Kubernetes.OpenAPI.Model
4+
5+
import Test.QuickCheck
6+
import Data.Text (pack)
7+
8+
instance Arbitrary IntOrString where
9+
arbitrary =
10+
oneof [ IntOrStringI <$> arbitrary
11+
, IntOrStringS <$> (pack <$> arbitrary)
12+
]
13+
14+
instance Arbitrary Quantity where
15+
arbitrary = Quantity <$> (pack <$> arbitrary)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module CustomInstances where
2+
3+
import Kubernetes.OpenAPI.Model
4+
5+
import Test.QuickCheck
6+
import Data.Text (pack)
7+
8+
instance Arbitrary IntOrString where
9+
arbitrary =
10+
oneof [ IntOrStringI <$> arbitrary
11+
, IntOrStringS <$> (pack <$> arbitrary)
12+
]
13+
14+
instance Arbitrary Quantity where
15+
arbitrary = Quantity <$> (pack <$> arbitrary)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module CustomInstances where
2+
3+
import Kubernetes.OpenAPI.Model
4+
5+
import Test.QuickCheck
6+
import Data.Text (pack)
7+
8+
instance Arbitrary IntOrString where
9+
arbitrary =
10+
oneof [ IntOrStringI <$> arbitrary
11+
, IntOrStringS <$> (pack <$> arbitrary)
12+
]
13+
14+
instance Arbitrary Quantity where
15+
arbitrary = Quantity <$> (pack <$> arbitrary)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module CustomInstances where
2+
3+
import Kubernetes.OpenAPI.Model
4+
5+
import Test.QuickCheck
6+
import Data.Text (pack)
7+
8+
instance Arbitrary IntOrString where
9+
arbitrary =
10+
oneof [ IntOrStringI <$> arbitrary
11+
, IntOrStringS <$> (pack <$> arbitrary)
12+
]
13+
14+
instance Arbitrary Quantity where
15+
arbitrary = Quantity <$> (pack <$> arbitrary)

0 commit comments

Comments
 (0)