RE: RFC: Add HasCallStack constraint to partial Data.List functions.
Simon Peyton Jones via Libraries <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.libraries |
|---|---|
| Message-ID | <AM5PR83MB035334561D7DE8D3678CCFD9AD369@AM5PR83MB0353.EURPRD83.prod.outlook.com> |
| HasCallStack is an operational annotation that has no place in declarative | type signatures I'm not sure I really agree with that. There is a rich literature on effect systems, which decorate types with information about what effects the function has: exceptions, divergence, IO, and the like. So type like head :: Partial => [a] -> a where 'Partial =>' expresses the fact that calling this function might lead to a call of 'error' doesn't seem inherently something that doesn't belong in a type system. Indeed if `error :: Partial => String -> a`, then we can guarantee that any function that calls error will need a Partial constraint... it propagates upward as it should. TL;DR none of this seems (to me) inappropriate for a declarative type system. Simon _______________________________________________ Libraries mailing list [email protected] http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries