Get information about a functional application of an application

In GHCI

you can get information about all kinds of things like

Prelude> :i map
map :: (a -> b) -> [a] -> [b]   -- Defined in `GHC.Base'
Prelude> :i (+)
class Num a where
  (+) :: a -> a -> a
  ...
        -- Defined in `GHC.Num'
infixl 6 +
Prelude> :i :
data [] a = ... | a : [a]       -- Defined in `GHC.Types'
infixr 5 :

      

I read something like "functional application has the highest priority" which means

f "hello" * g 'w'

      

equivalent to

(f "hello") * (g 'w')

      

Can I get information about a function app? Is this the actual operator?

Does not work

Prelude> :i ( )

<interactive>:1:2: error:
    parse error (possibly incorrect indentation or mismatched brackets)
Prelude>

      

+3


source to share





All Articles