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

May 2017

  • 1 participants
  • 1082 discussions
[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
[GHC] #11766: Lazy application gives "No instance" error while strict application works
by GHC 26 May '18

26 May '18
#11766: Lazy application gives "No instance" error while strict application works -------------------------------------+------------------------------------- Reporter: MichaelK | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1-rc2 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 might make sense if there were any IO. Here's the code: {{{#!hs {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE UndecidableInstances #-} import Data.Maybe (isJust) data Wrapper a = Wrapper a deriving (Show) class Resolution a instance Resolution (Wrapper a) class (Resolution b, Resolution d) => C a b c d | a -> b, c -> d, a d -> c, b c -> a where cfun :: (b -> d) -> a -> c instance (Resolution b, Resolution d, a ~ b, c ~ d) => C a b c d where cfun = ($) instance (Eq a, C b c d e) => C (Maybe a -> b) c (Maybe a -> d) e where cfun f b = \x -> cfun f (b x) foo :: Maybe a -> Wrapper Bool foo = Wrapper . isJust }}} Applying `Nothing` strictly or in a `let` clause gives the expected answer (I expect that `cfun id foo` would be equivalent to `foo`): {{{#!hs *Main> cfun id foo $! Nothing Wrapper False *Main> let f = cfun id foo in f Nothing Wrapper False }}} But regular application (or just `(cfun id foo) Nothing`) returns the following error: {{{#!hs *Main> cfun id foo $ Nothing <interactive>:6:1: No instance for (Resolution (Maybe a0 -> Wrapper Bool)) (maybe you haven't applied enough arguments to a function?) arising from a use of ‘cfun’ In the expression: cfun id foo In the expression: cfun id foo $ Nothing In an equation for ‘it’: it = cfun id foo $ Nothing }}} In case it helps, the purpose of this code is for `cfun` to have the effective type of {{{#!hs cfun :: (Eq a0, Eq a1, .., Eq an) => (Wrapped b -> Wrapped c) -> (Maybe a0 -> Maybe a1 -> .. -> Maybe an -> Wrapped b) -> (Maybe a0 -> Maybe a1 -> .. -> Maybe an -> Wrapped c) }}} i.e. apply a function to the "wrapped" return value of another function of the above form. Tested on GHC 8.0.1-rc2 (most recent OSX binary as of now) and 7.10.3. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11766> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 4
0 0
[GHC] #12514: Can't write unboxed sum type constructors in prefix form
by GHC 26 May '18

26 May '18
#12514: Can't write unboxed sum type constructors in prefix form -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 (Parser) | 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: -------------------------------------+------------------------------------- You can write `(# Int | Char #)`, but not `(# | #) Int Char`. This is annoying since it prevents you from partially applying unboxed sum type constructors, and it also precludes you from doing cool things like `reify ''(#||#)` (as I woefully noted [https://phabricator.haskell.org/D2448 here]). Luckily, I don't think fixing this would be too hard. The special case of parsing unboxed tuple type constructors as prefix is handled [http://git.haskell.org/ghc.git/blob/0d3bf62092de83375025edca6f7242812338542… here], so I //think// we'd just need to add a similar case for unboxed sums. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12514> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 9
0 0
[GHC] #12451: TemplateHaskell and Data.Typeable - tcIfaceGlobal (local): not found
by GHC 26 May '18

26 May '18
#12451: TemplateHaskell and Data.Typeable - tcIfaceGlobal (local): not found -------------------------------------+------------------------------------- Reporter: mkloczko | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple TemplateHaskell, Typeable | Architecture: x86_64 | Type of failure: GHC rejects (amd64) | valid program Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- The following code produces an ghc panic error: {{{#!hs {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ScopedTypeVariables #-} module TH where import Language.Haskell.TH import Language.Haskell.TH.Syntax import Data.Typeable usingType :: forall a. Typeable a => a -> Q [Dec] usingType _ = do -- Try to get anything using typeRep. let name = (tyConName $ typeRepTyCon $ typeRep (Proxy :: Proxy a)) `seq` "The name!" -- theF = "The name!" return [FunD (mkName "theF") [Clause [] (NormalB $ LitE $ StringL name ) []]] }}} {{{#!hs {-# LANGUAGE TemplateHaskell #-} module Main where import TH data A = A Int -- Changing the argument to (A 3) does not help. $(usingType (undefined :: A)) main = putStrLn $ theF }}} The error: {{{ ghc: panic! (the 'impossible' happened) (GHC version 8.0.1 for x86_64-unknown-linux): tcIfaceGlobal (local): not found: $tcA [r5m0 :-> Type constructor ‘A’, r5m3 :-> Data constructor ‘A’, r5m9 :-> Identifier ‘A’] }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12451> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 3
0 0
  • ← Newer
  • 1
  • ...
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • ...
  • 109
  • Older →

HyperKitty Powered by HyperKitty version 1.3.9.