@@ -1351,6 +1351,14 @@ toAType (FCon i)
13511351 | i == sUN "JS_IntNative" = ATInt ITNative
13521352toAType t = error (show t ++ " not defined in toAType")
13531353
1354+toFnType (FApp c [_,_,s,t])
1355+ | c == sUN "JS_Fn" = toFnType t
1356+toFnType (FApp c [_,_,r])
1357+ | c == sUN "JS_FnIO" = FFunctionIO
1358+toFnType (FApp c [_,r])
1359+ | c == sUN "JS_FnBase" = FFunction
1360+toFnType t = error (show t ++ " not defined in toFnType")
1361+
13541362toFType (FCon c)
13551363 | c == sUN "JS_Str" = FString
13561364 | c == sUN "JS_Float" = FArith ATFloat
@@ -1358,5 +1366,7 @@ toFType (FCon c)
13581366 | c == sUN "JS_Unit" = FUnit
13591367toFType (FApp c [_,ity])
13601368 | c == sUN "JS_IntT" = FArith (toAType ity)
1369+toFType (FApp c [_,fty])
1370+ | c == sUN "JS_FnT" = toFnType fty
13611371toFType t = error (show t ++ " not yet defined in toFType")
13621372