Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Function signature #86
(Sorry if this question should be answered in elm-discuss.)
You mean you want to know the signature from elm-repl?
$ elm-repl Elm REPL 0.4.2 (Elm Platform 0.15.1) See usage examples at <https://github.com/elm-lang/elm-repl> Type :help for help, :exit to exit > identity <function> : a -> a > (<|) <function> : (a -> b) -> a -> b > (+) <function> : number -> number -> number
Just typing the name of function works.
referenced this issue
Apr 26, 2016
It says here:
Okay, it doesn't say you can write type annotations in the repl, but it is still a bit misleading. I, for one, thought I would use the repl for the entire code on that page (or would expect different instructions on how to run code from a file, or a link to those instructions).
Edit: Just found this faq entry.
It seems like the error message is almost there (it detects that you're doing a type annotation) but it doesn't tell you why it's an error (You're attempting to do type annotations in the REPL, which are unsupported).
I'm just learning the language as well, and it seems like type annotations should be something that can be played with in the REPL. Even Try Elm has some support for them (but alas, it's not as nice as the REPL for on-the-go toy code).
Is there a plan to support type annotations in the repl? I got here from #113. I was searching for the error described there after trying to send some code from an emacs buffer to the repl via elm-mode by selecting it and typing
If you are still searching for type annotations in REPL, now there's an alternative for you: https://github.com/shamansir/ielm supports getting types and values for any kind of expression (except just a few, where it falls back to string representation, which is also not so bad).
The complete video with all the current features is here: https://vimeo.com/242822314
P.S. It is usable, but still in early development, so please don't expect anything to work, but as long as there is an issue exists for a found bug, it will very soon be fixed.