[GHC] #13145: Documentation shouldn't call things functions that aren't functions

#13145: Documentation shouldn't call things functions that aren't functions -------------------------------------+------------------------------------- Reporter: chris-martin | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: | Version: 8.0.1 libraries/base | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Documentation Unknown/Multiple | bug Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- For example, in the [Prelude](https://hackage.haskell.org/package/base-4.9.0.0/docs/Prelude.html) docs we have a section called "Input functions" in which only one of the four values is a function: {{{ getChar :: IO Char getLine :: IO String getContents :: IO String interact :: (String -> String) -> IO () }}} Referring to non-function values (particularly of type `IO`) as "functions" is often a sign that beginners haven't fully grasped some concepts about purity, so I think it's important to clean up our own language. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13145 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13145: Documentation shouldn't call things functions that aren't functions -------------------------------------+------------------------------------- Reporter: chris-martin | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by chris-martin: @@ -2,3 +2,3 @@ - [Prelude](https://hackage.haskell.org/package/base-4.9.0.0/docs/Prelude.html) - docs we have a section called "Input functions" in which only one of the - four values is a function: + [https://hackage.haskell.org/package/base-4.9.0.0/docs/Prelude.html + Prelude] docs we have a section called "Input functions" in which only one + of the four values is a function: New description: For example, in the [https://hackage.haskell.org/package/base-4.9.0.0/docs/Prelude.html Prelude] docs we have a section called "Input functions" in which only one of the four values is a function: {{{ getChar :: IO Char getLine :: IO String getContents :: IO String interact :: (String -> String) -> IO () }}} Referring to non-function values (particularly of type `IO`) as "functions" is often a sign that beginners haven't fully grasped some concepts about purity, so I think it's important to clean up our own language. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13145#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13145: Documentation shouldn't call things functions that aren't functions -------------------------------------+------------------------------------- Reporter: chris-martin | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by chris-martin: @@ -13,0 +13,3 @@ + In that case, I suggest we rename the sections "Input functions" and + "Output functions" to simply "Input" and "Output". + New description: For example, in the [https://hackage.haskell.org/package/base-4.9.0.0/docs/Prelude.html Prelude] docs we have a section called "Input functions" in which only one of the four values is a function: {{{ getChar :: IO Char getLine :: IO String getContents :: IO String interact :: (String -> String) -> IO () }}} In that case, I suggest we rename the sections "Input functions" and "Output functions" to simply "Input" and "Output". Referring to non-function values (particularly of type `IO`) as "functions" is often a sign that beginners haven't fully grasped some concepts about purity, so I think it's important to clean up our own language. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13145#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13145: Documentation shouldn't call things functions that aren't functions -------------------------------------+------------------------------------- Reporter: chris-martin | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by chris-martin: @@ -0,0 +1,5 @@ + Referring to non-function values (particularly of type `IO`) as + "functions" is often a sign that beginners haven't fully grasped some + concepts about purity, so I think it's important to clean up our own + language. + @@ -15,5 +20,0 @@ - - Referring to non-function values (particularly of type `IO`) as - "functions" is often a sign that beginners haven't fully grasped some - concepts about purity, so I think it's important to clean up our own - language. New description: Referring to non-function values (particularly of type `IO`) as "functions" is often a sign that beginners haven't fully grasped some concepts about purity, so I think it's important to clean up our own language. For example, in the [https://hackage.haskell.org/package/base-4.9.0.0/docs/Prelude.html Prelude] docs we have a section called "Input functions" in which only one of the four values is a function: {{{ getChar :: IO Char getLine :: IO String getContents :: IO String interact :: (String -> String) -> IO () }}} In that case, I suggest we rename the sections "Input functions" and "Output functions" to simply "Input" and "Output". -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13145#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13145: Documentation shouldn't call things functions that aren't functions -------------------------------------+------------------------------------- Reporter: chris-martin | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): That proposal sounds reasonable to me. Care to submit a patch that fixes this infelicity? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13145#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13145: Documentation shouldn't call things functions that aren't functions -------------------------------------+------------------------------------- Reporter: chris-martin | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Yuras): This terminology comes from [https://www.haskell.org/onlinereport/haskell2010/haskellch7.html#x14-1420007 Haskell Report], so IMO the proposal should go through the [https://prime.haskell.org/wiki/Committee language committee]. (Haskell is not math, so there is nothing wrong if haskell uses its own definitions) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13145#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13145: Documentation shouldn't call things functions that aren't functions -------------------------------------+------------------------------------- Reporter: chris-martin | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by chris-martin): I'm not concerned with the math so much as making sure that Haskell does actually use its own definitions. To the best of my understanding, a function in Haskell is defined as a value of the type `a -> b` for some `a` and `b`. Is that disputed? Looking at the Haskell Report a bit further, it seems like "function" is pretty inconsistently used, so I agree the fix for this problem (''if'' it is in fact a problem and not just my misunderstanding) should start there at the root. Any idea where is the best place to start that conversation? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13145#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13145: Documentation shouldn't call things functions that aren't functions -------------------------------------+------------------------------------- Reporter: chris-martin | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Yuras): You can go ahead and submit a patch because my opinion is just an opinion. Or you can drop a message to [https://mail.haskell.org/cgi- bin/mailman/listinfo/haskell-prime haskell-prime] mailing list and see what people think about that. I think your definition is a bit naive because the same (polymorphic) value will or will not be a function depending on a context: {{{ Prelude> let func = pure 5 :: Applicative m => m Int Prelude> func 5 Prelude> func 12 5 Prelude> }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13145#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC