New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change type of toFloat to number -> Float #190

Closed
rehno-lindeque opened this Issue Mar 9, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@rehno-lindeque
Contributor

rehno-lindeque commented Mar 9, 2015

I'm wondering whether it might be useful to change the type of toFloat from

toFloat : Int -> Float

to

toFloat : number -> Float

so that one could write functions like

module Number.Format where

prettyPrint : number -> String
prettyPrint n = 
  let print = {- ... -}
  in print (toFloat n)

This might also be a more generic proposal to discuss than issues like https://github.com/elm-lang/core/issues/4 which might be repeated for various functions.

@rehno-lindeque

This comment has been minimized.

Show comment
Hide comment
@rehno-lindeque

rehno-lindeque Mar 9, 2015

Contributor

Having said that, it's not a big deal to just implement prettyPrint as

prettyPrint : Float -> String

for now...

Contributor

rehno-lindeque commented Mar 9, 2015

Having said that, it's not a big deal to just implement prettyPrint as

prettyPrint : Float -> String

for now...

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Sep 22, 2016

Member

Consolidated all the math related stuff into the #721 meta issue. Follow along there!

Member

evancz commented Sep 22, 2016

Consolidated all the math related stuff into the #721 meta issue. Follow along there!

@evancz evancz closed this Sep 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment