このコードがコンパイル通らないのですが、GHC拡張で何とかならないでしょうか。
-XScopedTypeVariablesではダメでした。
maxBoundInteger :: (Bounded a, Integral a) => a -> Integer
maxBoundInteger _ = fromIntegral (maxBound :: a)
Go to list of users who liked
More than 5 years have passed since last update.
このコードがコンパイル通らないのですが、GHC拡張で何とかならないでしょうか。
-XScopedTypeVariablesではダメでした。
maxBoundInteger :: (Bounded a, Integral a) => a -> Integer
maxBoundInteger _ = fromIntegral (maxBound :: a)
Register as a new user and use Qiita more conveniently
Go to list of users who liked