3 ms·
This code relies on GHC and GHC specific extensions. The mentioned pragmas are not defined by the 2010 standard. The lastest GHC release is from August 8th of
by momentoftop 6y ago
This code relies on GHC and GHC specific extensions. The mentioned pragmas are not defined by the 2010 standard.
The lastest GHC release is from August 8th of this year.
- saithound 6y ago> The mentioned pragmas are not defined by the 2010 standard. That's exactly the point. GHC supports the most recent Haskell version it supports, and implements some extensions to the standard language, which can all be enabled or disabled using compiler directives (LANGUAGE pragmas). These are analogous to Python future import statements, which are compiler directive saying that a particular module should be compiled using syntax or semantics that is not part of the current version of Python the language. Once in a blue moon, the Haskell standard changes, and certain features that you used pragmas for (e.g. PatternGuards, EmptyDataDecls, RelaxedPolyRec) will no longer require them. This depends on the standard, not the latest GHC release. Unlike Python, core Haskell changes slowly and conservatively, so you should not be surprised that the average Haskell code uses pragmas more frequently than Python uses future imports.
- ajarmst 6y agoYou do recall that your initial thesis was "A lot of people think day-to-day tasks like running a web app are difficult or impossible in Haskell! But of course this isn't true!"? Right?