Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Simon Peyton Jones
committed
Mar 4, 2012
1 parent
24074aa
commit 3adf208
Showing
5 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{-# LANGUAGE RecordWildCards #-} | ||
{-# OPTIONS_GHC -Werror #-} | ||
|
||
module T5892a where | ||
|
||
import Data.Version ( Version( Version, versionBranch )) | ||
-- Not importing its field: versionTags | ||
|
||
foo :: Version -> Version | ||
foo (Version {..}) -- Pattern match does not bind versionTags | ||
= let versionBranch = [] | ||
in Version {..} -- Hence warning here |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
T5892a.hs:12:8: Warning: | ||
Fields of `Version' not initialised: Data.Version.versionTags | ||
In the expression: Version {..} | ||
In the expression: let versionBranch = [] in Version {..} | ||
In an equation for `foo': | ||
foo (Version {..}) = let versionBranch = [] in Version {..} | ||
|
||
<no location info>: | ||
Failing due to -Werror. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{-# LANGUAGE RecordWildCards #-} | ||
module T5892b where | ||
|
||
import Data.Version ( Version( Version, versionBranch )) | ||
-- Not importing its field: versionTags | ||
|
||
Version{..} = Version [] [] | ||
-- Binds versionBranch only | ||
|
||
foo = T5892b.versionBranch | ||
bar = T5892b.versionTags |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
T5892b.hs:11:7: | ||
Not in scope: `T5892b.versionTags' | ||
Perhaps you meant `T5892b.versionBranch' (line 7) |
This file contains 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