Skip to content

Decompiler Feature Request: re-sugar list and array range expressions #30

@GoogleCodeExporter

Description

@GoogleCodeExporter
e.g., all of the following should be re-sugared:

> <@ [1..5] @> |> unquote;;

Seq.toList (seq {1..5})
Seq.toList (seq seq [1; 2; 3; 4; ...])
Seq.toList seq [1; 2; 3; 4; ...]
[1; 2; 3; 4; 5]

val it : unit = ()
> <@ [1..5..10] @> |> unquote;;

Seq.toList (seq {1..5..10})
Seq.toList (seq seq [1; 6])
Seq.toList seq [1; 6]
[1; 6]

val it : unit = ()
> <@ [|1..10|] @> |> unquote;;

Seq.toArray (seq {1..10})
Seq.toArray (seq seq [1; 2; 3; 4; ...])
Seq.toArray seq [1; 2; 3; 4; ...]
[|1; 2; 3; 4; 5; 6; 7; 8; 9; 10|]

val it : unit = ()
> <@ [|1..5..10|] @> |> unquote;;

Seq.toArray (seq {1..5..10})
Seq.toArray (seq seq [1; 6])
Seq.toArray seq [1; 6]
[|1; 6|]

val it : unit = ()

Original issue reported on code.google.com by stephen....@gmail.com on 1 Apr 2011 at 3:58

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions