Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find type of a function in Elm repl

In Haskell you can use :t to find type of a function in ghci, is there an equivalent in elm repl?

like image 286
opensourcegeek Avatar asked Nov 20 '15 13:11

opensourcegeek


1 Answers

I can't try this out because I currently don't have a working elm-repl but off the top of my head, you can just type the function name in the repl and it will answer with the type of the function. This is because the Elm repl will always print the type after a resulting value, so if you input a function name, it will print <function> for the value, followed by the type:

> not

<function> : Bool -> Bool

> 
like image 76
Apanatshka Avatar answered Jan 16 '23 20:01

Apanatshka