← All posts tagged ghc

Haskell ghc В 7.6 такого не было

Statistics/Function/Comparison.hs:35:14: Warning:
Literal 9223372036854775808 is out of the Int64 range -9223372036854775808..9223372036854775807
If you are trying to write a large negative literal, use NegativeLiterals
Haskell ghc Похоже, новый варнинг:

Data/Text/Lazy/Builder/Int.hs:61:11: Warning:
Rule "decimal/Word64" may never fire
because ‛decimal’ might inline first
Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‛decimal’
Haskell ghc Вышел новый GHC с новыми вкусными расширениями, улучшениями в GHCi и стектрейсами

The GHC Team is pleased to announce a new major release of GHC, 7.4.1.
Here are some of the highlights of the 7.4 branch since 7.2 and 7.0:
* The Num class no longer has Eq or Show superclasses.
* There is a new feature Safe Haskell (-XSafe, -XTrustworthy, -XUnsafe).
The design has changed since 7.2.
* There is a new feature kind polymorphism (-XPolyKinds).
A side-effect of this is that, when the extension is not enabled, in
certain circumstances kinds are now defaulted to * rather than being inferred.
* There is a new feature constraint kinds (-XConstraintKinds).
* It is now possible to give any sort of declaration at the ghci prompt.
For example, you can now declare datatypes within ghci.
* The profiling and hpc implementations have been merged and overhauled.
Visible changes include renaming of profiling flags, and a new
semantics for the cost-centre stacks (which should in most cases
result in more useful and intuitive profiles). The +RTS -xc flag now
also gives a stack trace.
* It is now possible to write compiler plugins.
* DPH support has been significantly improved.
* There is now preliminary support for registerised compilation using
LLVM on the ARM platform.

Full release notes are here: haskell.org
Haskell говно ghc Ха-ха-ха

bench "eta" $ nf variance sample — Тут GHC не специализирует variance и всё тормозит как не знаю что

bench "lambda" $ nf (\x -> variance x) sample — А тут специализирует и всё работает быстро.

P.S. GHC-7.2.2 генерит более эффективный код для числодробления чем GHC-7.0.4
Haskell хотелка Дорогой Дедушка Мороз, я весь год хорошо себя вёл, не использовал unsafePerformIO, приносил кровавые жертвы type checker'у. Пришли мне пожалуйста программу, в которой будет удобно смотреть файлы по 100к строк ghc core.