
16 Jan
2019
16 Jan
'19
9:52 a.m.
Could someone help me make sense of this Num constraint given by GHCi? I was expecting to get: inc . const :: Num a => a -> b -> a rather than: inc . const :: Num (b -> a) => a -> b -> a Here's the transcript: GHCi, version 8.6.3: http://www.haskell.org/ghc/ :? for help Prelude> inc x = x + 1 Prelude> :t inc inc :: Num a => a -> a Prelude> :t const const :: a -> b -> a Prelude> :t inc . const inc . const :: Num (b -> a) => a -> b -> a Prelude> Thanks, Dimitri -- 2E45 D376 A744 C671 5100 A261 210B 8461 0FB0 CA1F