Haskell.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

ghc-tickets

Thread Start a new thread
Download
Threads by month
  • ----- 2025 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2013 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
ghc-tickets@haskell.org

April 2018

  • 1 participants
  • 942 discussions
[GHC] #13746: Typeable changes in base-4.10 break ChasingBottoms's test suite
by GHC 26 May '18

26 May '18
#13746: Typeable changes in base-4.10 break ChasingBottoms's test suite -------------------------------------+------------------------------------- Reporter: refold | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: | Version: 8.2.1-rc2 libraries/base | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Runtime crash Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- When compiled against base-4.10, `ChasingBottoms`'s test suite fails with: {{{ Approx: ChasingBottomsTestSuite: typeRepTyCon: FunTy CallStack (from HasCallStack): error, called at libraries/base/Data/Typeable/Internal.hs:308:33 in base:Data.Typeable.Internal }}} This is due to the use of `error` in the following function in [https://github.com/ghc/ghc/blob/master/libraries/base/Data/Typeable/Interna… `Data.Typeable.Internal`]: {{{#!hs -- | Observe the type constructor of a type representation typeRepTyCon :: TypeRep a -> TyCon typeRepTyCon (TrTyCon _ tc _) = tc typeRepTyCon (TrApp _ a _) = typeRepTyCon a typeRepTyCon (TrFun _ _ _) = error "typeRepTyCon: FunTy" -- TODO }}} `ChasingBottoms`'s test suite works fine when compiled with GHC 8.0.2. It seems to me that the change in behaviour constitutes a bug or a breaking change (for which there is no mention in the changelog). -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13746> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 3
0 0
[GHC] #13726: Declaring GADT constructor and associated data family with the same name gives weird error
by GHC 26 May '18

26 May '18
#13726: Declaring GADT constructor and associated data family with the same name gives weird error -------------------------------------+------------------------------------- Reporter: mrkgnao | Owner: (none) 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: -------------------------------------+------------------------------------- The code this is from is really messy. I'll submit a minimal example in a short while if this isn't a known bug. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13726> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 4
0 0
[GHC] #13192: Ambiguity Caused By PolyKind and Not Helpful Error Messages
by GHC 26 May '18

26 May '18
#13192: Ambiguity Caused By PolyKind and Not Helpful Error Messages -------------------------------------+------------------------------------- Reporter: Shayan-Najd | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Poor/confusing Unknown/Multiple | error message Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- The following code results in a confusing/wrong error message, blaming a type variable (`a`) being a fixed Skolem variable: {{{#!hs {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE PolyKinds #-} data I a type family F x type instance F (I a) = a identity :: F (I a) -> F (I a) identity x = x }}} with the error message {{{ • Couldn't match type ‘F (I a0)’ with ‘F (I a)’ Expected type: F (I a) -> F (I a) Actual type: F (I a0) -> F (I a0) NB: ‘F’ is a type function, and may not be injective The type variable ‘a0’ is ambiguous • In the ambiguity check for ‘identity’ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes In the type signature: identity :: F (I a) -> F (I a) | 9 | identity :: F (I a) -> F (I a) | ^^^^^^^^^^^^^^^^^^ }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13192> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 6
0 0
[GHC] #13118: let binding tuple of lenses error not an expression
by GHC 26 May '18

26 May '18
#13118: let binding tuple of lenses error not an expression -------------------------------------+------------------------------------- Reporter: codygman | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | 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: -------------------------------------+------------------------------------- This error seems to be fixed in GHC Head +/- 10 commits, but exists in GHC 8.0.1. I was told it might be a useful test case. {{{ λ> :t userId userId :: (RElem UserId rs (RIndex UserId rs), Functor f) => (Int -> f Int) -> Record rs -> f (Record rs) λ> let recLenses = userId &: Nil λ> :t recLenses recLenses :: (Functor f, RElem UserId rs (RIndex UserId rs)) => Record '[s :-> ((Int -> f Int) -> Record rs -> f (Record rs))] λ> :t recUncons recUncons :: Record (s :-> a : rs) -> (a, Record rs) λ> :t recUncons recLenses recUncons recLenses :: (Functor f, RElem UserId rs (RIndex UserId rs)) => ((Int -> f Int) -> Record rs -> f (Record rs), Record '[]) λ> let (l, ls) = recUncons recLenses <no location info>: error: not an expression: ‘let (l, ls) = recUncons recLenses’ }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13118> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 3
0 0
[GHC] #13755: GHC-8.0.2+ spits out $dm names in error messages
by GHC 26 May '18

26 May '18
#13755: GHC-8.0.2+ spits out $dm names in error messages -------------------------------------+------------------------------------- Reporter: zilinc | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 (Type checker) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Poor/confusing Unknown/Multiple | error message Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Example (copied from #12881) {{{ {-# LANGUAGE FlexibleInstances #-} module Bug where class Arbitrary a where shrink :: a -> [a] shrink _ = [] instance Arbitrary a instance Arbitrary Int }}} Error message is: {{{ GHCInstance.hs:10:10: error: • Overlapping instances for Foo Int arising from a use of ‘Main.$dmfoo’ Matching instances: instance Foo a -- Defined at GHCInstance.hs:9:10 instance Foo Int -- Defined at GHCInstance.hs:10:10 • In the expression: Main.$dmfoo @Int In an equation for ‘foo’: foo = Main.$dmfoo @Int In the instance declaration for ‘Foo Int’ }}} Another example: code in #13754 description. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13755> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 6
0 0
[GHC] #12854: ghc-8 prints mangled names in error message: ‘GHC.Base.$dm<$’
by GHC 26 May '18

26 May '18
#12854: ghc-8 prints mangled names in error message: ‘GHC.Base.$dm<$’ -------------------------------------+------------------------------------- Reporter: slyfox | Owner: 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: -------------------------------------+------------------------------------- Noticed on old omega codebase when built with ghc-8.0.2-rc1. Here is the minimal example: {{{#!hs {-# LANGUAGE FlexibleInstances, KindSignatures #-} {-# OPTIONS_GHC -Wall #-} data F a b instance Functor (F a) where fmap = undefined instance Functor (F String) where fmap = undefined }}} {{{ $ ghci a.hs GHCi, version 8.0.1.20161117: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/slyfox/.ghci [1 of 1] Compiling Main ( a.hs, interpreted ) a.hs:6:10: error: • Overlapping instances for Functor (F String) arising from a use of ‘GHC.Base.$dm<$’ Matching instances: instance Functor (F a) -- Defined at a.hs:5:10 instance Functor (F String) -- Defined at a.hs:6:10 • In the expression: GHC.Base.$dm<$ @F String In an equation for ‘<$’: (<$) = GHC.Base.$dm<$ @F String In the instance declaration for ‘Functor (F String)’ Failed, modules loaded: none. }}} ‘GHC.Base.$dm<$’ is an internal name. Looks like it should be a 'GHC.Base.<$'. Confusingly this does not cause overlapping error at all: {{{#!hs {-# LANGUAGE FlexibleInstances, KindSignatures #-} {-# OPTIONS_GHC -Wall #-} data F a b class C (f :: * -> *) where instance C (F a) where instance C (F String) where }}} {{{ $ ghci a.hs GHCi, version 8.0.1.20161117: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/slyfox/.ghci [1 of 1] Compiling Main ( a.hs, interpreted ) Ok, modules loaded: Main. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12854> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 2
0 0
[GHC] #12794: Out of scope error not reported
by GHC 26 May '18

26 May '18
#12794: Out of scope error not reported -------------------------------------+------------------------------------- Reporter: simonpj | Owner: 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: -------------------------------------+------------------------------------- Consider {{{ {-# LANGUAGE TypeApplications #-} {-# OPTIONS -fdefer-type-errors #-} f = bar @Int }}} where `bar` is not in scope. We get {{{ T12768.hs:8:7: error: • Cannot apply expression of type ‘t1’ to a visible type argument ‘Int’ • In the expression: bar @Int }}} Confusingly, the "`bar` is not in scope`" error (the true error) has been suppressed. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12794> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 2
0 0
[GHC] #12655: Bizarre parser problem: "Illegal bang-pattern" (something to do with CPP?)
by GHC 26 May '18

