#6056: INLINABLE pragma prevents worker-wrapper to happen.
--------------------------------------------+------------------------------
Reporter: milan | Owner: simonpj
Type: bug | Status: new
Priority: normal | Milestone: 7.10.1
Component: Compiler | Version: 7.4.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime performance bug | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
--------------------------------------------+------------------------------
Comment (by Simon Peyton Jones <simonpj@…>):
In [changeset:"9cf5906b692c31b7ec67856b0859cb0e33770651/ghc"]:
{{{
#!CommitTicketReference repository="ghc"
revision="9cf5906b692c31b7ec67856b0859cb0e33770651"
Make worker/wrapper work on INLINEABLE things
This fixes a long-standing bug: Trac #6056. The trouble was that
INLINEABLE "used up" the unfolding for the Id, so it couldn't be
worker/wrapper'd by the strictness analyser.
This patch allows the w/w to go ahead, and makes the *worker* INLINEABLE
instead, so it can later be specialised.
However, that doesn't completely solve the problem, because the dictionary
argument (which the specialiser treats specially) may be strict and
hence unpacked by w/w, so now the worker won't be specilialised after all.
Solution: never unpack dictionary arguments, which is done by the
isClassTyCon
test in WwLib.deepSplitProductType_maybe
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/6056#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#7206: Implement cheap build
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner: simonpj
Type: bug | Status: new
Priority: normal | Milestone: ⊥
Component: Compiler | Version: 7.4.2
Resolution: | Keywords:
Operating System: | Architecture: Unknown/Multiple
Unknown/Multiple | Difficulty: Unknown
Type of failure: | Blocked By:
None/Unknown | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Changes (by snoyberg):
* cc: snoyberg (added)
Comment:
Following up on a separate discussion on the haskell-cafe, I have a
possibly related case:
{{{#!hs
main :: IO ()
main = printLen >> printLen
printLen :: IO ()
printLen = lengthM 0 [1..40000000 :: Int] >>= print
lengthM :: Monad m => Int -> [a] -> m Int
lengthM cnt [] = return cnt
lengthM cnt (_:xs) =
cnt' `seq` lengthM cnt' xs
where
cnt' = cnt + 1
}}}
On my system, this takes almost 1.2GB of memory. If I comment out the
second call to `printLen`, it takes 44KB.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7206#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#7206: Implement cheap build
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner: simonpj
Type: bug | Status: new
Priority: normal | Milestone: ⊥
Component: Compiler | Version: 7.4.2
Resolution: | Keywords:
Operating System: | Architecture: Unknown/Multiple
Unknown/Multiple | Difficulty: Unknown
Type of failure: | Blocked By:
None/Unknown | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
Another thought. Regardless of what we do here, it seems likely that GHC
will sometimes make the wrong choice. So we should give the programmer a
way to make the "right" choice.
Example. Suppose `[1..10000]` is floated out and shared. Then we should
provide `duplicableEnumFromTo 1 10000` which means "please don't try to
share me; instead fuse me with my consumers, even if that loses sharing".
OK so you lose the nice notation, but you get to say what you want.
(And if we switch so that `[1..1000]` is by-default not-shared, then we
should provide a way force it to be shared: `nonDuplicableEnumFromTo 1
1000`.
Simon
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7206#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#8288: add idris style EDSL support for deep embedding lambdas
----------------------------------------------+----------------------------
Reporter: carter | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 7.10.1
Component: Compiler | Version: 7.6.3
Keywords: | Operating System:
Architecture: Unknown/Multiple | Unknown/Multiple
Difficulty: Project (more than a week) | Type of failure:
Blocked By: | None/Unknown
Related Tickets: | Test Case:
| Blocking:
----------------------------------------------+----------------------------
I could be wrong, but I think this would actually make it much easier to
write interesting EDSLs and have a native haskelly syntax.
This would sort of be in the same vein as the recently requested
applicative brackets idea, albeit a tad more going on .
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8288>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#393: functions without implementations
-------------------------------------+-------------------------------------
Reporter: c_maeder | Owner: simonpj
Type: feature | Status: new
request | Milestone: ⊥
Priority: normal | Version: None
Component: Compiler | Keywords:
(Type checker) | Architecture: Unknown/Multiple
Resolution: None | Difficulty: Moderate (less
Operating System: | than a day)
Unknown/Multiple | Blocked By:
Type of failure: | Related Tickets:
None/Unknown |
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
Actually using this
{{{
f :: Int -> Int
f = _ -- Note "_" not "undefined"
}}}
plus compiling with `-fdefer-type-errors`, will give a runtime error when
(and only when) `f` is called, giving file and line number. See
[http://www.haskell.org/ghc/docs/latest/html/users_guide/typed-holes.html
the manual on typed holes].
See #9497 for making this a bit better.
Simon
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/393#comment:24>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#8024: Dynamic linking not working on PowerPC Linux.
----------------------------------------------+---------------------------
Reporter: erikd | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.7
Resolution: | Keywords:
Operating System: Linux | Architecture: powerpc
Type of failure: Building GHC failed | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Revisions: |
----------------------------------------------+---------------------------
Comment (by slyfox):
The bug looks very much like SPARC's bug #8857
where compiler emitted one level more indirection,
but assembler didn't generate proper relocations for it:
https://phabricator.haskell.org/D177
I wonder if it cures ppc32 for you.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8024#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#8857: Sparc needs to be on the NoSharedLibsPlatformList
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.8.1-rc2
Keywords: | Operating System: Unknown/Multiple
Architecture: sparc | Type of failure: Building GHC
Difficulty: Easy (less than 1 | failed
hour) | Test Case:
Blocked By: | Blocking:
Related Tickets: |
-------------------------------------+-------------------------------------
I see build failures with GHC-7.8 RC2 on sparc:
https://buildd.debian.org/status/logs.php?pkg=ghc&ver=7.8.20140228-1&arch=s…
These go away if I apply this patch, as suggested by Karel Gardas:
{{{
Index: ghc-7.8.20140228/mk/config.mk.in
===================================================================
--- ghc-7.8.20140228.orig/mk/config.mk.in 2014-03-06
09:48:52.000000000 +0000
+++ ghc-7.8.20140228/mk/config.mk.in 2014-03-06 09:49:55.000000000
+0000
@@ -98,7 +98,8 @@
NoSharedLibsPlatformList = arm-unknown-linux \
powerpc-unknown-linux \
x86_64-unknown-mingw32 \
- i386-unknown-mingw32
+ i386-unknown-mingw32 \
+ sparc-unknown-linux
ifeq "$(SOLARIS_BROKEN_SHLD)" "YES"
NoSharedLibsPlatformList += i386-unknown-solaris2
}}}
Please consider applying this fix before next RC or the final release.
Thanks!
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8857>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler