( (let config (DataSource 'config)) (let res_sink (DataSink 'result)) # Null -> Uint16 (let cast (SafeCast (Null) (DataType 'Uint16))) (let world (Write! world res_sink (Key) cast '('('type)))) # Null -> Uint16? (let cast (SafeCast (Null) (OptionalType (DataType 'Uint16)))) (let world (Write! world res_sink (Key) cast '('('type)))) # Just(Null) -> Null (let cast (SafeCast (Just (Null)) (NullType))) (let world (Write! world res_sink (Key) cast '('('type)))) # Nothing(Null?) -> Null (let cast (SafeCast (Nothing (OptionalType (NullType))) (NullType))) (let world (Write! world res_sink (Key) cast '('('type)))) # Uint16 -> Null (let cast (SafeCast (Uint16 '0) (NullType))) (let world (Write! world res_sink (Key) cast '('('type)))) # Nothing(Uint16?) -> Null (let cast (SafeCast (Nothing (OptionalType (DataType 'Uint16))) (NullType))) (let world (Write! world res_sink (Key) cast '('('type)))) # Null -> Null? (let cast (SafeCast (Null) (OptionalType (NullType)))) (let world (Write! world res_sink (Key) cast '('('type)))) (let world (Commit! world res_sink)) (return world) )