#7744: Can't install conduit via cabal-install
---------------------------------------+----------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.6.3
Resolution: | Keywords:
Operating System: MacOS X | Architecture: x86_64 (amd64)
Type of failure: Compile-time crash | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
---------------------------------------+----------------------------------
Changes (by yezariaely):
* cc: rj@… (added)
* resolution: worksforme =>
* status: closed => new
* os: Linux => MacOS X
* version: 7.6.2 => 7.6.3
Comment:
It still crashes for me. Reason seems to be:
{{{
Data/Conduit/Internal.hs:371:4:
error: invalid preprocessing directive
#-}
^
}}}
Here the full log in details. Any ideas?
{{{
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3
$ cabal --version
cabal-install version 1.18.0.3
using version 1.18.1.3 of the Cabal library
}}}
{{{
$ cabal install conduit
Resolving dependencies...
Configuring conduit-1.1.0...
Building conduit-1.1.0...
Preprocessing library conduit-1.1.0...
Data/Conduit/Internal.hs:101:47:
warning: missing terminating ' character [-Winvalid-pp-token]
-- * /i/ is the type of values for this @Pipe@'s input stream.
^
Data/Conduit/Internal.hs:103:47:
warning: missing terminating ' character [-Winvalid-pp-token]
-- * /o/ is the type of values for this @Pipe@'s output stream.
^
Data/Conduit/Internal.hs:171:64:
warning: \u used with no following hex digits; treating as '\'
followed by identifier [-Wunicode]
local f (NeedInput p c) = NeedInput (\i -> local f (p i)) (\u ->
local f (c u))
^
Data/Conduit/Internal.hs:189:62:
warning: \u used with no following hex digits; treating as '\'
followed by identifier [-Wunicode]
listen (NeedInput p c) = NeedInput (\i -> listen (p i)) (\u ->
listen (c u))
^
Data/Conduit/Internal.hs:194:26:
warning: missing terminating ' character [-Winvalid-pp-token]
return $ do (x,w') <- listen p
^
Data/Conduit/Internal.hs:195:46:
warning: missing terminating ' character [-Winvalid-pp-token]
return (x, w `mappend` w')
^
Data/Conduit/Internal.hs:199:58:
warning: \u used with no following hex digits; treating as '\'
followed by identifier [-Wunicode]
pass (NeedInput p c) = NeedInput (\i -> pass (p i)) (\u -> pass (c
u))
^
Data/Conduit/Internal.hs:216:74:
warning: \u used with no following hex digits; treating as '\'
followed by identifier [-Wunicode]
catchError (NeedInput p c) f = NeedInput (\i -> catchError (p i)
f) (\u -> catchError (c u) f)
^
Data/Conduit/Internal.hs:334:50:
warning: missing terminating ' character [-Winvalid-pp-token]
awaitForever :: Monad m => (i -> Pipe l i o r m r') -> Pipe l i o r m r
^
Data/Conduit/Internal.hs:371:4:
error: invalid preprocessing directive
#-}
^
Data/Conduit/Internal.hs:576:13:
warning: missing terminating ' character [-Winvalid-pp-token]
pipe' <- mpipe
^
Data/Conduit/Internal.hs:577:18:
warning: missing terminating ' character [-Winvalid-pp-token]
case pipe' of
^
Data/Conduit/Internal.hs:579:29:
warning: missing terminating ' character [-Winvalid-pp-token]
_ -> return pipe'
^
Data/Conduit/Internal.hs:622:83:
warning: missing terminating ' character [-Winvalid-pp-token]
mapInput f f' (NeedInput p c) = NeedInput (mapInput f f' . p . f)
(mapInput f f' . c)
^
Data/Conduit/Internal.hs:625:82:
warning: missing terminating ' character [-Winvalid-pp-token]
mapInput f f' (Leftover p i) = maybe id (flip Leftover) (f' i) $
mapInput f f' p
^
Data/Conduit/Internal.hs:702:35:
warning: \u used with no following hex digits; treating as '\'
followed by identifier [-Wunicode]
loop = awaitE >>= either (\u -> return (u, r)) (\_ -> loop)
^
Data/Conduit/Internal.hs:723:14:
warning: missing terminating ' character [-Winvalid-pp-token]
let final' = do
^
Data/Conduit/Internal.hs:726:58:
warning: missing terminating ' character [-Winvalid-pp-token]
return (liftIO (I.writeIORef ref False) >> src, final')
^
Data/Conduit/Internal.hs:884:76:
warning: \u used with no following hex digits; treating as '\'
followed by identifier [-Wunicode]
NeedInput px cx >< y@Done{} = NeedInput (\i -> px i >< y)
(\u -> cx u >< y)
^
Data/Conduit/Internal.hs:885:76:
warning: \u used with no following hex digits; treating as '\'
followed by identifier [-Wunicode]
x@Done{} >< NeedInput py cy = NeedInput (\i -> x >< py i)
(\u -> x >< cy u)
^
Data/Conduit/Internal.hs:957:10:
warning: \u used with no following hex digits; treating as '\'
followed by identifier [-Wunicode]
(\u -> go finalX finalY (cx u) (cy u))
^
Data/Conduit/Internal.hs:960:10:
warning: \u used with no following hex digits; treating as '\'
followed by identifier [-Wunicode]
(\u -> go finalX finalY (cx u) (Done y))
^
Data/Conduit/Internal.hs:963:10:
warning: \u used with no following hex digits; treating as '\'
followed by identifier [-Wunicode]
(\u -> go finalX finalY (Done x) (cy u))
^
Data/Conduit/Internal.hs:1059:14:
warning: missing terminating ' character [-Winvalid-pp-token]
let final' = do
^
Data/Conduit/Internal.hs:1062:58:
warning: missing terminating ' character [-Winvalid-pp-token]
return (liftIO (I.writeIORef ref False) >> src, final')
^
24 warnings and 1 error generated.
Failed to install conduit-1.1.0
cabal: Error: some packages failed to install:
conduit-1.1.0 failed during the building phase. The exception was:
ExitFailure 1
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7744#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#8999: Type synonym not normalized in instance head
------------------------------------+-------------------------------------
Reporter: edsko | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.2
Keywords: | Operating System: Unknown/Multiple
Architecture: Unknown/Multiple | Type of failure: None/Unknown
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
------------------------------------+-------------------------------------
Consider
{{{
{-# LANGUAGE ConstraintKinds, KindSignatures #-}
type Foo (m :: * -> *) = Monad m
data T a = T (Maybe a)
instance Foo T where
return = T Nothing
}}}
this gives the bogus error
{{{
T.hs:8:3: ‘return’ is not a (visible) method of class ‘Foo’
}}}
incidentally, it works okay when giving no where clause.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8999>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#7066: isInstance does not work for compound types
-------------------------------------+------------------------------------
Reporter: edsko | Owner: simonpj
Type: bug | Status: new
Priority: normal | Milestone: 7.8.3
Component: Template Haskell | Version: 7.4.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by mojojojo):
> Are you making the case for an actual change in the behaviour of the
current TH operations? The current reifyInstances is deliberately
primitive (a one-level lookup) so that other stuff can be built on top. Or
are you asking for some new functions in the Quasi monad; or new functions
in the template-haskell library?
Well. I consider the current behaviour of `reifyInstances`
counterintuitive, to say at very least. It took me quite some time of
debugging the library I was developing at the time, before I narrowed the
issue I was experiencing down to the unexpected behaviour of
`reifyInstances`. Only then did I get to googling and finally here to find
out that it's actually an intended behaviour, though misleadingly
documented.
Let's consider the use cases for that function. All I can imagine is
finding the instances, which then can be relied on as applicable to the
tested types. I can imagine no scenario, in which one would want to get
instances, which the typechecker would deny. Can you imagine any examples
of such a case?
Considering the above, I can only see the current behaviour of that
function as a bug. However I am not strongly opinionated about changing
that, especially since I've already published a solution. The
documentation however definitely should be updated to make the behaviour
of this function clear.
> It would help a lot to be clear precisely what the behaviour is supposed
to be when the types concerned contain type variables. Currently
reifyInstances returns all the instance whose heads unify with the
specified constraint. I've looked at your code and it's not clear to me
exactly what it does. Could you write a specification?
I've [https://github.com/nikita-volkov/th-instance-
reification/blob/master/src/THInstanceReification.hs#L36-L87 updated the
code] by covering it with extensive comments. [https://github.com/nikita-
volkov/th-instance-reification/blob/master/src/HTFTestSuite.hs The test
suite] should also be useful for clarifying the expected behaviour.
> I think it's arguable that what you really want is something like
> {{{isInstance :: Cxt -> Name -> [Type] -> Q Bool}}}
> return True if the constraint (C tys) is provable from the specifed
context. For example, you could ask, say isIntance [Show a, Num a] Foo
[Maybe a], to ask whether you can prove (Foo (Maybe a)) from (Show a, Num
a). For ground types you could give the empty Cxt.
Yes, this looks like it.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7066#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#7066: isInstance does not work for compound types
-------------------------------------+------------------------------------
Reporter: edsko | Owner: simonpj
Type: bug | Status: new
Priority: normal | Milestone: 7.8.3
Component: Template Haskell | Version: 7.4.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by simonpj):
Hmm:
* Are you making the case for an actual change in the behaviour of the
current TH operations? The current `reifyInstances` is deliberately
primitive (a one-level lookup) so that other stuff can be built on top.
Or are you asking for some new functions in the `Quasi` monad; or new
functions in the `template-haskell` library?
* It would help a lot to be clear precisely what the behaviour is
supposed to be when the types concerned contain type variables. Currently
`reifyInstances` returns all the instance whose heads unify with the
specified constraint. I've looked at your code and it's not clear to me
exactly what it does. Could you write a specification?
* I think it's arguable that what you ''really'' want is something like
{{{
isInstance :: Cxt -> Name -> [Type] -> Q Bool
}}}
return `True` if the constraint `(C tys)` is provable from the specifed
context. For example, you could ask, say `isIntance [Show a, Num a] Foo
[Maybe a]`, to ask whether you can prove `(Foo (Maybe a))` from `(Show a,
Num a)`. For ground types you could give the empty `Cxt`.
Simon
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7066#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#8997: Warn about unused parameters in recursive definitions
------------------------------------+-------------------------------------
Reporter: nomeata | Owner:
Type: feature request | Status: new
Priority: low | Milestone:
Component: Compiler | Version: 7.8.2
Keywords: | Operating System: Unknown/Multiple
Architecture: Unknown/Multiple | Type of failure: None/Unknown
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
------------------------------------+-------------------------------------
I’m correcting student’s exams right now; a good source of bad programs
:-)
Consider this program:
{{{
foo _ y [] = y
foo z y (_:xs) = foo z y xs
}}}
It would be nice if GHC would warn that the first parameter of `foo` is
not used. IIRC GHC warns about unused constructors even when they occur on
RHSs.
If `foo` is passed to some higher order function that expects a particular
type, removing the parameter would require a wrapper for there, or at
least an anonymous lambda... but it’s probably still worth notifying the
programmer, as more likely there is a bug or misunderstanding in such
code.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8997>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#8994: type checker could not deduce ambiguous instances
------------------------------------+-------------------------------------
Reporter: divip | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.2
Keywords: | Operating System: Unknown/Multiple
Architecture: Unknown/Multiple | Type of failure: None/Unknown
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
------------------------------------+-------------------------------------
GHC halts with a type error on the following program.
If I comment out a seemingly unrelated part, it compiles though.
Tested with GHC 7.8.2
{{{#!haskell
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
class
(F a ~ Int) => -- if this line is commented out, the program compiles
C a where
type F a
f :: b -> a
run :: (forall a. C a => a) -> ()
run _ = ()
x = run (f 0) -- type error: Could not deduce (Num b0) arising from the
literal ‘0’ from the context (C a)
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8994>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#7730: :info and polykinds
--------------------------------------------+------------------------------
Reporter: monoidal | Owner: archblob
Type: bug | Status: new
Priority: normal | Milestone: 7.8.3
Component: Compiler (Type checker) | Version: 7.6.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets: #8776
--------------------------------------------+------------------------------
Comment (by archblob):
I have attached a working patch so we can discuss it.
This solves the problem reported in the ticket but adds a couple of new
ones that I'll hopefully solve as I get a better understanding of the
codebase:
1. Bangs are not printed properly, specifically {-# UNPACK #-} pragmas
2. I don't really know how to get the family name for associated data
families, right
now instances are printed with the OccName as R:FamilyName Type
Also, what should we do about RecursiveFlags, Promotable and Associated
CTypes info ? right now these are not printed in order to conform to the
current :info format.
I have not added test cases or modified the old ones to conform to the new
ppr format yer, I will add them when the ticket reaches the final form.
Andrei
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7730#comment:19>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler