The popularity of this mailing list seems to have declined, alternatives are: * https://www.reddit.com/r/haskell/ * https://discourse.haskell.org/ Regards, ಹೆಂಕ್-ಜಾನ್ ವ್ಯಾನ್ ಟುಯ್ಲ್ Henk-Jan van Tuyl
Op 23-03-2026 00:48 CET schreef Todd Wilson via Haskell-Cafe <haskell-cafe@haskell.org>:
I sent this two months ago but received no response. One of my students asked me this, and I didn't know how to answer, so I asked here. Did it slip in under the radar? Did I ask it in the wrong forum? Or was everyone waiting for someone else to answer? :-)
Todd Wilson Department of Computer Science California State University, Fresno
On Sat, Jan 24, 2026 at 1:22 PM Todd Wilson <twilson@csufresno.edu mailto:twilson@csufresno.edu> wrote:
Should maximum and minimum have HasCallStack constraints like head and tail do?
ghci> :type head head :: GHC.Stack.Types.HasCallStack => [a] -> a ghci> head [] *** Exception: Prelude.head: empty list CallStack (from HasCallStack): error, called at libraries/base/GHC/List.hs:1646:3 in base:GHC.List errorEmptyList, called at libraries/base/GHC/List.hs:85:11 in base:GHC.List badHead, called at libraries/base/GHC/List.hs:81:28 in base:GHC.List head, called at <interactive>:8:1 in interactive:Ghci1 ghci> :type maximum maximum :: (Foldable t, Ord a) => t a -> a ghci> maximum [] *** Exception: Prelude.maximum: empty list CallStack (from HasCallStack): error, called at libraries/base/GHC/List.hs:1646:3 in base:GHC.List errorEmptyList, called at libraries/base/GHC/List.hs:717:28 in base:GHC.List maximum, called at libraries/base/Data/Foldable.hs:745:15 in base:Data.Foldable
Todd Wilson
_______________________________________________ Haskell-Cafe mailing list -- haskell-cafe@haskell.org To (un)subscribe, modify options or view archives go to: Only members subscribed via the mailman list are allowed to post.