mathiasbynens / small

Smallest possible syntactically valid files of different types
https://mathiasbynens.be/notes/minimal-html
1.93k stars 184 forks source link

Reduce haskell_term by one character #109

Open haasn opened 4 years ago

haasn commented 4 years ago

Since GHC 7.10 (base 4.8), Applicative became a member of Prelude, which means we can access the wonderfully short function pure to shave off one character (while also not printing anything).

haasn commented 4 years ago

Note that this is not strictly speaking standards compliant if you want to limit yourself to the latest "stable" language spec (Haskell 2010), but both the Haskell Prime and Haskell 2020 WIP drafts include this function, and GHC is the de-facto standard anyway.