@@ -35,6 +35,10 @@ inc tipe x =
3535 case tipe of
3636 Lambda _ _ -> error "functions should not be allowed through input ports"
3737 Var _ -> error "type variables should not be allowed through input ports"
38+
39+ Data "Json.Value" [] ->
40+ obj "Native.Json.fromJS" <| x
41+
3842 Data ctor []
3943 | ctor == "Int" -> from JSNumber
4044 | ctor == "Float" -> from JSNumber
@@ -100,8 +104,9 @@ out tipe x =
100104
101105 Var _ -> error "type variables should not be allowed through input ports"
102106 Data ctor []
103− | ctor `elem` ["Int","Float","Bool","String"] ->
104− x
107+ | ctor `elem` ["Int","Float","Bool","String"] -> x
108+ | ctor == "Json.Value" ->
109+ obj "Native.Json.toJS" <| x
105110
106111 Data ctor [t]
107112 | ctor == "Maybe.Maybe" ->