Created
December 15, 2017 12:17
-
-
Save anonymous/bd003ebbf867b67bab709137e821402a to your computer and use it in GitHub Desktop.
GHC 8.2.2 allows bang patterns in let binding without -XBangPatterns
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ $HOME/.stack/programs/x86_64-linux/ghc-nopie-8.0.2/bin/runghc Main.hs | |
Main.hs:8:22: error: | |
Illegal bang-pattern (use BangPatterns): | |
! x | |
$ $HOME/.stack/programs/x86_64-linux/ghc-nopie-8.2.2/bin/runghc Main.hs | |
Compiles |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--{-# LANGUAGE BangPatterns #-} | |
module Main where | |
main :: IO () | |
main = putStrLn "Compiles" | |
letBangPattern :: Int | |
letBangPattern = let !x = 1 + 2 in x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment