#15440: Flush eventlog in hs_init_ghc
-------------------------------------+-------------------------------------
Reporter: maoe | Owner: (none)
Type: feature | Status: new
request |
Priority: normal | Milestone:
Component: Runtime | Version: 8.4.3
System |
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:
-------------------------------------+-------------------------------------
Currently GHC RTS traces some basic information about the process in
`hs_init_ghc` but the information is often flushed to the eventlog at the
very end of the process lifetime. Or even worse, it's never written to it
if the process terminates abnormally.
This is very inconvenient because the information contains some useful
stuff like EVENT_WALL_CLOCK_TIME, which is quite important if user wants
to sync timestamps in the eventlog with clock.
The simplest way to fix the issue is to flush the eventlog buffer in
`hs_init_ghc`.
This is implemented at
https://github.com/maoe/ghc/commit/30e20e4e66adccc28c59c8876331918d30eacef2.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15440>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#15386: TTG typo: XFieldOcc should be XCFieldOcc
-------------------------------------+-------------------------------------
Reporter: alanz | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.4.3
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:
-------------------------------------+-------------------------------------
In the following
{{{#!hs
data FieldOcc pass = FieldOcc { extFieldOcc :: XFieldOcc pass
, rdrNameFieldOcc :: Located RdrName
-- ^ See Note [Located RdrNames] in
HsExpr
}
| XFieldOcc
(XXFieldOcc pass)
}}}
we are using `XFieldOcc` for both the `extFieldOcc` type and the extra
constructor.
The first one should be `XCFieldOcc`/
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15386>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#3984: Handle multiline input in GHCi history
-------------------------------------+-------------------------------------
Reporter: aavogt | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone:
Component: GHCi | Version: 6.12.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by bgamari):
I would guess so. Perhaps you would like to pick it up?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/3984#comment:24>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#15441: Data type with phantoms using TypeInType isn't coercible
-------------------------------------+-------------------------------------
Reporter: glittershark | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.4.2
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: GHC rejects
Unknown/Multiple | valid program
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
I'm *pretty* sure this is a problem with TypeInType in particular. I'd
expect the following to compile:
{{{#!hs
{-# LANGUAGE GADTs, TypeInType, TypeApplications #-}
module Bug where
import Prelude
import Data.Coerce
import Data.Kind
data Foo a = Foo
data Bar (a :: Type) (b :: Foo a) where
Bar :: Bar a 'Foo
x = coerce @(Bar Int 'Foo) @(Bar Bool 'Foo)
}}}
But it doesn't
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15441>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#10056: Inconsistent precedence of ~
-------------------------------------+-------------------------------------
Reporter: crockeea | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.4
(Parser) | Operating System: Unknown/Multiple
Keywords: | Type of failure: GHC rejects
Architecture: | valid program
Unknown/Multiple | Blocked By:
Test Case: | Related Tickets:
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
The following compiles as expected:
{{{#!hs
{-# LANGUAGE TypeFamilies #-}
type family Foo a b
f :: (Foo a b ~ Int) => a -> b -> b
f = error ""
}}}
but this fails:
{{{#!hs
{-# LANGUAGE TypeFamilies #-}
type family a \\ b
f :: (a \\ b ~ Int) => a -> b -> b
f = error ""
}}}
with the error
> "The second argument of `(\\)` should have kind `*`, but `b ~ Int` has
kind `Constraint`."
Thus the first example is being parsed as `(Foo a b) ~ Int`, while the
second is parsed as `a \\ (b ~ Int)`. I believe the second example should
compile, i.e. `(\\)` and `Foo` should have the same precedence, both of
which are higher than `(~)`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10056>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#14873: GHC HEAD regression (piResultTy)
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: new
Priority: highest | Milestone:
Component: Compiler | Version: 8.5
(Type checker) |
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Compile-time
Unknown/Multiple | crash or panic
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
(Originally noticed [https://travis-ci.org/goldfirere/singletons/jobs/347945148#L1179 here].)
The following program typechecks on GHC 8.2.2 on GHC 8.4.1, but panics on
GHC HEAD:
{{{#!hs
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE TypeOperators #-}
module Bug where
import Data.Kind (Type)
data family Sing (a :: k)
newtype instance Sing (f :: k1 ~> k2) =
SLambda { applySing :: forall t. Sing t -> Sing (Apply f t) }
data TyFun :: Type -> Type -> Type
type a ~> b = TyFun a b -> Type
infixr 0 ~>
type family Apply (f :: k1 ~> k2) (x :: k1) :: k2
class SingI (a :: k) where
sing :: Sing a
data ColSym1 :: f a -> a ~> Bool
type instance Apply (ColSym1 x) y = Col x y
class PColumn (f :: Type -> Type) where
type Col (x :: f a) (y :: a) :: Bool
class SColumn (f :: Type -> Type) where
sCol :: forall (x :: f a) (y :: a).
Sing x -> Sing y -> Sing (Col x y :: Bool)
instance (SColumn f, SingI x) => SingI (ColSym1 (x :: f a) :: a ~> Bool)
where
sing = SLambda (sCol (sing @_ @x))
}}}
{{{
$ /opt/ghc/head/bin/ghc Bug.hs
[1 of 1] Compiling Bug ( Bug.hs, Bug.o )
ghc: panic! (the 'impossible' happened)
(GHC version 8.5.20180201 for x86_64-unknown-linux):
piResultTy
k_aZU[tau:1]
(a_aW8[sk:1] |> <*>_N)
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputable.hs:1150:37 in
ghc:Outputable
pprPanic, called at compiler/types/Type.hs:947:35 in ghc:Type
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14873>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#15456: (ImplicitParams) Allow ? in binding patterns
-------------------------------------+-------------------------------------
Reporter: Welperooni | Owner: (none)
Type: feature | Status: new
request |
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.4.3
Keywords: | Operating System: Unknown/Multiple
ImplicitParams |
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
This is mostly useful when dealing with ImplicitParams. Suppose "foo"
takes an implicit parameter "?msg"
{{{#!hs
-- Invalid, parse error in pattern ?msg
bar ?msg = foo
\?msg -> foo
-- With -XViewPatterns, same issue
bar ( ... -> ?msg) = foo
}}}
Instead, you are forced to create a local let binding
{{{#!hs
bar msg = let ?msg = msg in foo
\msg -> let ?msg = msg in foo
bar ( ... -> msg) = let ?msg = msg in foo
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15456>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#13451: Bind implicit parameter in patterns
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: task | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Keywords: | Operating System: Unknown/Multiple
ImplicitParams |
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Is there any reason why variables for `ImplicitParams` can't be bound in
patterns, so you can write
{{{#!hs
data Exp = Val Int | Op Op Exp Exp
data Op = Add | Mul
data Protect where
Protect :: (?op :: Op) => Protect
protectOp :: Exp -> Maybe Protect
protectOp (Op ?op _ _) = Just Protect
protectOp _ = Nothing
}}}
instead of
{{{#!hs
protectOp :: Exp -> Maybe Protect
protectOp (Op op _ _) = Just Protect where ?op = op
protectOp _ = Nothing
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13451>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler