StrictCastOverOptional.yqls 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. (
  2. (let config (DataSource 'config))
  3. (let res_sink (DataSink 'result))
  4. # Int32? -> Uint16
  5. (let targetType (OptionalType (DataType 'Uint16)))
  6. (let cast (StrictCast (Just (Int32 '1)) targetType))
  7. (let world (Write! world res_sink (Key) cast '('('type))))
  8. (let cast (StrictCast (Just (Int32 '1000000)) targetType))
  9. (let world (Write! world res_sink (Key) cast '('('type))))
  10. (let cast (StrictCast (Nothing (OptionalType (DataType 'Int32))) targetType))
  11. (let world (Write! world res_sink (Key) cast '('('type))))
  12. # Int32? -> Uint16?
  13. (let targetType (OptionalType (DataType 'Uint16)))
  14. (let cast (StrictCast (Just (Int32 '1)) targetType))
  15. (let world (Write! world res_sink (Key) cast '('('type))))
  16. (let cast (StrictCast (Just (Int32 '1000000)) targetType))
  17. (let world (Write! world res_sink (Key) cast '('('type))))
  18. (let cast (StrictCast (Nothing (OptionalType (DataType 'Int32))) targetType))
  19. (let world (Write! world res_sink (Key) cast '('('type))))
  20. # Int32? -> Uint16???
  21. (let targetType (OptionalType (OptionalType (OptionalType (DataType 'Uint16)))))
  22. (let cast (StrictCast (Just (Int32 '1)) targetType))
  23. (let world (Write! world res_sink (Key) cast '('('type))))
  24. (let cast (StrictCast (Just (Int32 '1000000)) targetType))
  25. (let world (Write! world res_sink (Key) cast '('('type))))
  26. (let cast (StrictCast (Nothing (OptionalType (DataType 'Int32))) targetType))
  27. (let world (Write! world res_sink (Key) cast '('('type))))
  28. # Int32??? -> Uint16?
  29. (let targetType (OptionalType (DataType 'Uint16)))
  30. (let cast (StrictCast (Just (Just (Just (Int32 '1)))) targetType))
  31. (let world (Write! world res_sink (Key) cast '('('type))))
  32. (let cast (StrictCast (Just (Just (Just (Int32 '1000000)))) targetType))
  33. (let world (Write! world res_sink (Key) cast '('('type))))
  34. (let cast (StrictCast (Nothing (OptionalType (OptionalType (OptionalType (DataType 'Int32))))) targetType))
  35. (let world (Write! world res_sink (Key) cast '('('type))))
  36. (let cast (StrictCast (Just (Nothing (OptionalType (OptionalType (DataType 'Int32))))) targetType))
  37. (let world (Write! world res_sink (Key) cast '('('type))))
  38. (let cast (StrictCast (Just (Just (Nothing (OptionalType (DataType 'Int32))))) targetType))
  39. (let world (Write! world res_sink (Key) cast '('('type))))
  40. # Int32??? -> Uint16??
  41. (let targetType (OptionalType (OptionalType (DataType 'Uint16))))
  42. (let cast (StrictCast (Just (Just (Just (Int32 '1)))) targetType))
  43. (let world (Write! world res_sink (Key) cast '('('type))))
  44. (let cast (StrictCast (Just (Just (Just (Int32 '1000000)))) targetType))
  45. (let world (Write! world res_sink (Key) cast '('('type))))
  46. (let cast (StrictCast (Nothing (OptionalType (OptionalType (OptionalType (DataType 'Int32))))) targetType))
  47. (let world (Write! world res_sink (Key) cast '('('type))))
  48. (let cast (StrictCast (Just (Nothing (OptionalType (OptionalType (DataType 'Int32))))) targetType))
  49. (let world (Write! world res_sink (Key) cast '('('type))))
  50. (let cast (StrictCast (Just (Just (Nothing (OptionalType (DataType 'Int32))))) targetType))
  51. (let world (Write! world res_sink (Key) cast '('('type))))
  52. # Int32??? -> Uint16????
  53. (let targetType (OptionalType (OptionalType (OptionalType (OptionalType (DataType 'Uint16))))))
  54. (let cast (StrictCast (Just (Just (Just (Int32 '1)))) targetType))
  55. (let world (Write! world res_sink (Key) cast '('('type))))
  56. (let cast (StrictCast (Just (Just (Just (Int32 '1000000)))) targetType))
  57. (let world (Write! world res_sink (Key) cast '('('type))))
  58. (let cast (StrictCast (Nothing (OptionalType (OptionalType (OptionalType (DataType 'Int32))))) targetType))
  59. (let world (Write! world res_sink (Key) cast '('('type))))
  60. (let cast (StrictCast (Just (Nothing (OptionalType (OptionalType (DataType 'Int32))))) targetType))
  61. (let world (Write! world res_sink (Key) cast '('('type))))
  62. (let cast (StrictCast (Just (Just (Nothing (OptionalType (DataType 'Int32))))) targetType))
  63. (let world (Write! world res_sink (Key) cast '('('type))))
  64. (let world (Commit! world res_sink))
  65. (return world)
  66. )