mirror of
https://github.com/macocianradu/RosettaHaskellCompiler.git
synced 2026-03-18 21:10:07 +00:00
added enum pretty printing tests
This commit is contained in:
13
resources/Enums/haskellEnum1.hs
Normal file
13
resources/Enums/haskellEnum1.hs
Normal file
@@ -0,0 +1,13 @@
|
||||
{-The enumerated values to specified the period, e.g. day, week.-}
|
||||
data PeriodEnum =
|
||||
{-Day-}
|
||||
D
|
||||
{-Month-}
|
||||
| M
|
||||
{-Year-}
|
||||
| Y
|
||||
|
||||
instance Show PeriodEnum where
|
||||
show D = "day"
|
||||
show M = "month"
|
||||
show Y = "year"
|
||||
13
resources/Enums/haskellEnum2.hs
Normal file
13
resources/Enums/haskellEnum2.hs
Normal file
@@ -0,0 +1,13 @@
|
||||
{-The enumerated values to specified the period, e.g. day, week.-}
|
||||
data EnumWithoutDisplay =
|
||||
{-Day-}
|
||||
D
|
||||
{-Month-}
|
||||
| M
|
||||
{-Year-}
|
||||
| Y
|
||||
|
||||
instance Show EnumWithoutDisplay where
|
||||
show D = "D"
|
||||
show M = "M"
|
||||
show Y = "Y"
|
||||
7
resources/Enums/haskellEnum3.hs
Normal file
7
resources/Enums/haskellEnum3.hs
Normal file
@@ -0,0 +1,7 @@
|
||||
data EnumWithoutDescription =
|
||||
X
|
||||
| Y
|
||||
|
||||
instance Show EnumWithoutDescription where
|
||||
show X = "xs"
|
||||
show Y = "ys"
|
||||
@@ -35,9 +35,9 @@ func EquityPriceObservation: <"Function specification for the observation of an
|
||||
|
||||
func Something: <"asd">
|
||||
inputs:
|
||||
equity1 boolean (1..1)
|
||||
determinationMethod ObservationPrimitive (1..1)
|
||||
equity1 boolean (1..1)
|
||||
valuationTime ObservationPrimitive (1..1)
|
||||
output:
|
||||
valuation ObservationPrimitive (0..1)
|
||||
valuation ObservationPrimitive (0..*)
|
||||
|
||||
assign-output: if True and False then determinationMethod
|
||||
assign-output: if True and False then valuationTime
|
||||
@@ -1,11 +1,44 @@
|
||||
func EquityPriceObservation: <"Function specification for the observation of an equity price, based on the attributes of the 'EquityValuation' class.">
|
||||
inputs:
|
||||
equity Equity (1..1)
|
||||
valuationDate AdjustableOrRelativeDate (1..1)
|
||||
valuationTime BusinessCenterTime (0..1)
|
||||
timeType TimeTypeEnum (0..1)
|
||||
determinationMethod DeterminationMethodEnum (1..*)
|
||||
equity int (1..1)
|
||||
determinationMethod ObservationPrimitive (1..1)
|
||||
output:
|
||||
observation ObservationPrimitive (1..1)
|
||||
observation ObservationPrimitive (0..1)
|
||||
|
||||
assign-output: if asd exists then var2
|
||||
assign-output: if True and False then valuationDate
|
||||
|
||||
func EquityPriceObservation: <"Function specification for the observation of an equity price, based on the attributes of the 'EquityValuation' class.">
|
||||
inputs:
|
||||
equity int (1..1)
|
||||
determinationMethod ObservationPrimitive (1..1)
|
||||
output:
|
||||
observation ObservationPrimitive (0..*)
|
||||
|
||||
assign-output: if True and False then valuationDate
|
||||
|
||||
func EquityPriceObservation: <"Function specification for the observation of an equity price, based on the attributes of the 'EquityValuation' class.">
|
||||
inputs:
|
||||
equity int (1..1)
|
||||
determinationMethod ObservationPrimitive (1..1)
|
||||
output:
|
||||
observation ObservationPrimitive (1..1)
|
||||
|
||||
assign-output: if True and False then valuationDate
|
||||
|
||||
func EquityPriceObservation: <"Function specification for the observation of an equity price, based on the attributes of the 'EquityValuation' class.">
|
||||
inputs:
|
||||
equity int (1..1)
|
||||
determinationMethod ObservationPrimitive (1..1)
|
||||
output:
|
||||
observation ObservationPrimitive (1..*)
|
||||
|
||||
assign-output: if True and False then valuationDate
|
||||
|
||||
func EquityPriceObservation: <"Function specification for the observation of an equity price, based on the attributes of the 'EquityValuation' class.">
|
||||
inputs:
|
||||
equity int (1..1)
|
||||
determinationMethod ObservationPrimitive (1..1)
|
||||
output:
|
||||
observation ObservationPrimitive (*..*)
|
||||
|
||||
assign-output: if True and False then valuationDate
|
||||
Reference in New Issue
Block a user