26 May '18
#12655: Bizarre parser problem: "Illegal bang-pattern" (something to do with CPP?) -------------------------------------+------------------------------------- Reporter: edsko | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.4.2 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: -------------------------------------+------------------------------------- This is a bug in an old ghc (7.4.2), documenting it here mostly in case anybody else comes across it. If you try to compile http://hackage.haskell.org/package/bytestring-builder-0.10.8.1.0 /bytestring-builder-0.10.8.1.0.tar.gz , ghc fails with {{{ src/Data/ByteString/Builder/Prim.hs:553:13: Illegal bang-pattern (use -XBangPatterns): ! br' }}} However, that file contains a directive {{{#!hs {-# LANGUAGE CPP, BangPatterns, ScopedTypeVariables #-} }}} at the very top of the file, so we should not be getting this error message. Now here's the bizarre thing: if we compile with `cabal --builddir=foo`, compilation happens as normal! I ran ghc with `--keep- tmp-files`, and compared the output of CPP for both variations, and literally the ''only'' difference between the two that lines {{{ # 156 "./dist/build/autogen/cabal_macros.h" }}} in one are {{{ # 156 "./foo/build/autogen/cabal_macros.h" }}} in the other. It gets weirder. I replaced the output of `src/Data/ByteString/Builder/Prim.hs` with the output of `cpp`, and removed the `CPP` language directive. If I start with the version that has `dist` (i.e., the one that results in a compilation error), ''even adding or removing a single blank line in the header of the file made the parser error go away'' (where the "header" is the bit with lines such as {{{ # 134 "./dist/build/autogen/cabal_macros.h" }}} No idea what's going on here; probably not worth investigating further. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12655> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 5
0 0
[GHC] #12601: explicit foralls do not distinguish applicable types
by GHC 26 May '18

26 May '18
#12601: explicit foralls do not distinguish applicable types -------------------------------------+------------------------------------- Reporter: dmwit | Owner: 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: -------------------------------------+------------------------------------- From [https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_ext… #visible-type-application the documentation for TypeApplications]: "When printing types with -fprint-explicit-foralls enabled, type variables not available for visible type application are printed in braces. Thus, if you write myLength = length without a type signature, myLength‘s inferred type will be forall {f} {a}. Foldable f => f a -> Int." This implies that type variables that ''are'' available for type application are ''not'' printed braces (though I admit that it doesn't say so outright!). With that in mind, I find the following behavior confusing: {{{ > :set -XTypeApplications -fprint-explicit-foralls > :t (1 :: Num a => a) (1 :: Num a => a) :: forall {a}. Num a => a > (1 :: Num a => a) @Int 1 }}} The :t query seems to indicate that the type variable is not available, but the evaluation query seems to indicate that it is. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12601> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 1
0 0
[GHC] #12592: Explicit type signature for type classes fails
by GHC 26 May '18

26 May '18
#12592: Explicit type signature for type classes fails -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: 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: -------------------------------------+------------------------------------- GHC 8.0.1: Consider the [https://hackage.haskell.org/package/indexed-0.1 indexed classes]: {{{#!hs class IxFunctor f where imap :: (a -> b) -> f j k a -> f j k b class IxFunctor m => IxPointed m where ireturn :: a -> m i i a class IxPointed m => IxApplicative m where iap :: m i j (a -> b) -> m j k a -> m i k b class IxFunctor w => IxCopointed w where iextract :: w i i a -> a class IxApplicative m => IxMonad m where ibind :: (a -> m j k b) -> m i j a -> m i k b class IxMonad m => IxMonadFree f m | m -> f where iwrap :: f i j (m j k a) -> m i k a }}} GHCi gives their kinds: {{{ IxFunctor :: (k -> i -> * -> *) -> Constraint IxPointed :: (k -> k -> * -> *) -> Constraint IxApplicative :: (k -> k -> * -> *) -> Constraint IxCopointed :: (k -> k -> * -> *) -> Constraint IxMonad :: (k -> k -> * -> *) -> Constraint IxMonadFree :: (k -> k -> * -> *) -> (k -> k -> * -> *) -> Constraint }}} so I attempt to make them explicit: {{{#!hs type IxFunct i = i -> i -> Type -> Type class IxFunctor (f :: IxFunct i) where imap :: (a -> b) -> f j k a -> f j k b }}} Works fine, but if I add it to any of the others it fails: {{{#!hs -- tZRa.hs:15:17: error: … -- • Expected kind ‘i’, but ‘i’ has kind ‘*’ -- • In the first argument of ‘w’, namely ‘i’ -- In the type signature: -- iextract :: w i i a -> a -- In the class declaration for ‘IxCopointed’ -- Compilation failed. class IxFunctor w => IxCopointed (w :: IxFunct i) where iextract :: w i i a -> a -- ... class IxMonad m => IxMonadFree (f :: IxFunct i) (m :: IxFunct i) | m -> f where iwrap :: f i j (m j k a) -> m i k a }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12592> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 2
0 0
  • ← Newer
  • 1
  • ...
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • ...
  • 95
  • Older →

HyperKitty Powered by HyperKitty version 1.3.9.