
9 Sep
2010
9 Sep
'10
10:35 a.m.
On Thu, Sep 9, 2010 at 11:32 AM, Henry Olders
Is there a way to specify the type for a function inside GHCi, that is, without creating a separate file and loading it in?
Sure! Prelude> let f x = x + 2 Prelude> :t f f :: (Num a) => a -> a Prelude> let g :: Int -> Int; g x = x + 2 Prelude> :t g g :: Int -> Int Cheers! =D -- Felipe.