Parsing the arrow type with FParsec
问题 I'm trying to parse the arrow type with FParsec. That is, this: Int -> Int -> Int -> Float -> Char For example. I tried with this code, but it only works for one type of arrow ( Int -> Int ) and no more. I also want to avoid parentheses, because I already have a tuple type that uses them, and I don't want it to be too heavy in terms of syntax either. let ws = pspaces >>. many pspaces |>> (fun _ -> ()) let str_ws s = pstring s .>> ws type Type = ArrowType of Type * Type let arrowtype' = pipe2