You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code is too long to use the online tool, sorry.
Input:
[<NoEquality ; NoComparison>]
type Foo<'context, 'a> =
| Apply of ApplyCrate<'context, 'a>
and [<CustomEquality ; NoComparison>] Bar<'context, 'a> =
internal {
Hash : int
Foo : Foo<'a, 'b>
}
member this.InnerEquals<'innerContextLongLongLong, 'd, 'e> (a : Foo<'innerContextLongLongLong, 'd>) (b : Foo<'innerContext, 'd>) (cont : bool -> 'e) : 'e =
if a.Hash <> b.Hash then cont false
else
match a.Foo, b.Foo with
| Foo.Apply a, Foo.Apply b ->
a.Apply { new ApplyEval<_, _, _> with
member __.Eval<'bb> (a : Foo<'innerContextLongLongLong, 'bb -> 'b> * Foo<'innerContextLongLongLong, 'bb>) =
let (af, av) = a
b.Apply { new ApplyEval<_, _, _> with
member __.Eval<'cb> (b : Foo<'innerContextLongLongLong, 'cb -> 'b> * Foo<'innerContextLongLongLong, 'bc>) =
let (bf, bv) = b
if typeof<'bb> = typeof<'cb> then
let bv = unbox<Foo<'innerContextLongLongLong, 'bb>> bv
this.InnerEquals av bv (fun inner ->
if inner then
let bv = unbox<Foo<'innerContextLongLongLong, 'bb -> 'b>> bf
this.InnerEquals af bf cont
else cont false
)
else cont false
}
}
Output:
[<NoEquality ; NoComparison>]
type Foo<'context, 'a> = Apply of ApplyCrate<'context, 'a>
and [<CustomEquality ; NoComparison>] Bar<'context, 'a> =
internal
{
Hash : int
Foo : Foo<'a, 'b>
}
member this.InnerEquals<'innerContextLongLongLong, 'd, 'e>
(a : Foo<'innerContextLongLongLong, 'd>)
(b : Foo<'innerContext, 'd>)
(cont : bool -> 'e)
: 'e
=
if a.Hash <> b.Hash then
cont false
else
match a.Foo, b.Foo with
| Foo.Apply a, Foo.Apply b ->
a.Apply
{ new ApplyEval<_, _, _> with
member __.Eval<'bb>
(a : Foo<'innerContextLongLongLong, 'bb -> 'b> * Foo<'innerContextLongLongLong, 'bb>)
=
let (af, av) = a
b.Apply
{ new ApplyEval<_, _, _> with
member __.Eval<'cb>
(b : Foo<'innerContextLongLongLong, 'cb -> 'b> * Foo<'innerContextLongLongLong, 'bc>)
=
let (bf, bv) = b
if typeof<'bb> = typeof<'cb> then
let bv =
unbox<Foo<'innerContextLongLongLong, 'bb>> bv
this.InnerEquals
av
bv
(fun inner ->
if inner then
let bv =
unbox<Foo<'innerContextLongLongLong, 'bb ->
'b>>
bf
this.InnerEquals af bf cont
else
cont false
)
else
cont false
}
}
The formatted code has two parse errors, I believe due to the unbox call being split over two lines at a bad place:
(46,67) (46, 66)Error10parse
Incomplete structured construct at or before this point in type arguments. Expected ',' or other token.
(46,67) (46, 66)Error1241parse
Expected type argument or static argument
The code is too long to use the online tool, sorry.
Input:
Output:
The formatted code has two parse errors, I believe due to the
unbox
call being split over two lines at a bad place:Settings:
I think this is a recent issue; I don't remember this file formatting incorrectly in the past.
Version: Master at 04/11/2021 18:54:45 - f992dd7
The text was updated successfully, but these errors were encountered: