Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (24 sloc) 508 Bytes
module Tasks.FlightBooker.FlightKind exposing
( FlightKind(..)
, fromString
, toString
)
type FlightKind
= OneWay
| Return
toString : FlightKind -> String
toString kind =
case kind of
OneWay ->
"one-way flight"
Return ->
"return flight"
fromString : String -> FlightKind
fromString kind =
case kind of
"one-way flight" ->
OneWay
"return flight" ->
Return
_ ->
OneWay