
6 Jan
2014
6 Jan
'14
12:21 p.m.
On Mon, 2014-01-06 at 09:15 -0800, Nathan Howell wrote:
This requires -XScopedTypeVariables and some constraints:
tOf :: forall a . (SingI (T a), C a) => a -> Integer tOf _ = fromSing $ (sing :: Sing (T a))
Wonderful, thanks. I tried using ScopedTypeVariables, but "SingI Nat (T a)" didn't work out, although the compiler error hinted in that direction. Thanks, Nicolas