-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from ccap/testing
Fix import deduplication Reviewed-by: jasonw
- Loading branch information
Showing
6 changed files
with
86 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// A self-contained example that we can compile without additional | ||
// dependencies. | ||
module SelfContained { | ||
type CountyNo: Int | ||
type CountyName: String <validations maxLength="32"> | ||
type OtherCountyName: wrap String <validations maxLength="32"> | ||
type AssessFacilityId: wrap Int | ||
type SomethingMoney: wrap Decimal | ||
|
||
// We can wrap a type in a pre-existing newtype | ||
type Bunnies: wrap Int | ||
<purs | ||
t="Test.Support.Newint" | ||
decode="Ccap.Codegen.Runtime.decodeNewtype" | ||
encode="Data.Newtype.unwrap"> | ||
|
||
type County: { | ||
countyNo: CountyNo | ||
countyName: CountyName | ||
assessFacilityId: Maybe AssessFacilityId | ||
soapPort: Int | ||
} | ||
|
||
type Big: { | ||
a1: Int | ||
b1: String | ||
c1: Decimal | ||
d1: Boolean | ||
a2: Int | ||
b2: String | ||
c2: Decimal | ||
d2: Boolean | ||
a3: Int | ||
b3: String | ||
c3: Decimal | ||
d3: Boolean | ||
a4: Int | ||
b4: String | ||
c4: Decimal | ||
d4: Boolean | ||
} | ||
|
||
type Response: { | ||
counties: Array County | ||
} | ||
|
||
type CountyEnum: [ | ||
| Adams | ||
| Ashland | ||
| Baron | ||
| Etc | ||
] | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module Test.Support where | ||
|
||
import Data.Newtype | ||
|
||
newtype Newint = Newint Int | ||
|
||
derive instance newtypeNewint :: Newtype Newint _ |