Files
RosettaHaskellCompiler/resources/Rosetta/test-all.rosetta
Macocian Adrian Radu f18066e5da Fixed subtyping
2022-03-25 01:42:56 +01:00

48 lines
1.4 KiB
Plaintext

namespace test.all : <"Something">
version "${version.ok}"
import test.period.*
type TestType:
testType int (1..1)
type TestSomeType: <"description">
testSomeType int (1..1) <"A time period multiplier, e.g. 1, 2 or 3 etc. A negative value can be used when specifying an offset relative to another date, e.g. -2 days.">
type TestZeroOneType extends Period:
testZeroOneType int (1..1)
type ObservationPrimitive:
observationPrimitive int (1..1)
condition important: <"This is an important condition">
observationPrimitive < 0
func EquityPriceObservation: <"Function specification for the observation of an equity price, based on the attributes of the 'EquityValuation' class.">
inputs:
equity int (1..1)
valuationDate ObservationPrimitive (0..1)
valuationTime int (0..1)
timeType TestType (0..1)
output:
observation ObservationPrimitive (0..1)
assign-output: if True and False then valuationDate
func Something: <"asd">
inputs:
equity1 boolean (1..1)
valuationTime ObservationPrimitive (1..1)
output:
valuation ObservationPrimitive (0..*)
assign-output: if True and False then valuationTime
func SomethingElse: <"dsa">
inputs:
num1 int (1..1)
num2 int (0..1)
valuationTime ObservationPrimitive (1..1)
output:
valuation ObservationPrimitive (0..1)
assign-output: if True and False then valuationTime