This repository has been archived by the owner on Jun 23, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1634dd5
commit 0a1e61d
Showing
6 changed files
with
38 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Test structural typing | ||
// see https://github.com/nstack/nstack-server/issues/571 | ||
module Demo.Struct:0.0.1-SNAPSHOT | ||
|
||
type V1 = A Integer | ||
| B { b1 : Integer, b2 : Text, b3 : Boolean } | ||
type V2 = B { b3 : Boolean, b2 : Text, b1 : Integer } | ||
| A Integer | ||
|
||
fun test0 : V1 -> Integer | ||
|
||
def test1 = Conv.from_json<V2> | test0 |
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,15 @@ | ||
# The language stack to use | ||
stack: Python | ||
|
||
# Parent Image | ||
parent: nstack/NStack.Python:0.25.0 | ||
|
||
# (Optional) System-level packages needed | ||
packages: [] | ||
|
||
# (Optional) Commands to run when building the service (Bash-compatible) | ||
commands: [] | ||
|
||
# (Optional) Files/Dir to copy across into the service (can use regex/glob syntax) | ||
files: [] | ||
|
Empty file.
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,10 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Demo.Struct:0.0.1-SNAPSHOT Service | ||
""" | ||
import nstack | ||
|
||
class Service(nstack.BaseService): | ||
def numChars(self, x): | ||
return 0 | ||
|
Empty file.
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