#12374: Type holes show incorrect type in GHCi
-------------------------------------+-------------------------------------
Reporter: crockeea | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: GHCi | Version: 8.0.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Incorrect
Unknown/Multiple | warning at compile-time
Test Case: | Blocked By:
Blocking: | Related Tickets: 9479, 9091
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
In a fresh GHCi:
{{{
> show _
<interactive>:7:6: error:
• Found hole: _h :: ()
Or perhaps ‘_h’ is mis-spelled, or not in scope
• In the first argument of ‘show’, namely ‘_h’
In the expression: show _h
In an equation for ‘it’: it = show _h
• Relevant bindings include
it :: String (bound at <interactive>:7:1)
}}}
This seems wrong: the type of the hole is `_h :: Show a0 => a0`, not `_h
:: ()`.
On a related note, should this be reporting two errors (one for the hole,
one for the constraint) as in #9479?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12374>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#10311: package name returned from tyConPackage is garbled
-------------------------------------+-------------------------------------
Reporter: j.waldmann | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple | Blocked By:
Test Case: | Related Tickets:
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
I am using tyConPackage (etc.) to programmatically generate links to
haddock documentation (e.g., from a typed edit widget). This is now
broken:
{{{
import Data.Map
import Data.Typeable
tyConPackage $ typeRepTyCon $ typeOf $ fromList [(1,2)]
in ghc-7.8.4: "containers-0.5.5.1"
in ghc-7.10.1: "conta_47ajk3tbda43DFWyeF3oHQ"
}}}
and I don't see how to get the actual package name.
Cf. http://stackoverflow.com/questions/29638177/tyconpackage-changed-from-
ghc-7-8-to-ghc-7-10
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10311>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#9625: ghc: panic using --enable-executable-dynamic
-------------------------------------+-------------------------------------
Reporter: CoreyOConnor | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.3
Keywords: | Operating System:
Architecture: Unknown/Multiple | Unknown/Multiple
Difficulty: Unknown | Type of failure: Compile-
Blocked By: | time crash
Related Tickets: | Test Case:
| Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
(from: https://github.com/haskell/cabal/issues/2039)
Using --enable-executable-dynamic leads to a ghc panic.
Reproduction steps:
1. clone https://github.com/coreyoconnor/executable-dynamic-issue
2. cabal configure --enable-tests --enable-executable-dynamic
3. cabal test
Expected results: Test executes and passes.
Actual results:
{{{
ghc: panic! (the 'impossible' happened) (GHC version 7.8.2 for x86_64
-unknown-linux): Don't understand library name verify-foo
}}}
Actual results varies based on the name of "verify-foo" test suite. Other
names tried: "verifyFoo", "VerifyFoo". All of which also fail.
Removing "--enable-executable-dynamic" results in a pass regardless of
test suite name.
Reproduced on GHC 7.8.2, GHC 7.8.3, Cabal 1.18, Cabal 1.20. Ubuntu.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9625>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#4012: Compilation results are not deterministic
-------------------------------------+-------------------------------------
Reporter: kili | Owner: niteria
Type: bug | Status: new
Priority: high | Milestone: 8.2.1
Component: Compiler | Version: 6.12.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Other | Test Case:
Blocked By: 11362 | Blocking: 12262
Related Tickets: #10424 | Differential Rev(s): Phab:D910,
| Phab:D1073, Phab:D1133, Phab:D1192,
| Phab:D1268, Phab:D1360, Phab:D1373,
Wiki Page: | Phab:D1396, Phab:D1457, Phab:D1468,
DeterministicBuilds | Phab:D1487, Phab:D1504, Phab:D1508
-------------------------------------+-------------------------------------
Comment (by Bartosz Nitka <niteria@…>):
In [changeset:"9858552d607f643db0385be2133a04dd4b5ff753/ghc"
9858552d/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="9858552d607f643db0385be2133a04dd4b5ff753"
Use deterministic maps for FamInstEnv
We turn FamInstEnvs into lists in some places which
don't directly affect the ABI. That happens in
family consistency checks and when producing output
for `:info`. Unfortunately that nondeterminism
is nonlocal and it's hard to tell locally what it
affects. Furthermore the envs should be relatively
small, so it should be free to use deterministic
maps here. Testing with nofib and ./validate detected
no difference between UniqFM and UniqDFM.
GHC Trac: #4012
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/4012#comment:228>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#4012: Compilation results are not deterministic
-------------------------------------+-------------------------------------
Reporter: kili | Owner: niteria
Type: bug | Status: new
Priority: high | Milestone: 8.2.1
Component: Compiler | Version: 6.12.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Other | Test Case:
Blocked By: 11362 | Blocking: 12262
Related Tickets: #10424 | Differential Rev(s): Phab:D910,
| Phab:D1073, Phab:D1133, Phab:D1192,
| Phab:D1268, Phab:D1360, Phab:D1373,
Wiki Page: | Phab:D1396, Phab:D1457, Phab:D1468,
DeterministicBuilds | Phab:D1487, Phab:D1504, Phab:D1508
-------------------------------------+-------------------------------------
Comment (by Bartosz Nitka <niteria@…>):
In [changeset:"6ed7c4793fe1acd491646a8312afbbda6be1fd0b/ghc"
6ed7c479/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="6ed7c4793fe1acd491646a8312afbbda6be1fd0b"
Document some codegen nondeterminism
Bit-for-bit reproducible binaries are not a goal for now,
so this is just marking places that could be a problem.
Doing this will allow eltsUFM to be removed and will
leave only nonDetEltsUFM.
GHC Trac: #4012
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/4012#comment:227>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#12360: Extend support for binding implicit parameters
-------------------------------------+-------------------------------------
Reporter: MichaelBurge | Owner:
Type: feature | Status: new
request |
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:
-------------------------------------+-------------------------------------
Implicit parameters can only be bound using simple let and where
declarations. In this example, one would expect ?t to be bound to the
result of getCurrentTime, however the program is rejected with a syntax
error:
{{{
{-# LANGUAGE ImplicitParams #-}
import Data.Time.Clock
printTime :: (?t :: UTCTime) => IO ()
printTime = putStrLn $ show ?t
main = do
?t <- getCurrentTime
printTime
}}}
Instead, one must first bind to a regular variable and then bind the
implicit parameter to it:
{{{
{-# LANGUAGE ImplicitParams #-}
import Data.Time.Clock
printTime :: (?t :: UTCTime) => IO ()
printTime = putStrLn $ show ?t
main = do
t <- getCurrentTime
let ?t = t
printTime
}}}
In general, it seems like any pattern binding involving implicit
parameters could be rewritten as a pattern binding to ordinary variables,
followed by a binding of the implicit parameters to the ordinary
variables. So you could bind implicit parameters buried in variables,
tuples, record fields, etc.:
Sugared:
{{{
{-# LANGUAGE ImplicitParams #-}
data Example = Example { a :: Int, b :: Int, c :: Int }
f :: (?a :: Int, ?b :: Int, ?c :: Int) => Int
f = ?a + ?b + ?c
main = do
let x = Example 1 2 3
let (Example { a = ?a, b = ?b, c = ?c }) = x
let y = f
putStrLn $ show y
}}}
Desugared:
{{{
{-# LANGUAGE ImplicitParams #-}
data Example = Example { a :: Int, b :: Int, c :: Int }
f :: (?a :: Int, ?b :: Int, ?c :: Int) => Int
f = ?a + ?b + ?c
main = do
let x = Example 1 2 3
let (Example { a = a, b = b, c = c }) = x
let ?a = a
?b = b
?c = c
let y = f
putStrLn $ show y
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12360>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler