[GHC] #13075: Top-level bang pattern accepted
GHC
ghc-devs at haskell.org
Fri Jan 6 14:54:28 UTC 2017
#13075: Top-level bang pattern accepted
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: goldfire
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
When I compile/link
{{{#!hs
{-# LANGUAGE BangPatterns #-}
module Main where
!(Just x) = Nothing
main = putStrLn "hi there!"
}}}
I get
{{{
rae:09:50:49 ~/temp> ghc Bug.hs
[1 of 1] Compiling Main ( Bug.hs, Bug.o )
Linking Bug ...
ld: can't open output file for writing: Bug, errno=21 for architecture
x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
`gcc' failed in phase `Linker'. (Exit code: 1)
}}}
This bogus code should be rejected more gracefully (and earlier). It
actually also loads into GHCi, but shouldn't.
Will fix while I'm in the area.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13075>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list