@@ -26,23 +26,23 @@ type Foo<'T> = Option<'T>
2626type Foo<'a> = Option<'a>
2727 """
2828 Assert.IsTrue( this.ErrorsExist)
29- Assert.IsTrue( this.ErrorExistsAt ( 2 , 9 ) )
29+ Assert.IsTrue( this.ErrorExistsOnLine 2 )
3030
3131 [<Test>]
3232 member this. ``generic type names shouldn't be camelCase ( 2 generic types ) ``() =
3333 this.Parse """
3434type Foo<'a, 'T> = Option<'a * 'T>
3535"""
3636 Assert.IsTrue( this.ErrorsExist)
37- Assert.IsTrue( this.ErrorExistsAt ( 2 , 9 ) )
37+ Assert.IsTrue( this.ErrorExistsOnLine 2 )
3838
3939 [<Test>]
4040 member this. ``generic type names shouldn't be camelCase ( 2 generic types with different order ) ``() =
4141 this.Parse """
4242type Foo<'T, 'a> = Option<'T * 'a>
4343"""
4444 Assert.IsTrue( this.ErrorsExist)
45- Assert.IsTrue( this.ErrorExistsAt ( 2 , 13 ) )
45+ Assert.IsTrue( this.ErrorExistsOnLine 2 )
4646
4747 [<Test>]
4848 member this. ``generic type names are PascalCase`` () =
@@ -57,3 +57,37 @@ type Foo<'K, 'V> = Option<'K * 'V>
5757type Foo<'T1, 'T2, 'T3, 'T4, 'T5, 'a, 'T6> = Option<'T1 * 'T2 * 'T3 * 'T4 * 'T5 * 'a * 'T6>
5858"""
5959 Assert.IsTrue( this.ErrorsExist)
60+ Assert.IsTrue( this.ErrorExistsOnLine 2 )
61+
62+ [<Test>]
63+ member this. ``generic type names shouldn't be camelCase even for types in methods`` () =
64+ this.Parse """
65+ module PeerChannelEncryptorMonad =
66+ type PeerChannelEncryptorComputation<'T> =
67+ | PeerChannelEncryptorComputation of
68+ (PeerChannelEncryptor -> Result<'T * PeerChannelEncryptor, PeerError>)
69+
70+ let runP pcec initialState =
71+ let (PeerChannelEncryptorComputation innerFn) = pcec
72+ innerFn initialState
73+
74+ let returnP x =
75+ let innerFn state =
76+ Ok(x, state)
77+
78+ PeerChannelEncryptorComputation innerFn
79+
80+ let bindP
81+ (f: 'a -> PeerChannelEncryptorComputation<'b>)
82+ (xT: PeerChannelEncryptorComputation<'a>)
83+ : PeerChannelEncryptorComputation<'b> =
84+ let innerFn state =
85+ runP xT state
86+ >>= fun (res, state2) ->
87+ let h = runP (f res) state2
88+ h
89+
90+ PeerChannelEncryptorComputation innerFn
91+ """
92+ Assert.IsTrue( this.ErrorsExist)
93+ Assert.IsTrue( this.ErrorExistsOnLine 18 )
0 commit comments