Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ghc/ghc
  • bgamari/ghc
  • syd/ghc
  • ggreif/ghc
  • watashi/ghc
  • RolandSenn/ghc
  • mpickering/ghc
  • DavidEichmann/ghc
  • carter/ghc
  • harpocrates/ghc
  • ethercrow/ghc
  • mijicd/ghc
  • adamse/ghc
  • alexbiehl/ghc
  • gridaphobe/ghc
  • trofi/ghc
  • supersven/ghc
  • ppk/ghc
  • ulysses4ever/ghc
  • AndreasK/ghc
  • ghuntley/ghc
  • shayne-fletcher-da/ghc
  • fgaz/ghc
  • yav/ghc
  • osa1/ghc
  • mbbx6spp/ghc
  • JulianLeviston/ghc
  • reactormonk/ghc
  • rae/ghc
  • takenobu-hs/ghc
  • michalt/ghc
  • andrewthad/ghc
  • hsyl20/ghc
  • scottgw/ghc
  • sjakobi/ghc
  • angerman/ghc
  • RyanGlScott/ghc
  • hvr/ghc
  • howtonotwin/ghc
  • chessai/ghc
  • m-renaud/ghc
  • brprice/ghc
  • stevehartdata/ghc
  • sighingnow/ghc
  • kgardas/ghc
  • ckoparkar/ghc
  • alp/ghc
  • smaeul/ghc
  • kakkun61/ghc
  • sykloid/ghc
  • newhoggy/ghc
  • toonn/ghc
  • nineonine/ghc
  • Phyx/ghc
  • ezyang/ghc
  • tweag/ghc
  • langston/ghc
  • ndmitchell/ghc
  • rockbmb/ghc
  • artempyanykh/ghc
  • mniip/ghc
  • mynguyenbmc/ghc
  • alexfmpe/ghc
  • crockeea/ghc
  • nh2/ghc
  • vaibhavsagar/ghc
  • phadej/ghc
  • Haskell-mouse/ghc
  • lolotp/ghc
  • spacekitteh/ghc
  • michaelpj/ghc
  • mgsloan/ghc
  • HPCohen/ghc
  • tmobile/ghc
  • radrow/ghc
  • simonmar/ghc
  • _deepfire/ghc
  • Ericson2314/ghc
  • leitao/ghc
  • fumieval/ghc
  • trac-isovector/ghc
  • cblp/ghc
  • xich/ghc
  • ciil/ghc
  • erthalion/ghc
  • xldenis/ghc
  • autotaker/ghc
  • haskell-wasm/ghc
  • kcsongor/ghc
  • agander/ghc
  • Baranowski/ghc
  • trac-dredozubov/ghc
  • 23Skidoo/ghc
  • iustin/ghc
  • ningning/ghc
  • josefs/ghc
  • kabuhr/ghc
  • gallais/ghc
  • dten/ghc
  • expipiplus1/ghc
  • Pluralia/ghc
  • rohanjr/ghc
  • intricate/ghc
  • kirelagin/ghc
  • Javran/ghc
  • DanielG/ghc
  • trac-mizunashi_mana/ghc
  • pparkkin/ghc
  • bollu/ghc
  • ntc2/ghc
  • jaspervdj/ghc
  • JoshMeredith/ghc
  • wz1000/ghc
  • zkourouma/ghc
  • code5hot/ghc
  • jdprice/ghc
  • tdammers/ghc
  • J-mie6/ghc
  • trac-lantti/ghc
  • ch1bo/ghc
  • cgohla/ghc
  • lucamolteni/ghc
  • acairncross/ghc
  • amerocu/ghc
  • chreekat/ghc
  • txsmith/ghc
  • trupill/ghc
  • typetetris/ghc
  • sergv/ghc
  • fryguybob/ghc
  • erikd/ghc
  • trac-roland/ghc
  • setupminimal/ghc
  • Friede80/ghc
  • SkyWriter/ghc
  • xplorld/ghc
  • abrar/ghc
  • obsidiansystems/ghc
  • Icelandjack/ghc
  • adinapoli/ghc
  • trac-matthewbauer/ghc
  • heatsink/ghc
  • dwijnand/ghc
  • Cmdv/ghc
  • alinab/ghc
  • pepeiborra/ghc
  • fommil/ghc
  • luochen1990/ghc
  • rlupton20/ghc
  • applePrincess/ghc
  • lehins/ghc
  • ronmrdechai/ghc
  • leeadam/ghc
  • harendra/ghc
  • mightymosquito1991/ghc
  • trac-gershomb/ghc
  • lucajulian/ghc
  • Rizary/ghc
  • VictorCMiraldo/ghc
  • jamesbrock/ghc
  • andrewdmeier/ghc
  • luke/ghc
  • pranaysashank/ghc
  • cocreature/ghc
  • hithroc/ghc
  • obreitwi/ghc
  • slrtbtfs/ghc
  • kaol/ghc
  • yairchu/ghc
  • Mathemagician98/ghc
  • trac-taylorfausak/ghc
  • leungbk/ghc
  • MichaWiedenmann/ghc
  • chris-martin/ghc
  • TDecki/ghc
  • adithyaov/ghc
  • trac-gelisam/ghc
  • Lysxia/ghc
  • complyue/ghc
  • bwignall/ghc
  • sternmull/ghc
  • sonika/ghc
  • leif/ghc
  • broadwaylamb/ghc
  • myszon/ghc
  • danbroooks/ghc
  • Mechachleopteryx/ghc
  • zardyh/ghc
  • trac-vdukhovni/ghc
  • OmarKhaledAbdo/ghc
  • arrowd/ghc
  • Bodigrim/ghc
  • matheus23/ghc
  • cardenaso11/ghc
  • trac-Athas/ghc
  • mb720/ghc
  • DylanZA/ghc
  • liff/ghc
  • typedrat/ghc
  • trac-claude/ghc
  • jbm/ghc
  • Gertjan423/ghc
  • PHO/ghc
  • JKTKops/ghc
  • kockahonza/ghc
  • msakai/ghc
  • Sir4ur0n/ghc
  • barambani/ghc
  • vishnu.c/ghc
  • dcoutts/ghc
  • trac-runeks/ghc
  • trac-MaxGabriel/ghc
  • lexi.lambda/ghc
  • strake/ghc
  • spavikevik/ghc
  • JakobBruenker/ghc
  • rmanne/ghc
  • gdziadkiewicz/ghc
  • ani/ghc
  • iliastsi/ghc
  • smunix/ghc
  • judah/ghc
  • blackgnezdo/ghc
  • emilypi/ghc
  • trac-bpfoley/ghc
  • muesli4/ghc
  • trac-gkaracha/ghc
  • Kleidukos/ghc
  • nek0/ghc
  • TristanCacqueray/ghc
  • dwulive/ghc
  • mbakke/ghc
  • arybczak/ghc
  • Yang123321/ghc
  • maksbotan/ghc
  • QuietMisdreavus/ghc
  • trac-olshanskydr/ghc
  • emekoi/ghc
  • samuela/ghc
  • josephcsible/ghc
  • dramforever/ghc
  • lpsmith/ghc
  • DenisFrezzato/ghc
  • michivi/ghc
  • jneira/ghc
  • jeffhappily/ghc
  • Ivan-Yudin/ghc
  • nakaji-dayo/ghc
  • gdevanla/ghc
  • galen/ghc
  • fendor/ghc
  • yaitskov/ghc
  • rcythr/ghc
  • awpr/ghc
  • jeremyschlatter/ghc
  • Aver1y/ghc
  • mitchellvitez/ghc
  • merijn/ghc
  • tomjaguarpaw1/ghc
  • trac-NoidedSuper/ghc
  • erewok/ghc
  • trac-junji.hashimoto/ghc
  • adamwespiser/ghc
  • bjaress/ghc
  • jhrcek/ghc
  • leonschoorl/ghc
  • lukasz-golebiewski/ghc
  • sheaf/ghc
  • last-g/ghc
  • carassius1014/ghc
  • eschwartz/ghc
  • dwincort/ghc
  • felixwiemuth/ghc
  • TimWSpence/ghc
  • marcusmonteirodesouza/ghc
  • WJWH/ghc
  • vtols/ghc
  • theobat/ghc
  • BinderDavid/ghc
  • ckoparkar0/ghc
  • alexander-kjeldaas/ghc
  • dme2/ghc
  • philderbeast/ghc
  • aaronallen8455/ghc
  • rayshih/ghc
  • benkard/ghc
  • mpardalos/ghc
  • saidelman/ghc
  • leiftw/ghc
  • ca333/ghc
  • bwroga/ghc
  • nmichael44/ghc
  • trac-crobbins/ghc
  • felixonmars/ghc
  • adityagupta1089/ghc
  • hgsipiere/ghc
  • treeowl/ghc
  • alexpeits/ghc
  • CraigFe/ghc
  • dnlkrgr/ghc
  • kerckhove_ts/ghc
  • cptwunderlich/ghc
  • eiais/ghc
  • hahohihu/ghc
  • sanchayan/ghc
  • lemmih/ghc
  • sehqlr/ghc
  • trac-dbeacham/ghc
  • luite/ghc
  • trac-f-a/ghc
  • vados/ghc
  • luntain/ghc
  • fatho/ghc
  • alexbiehl-gc/ghc
  • dcbdan/ghc
  • tvh/ghc
  • liam-ly/ghc
  • timbobbarnes/ghc
  • GovanifY/ghc
  • shanth2600/ghc
  • gliboc/ghc
  • duog/ghc
  • moxonsghost/ghc
  • zander/ghc
  • masaeedu/ghc
  • georgefst/ghc
  • guibou/ghc
  • nicuveo/ghc
  • mdebruijne/ghc
  • stjordanis/ghc
  • emiflake/ghc
  • wygulmage/ghc
  • frasertweedale/ghc
  • coot/ghc
  • aratamizuki/ghc
  • tsandstr/ghc
  • mrBliss/ghc
  • Anton-Latukha/ghc
  • tadfisher/ghc
  • vapourismo/ghc
  • Sorokin-Anton/ghc
  • basile-henry/ghc
  • trac-mightybyte/ghc
  • AbsoluteNikola/ghc
  • cobrien99/ghc
  • songzh/ghc
  • blamario/ghc
  • aj4ayushjain/ghc
  • trac-utdemir/ghc
  • tangcl/ghc
  • hdgarrood/ghc
  • maerwald/ghc
  • arjun/ghc
  • ratherforky/ghc
  • haskieLambda/ghc
  • EmilGedda/ghc
  • Bogicevic/ghc
  • eddiejessup/ghc
  • kozross/ghc
  • AlistairB/ghc
  • 3Rafal/ghc
  • christiaanb/ghc
  • trac-bit/ghc
  • matsumonkie/ghc
  • trac-parsonsmatt/ghc
  • chisui/ghc
  • jaro/ghc
  • trac-kmiyazato/ghc
  • davidsd/ghc
  • Tritlo/ghc
  • I-B-3/ghc
  • lykahb/ghc
  • AriFordsham/ghc
  • turion1/ghc
  • berberman/ghc
  • christiantakle/ghc
  • zyklotomic/ghc
  • trac-ocramz/ghc
  • CSEdd/ghc
  • doyougnu/ghc
  • mmhat/ghc
  • why-not-try-calmer/ghc
  • plutotulp/ghc
  • kjekac/ghc
  • Manvi07/ghc
  • teo/ghc
  • cactus/ghc
  • CarrieMY/ghc
  • abel/ghc
  • yihming/ghc
  • tsakki/ghc
  • jessicah/ghc
  • oliverbunting/ghc
  • meld/ghc
  • friedbrice/ghc
  • Joald/ghc
  • abarbu/ghc
  • DigitalBrains1/ghc
  • sterni/ghc
  • alexDarcy/ghc
  • hexchain/ghc
  • minimario/ghc
  • zliu41/ghc
  • tommd/ghc
  • jazcarate/ghc
  • peterbecich/ghc
  • alirezaghey/ghc
  • solomon/ghc
  • mikael.urankar/ghc
  • davjam/ghc
  • int-index/ghc
  • MorrowM/ghc
  • nrnrnr/ghc
  • Sonfamm/ghc-test-only
  • afzt1/ghc
  • nguyenhaibinh-tpc/ghc
  • trac-lierdakil/ghc
  • MichaWiedenmann1/ghc
  • jmorag/ghc
  • Ziharrk/ghc
  • trac-MitchellSalad/ghc
  • juampe/ghc
  • jwaldmann/ghc
  • snowleopard/ghc
  • juhp/ghc
  • normalcoder/ghc
  • ksqsf/ghc
  • trac-jberryman/ghc
  • roberth/ghc
  • 1ntEgr8/ghc
  • epworth/ghc
  • MrAdityaAlok/ghc
  • JunmingZhao42/ghc
  • jappeace/ghc
  • trac-Gabriel439/ghc
  • alt-romes/ghc
  • HugoPeters1024/ghc
  • 10ne1/ghc-fork
  • agentultra/ghc
  • Garfield1002/ghc
  • ChickenProp/ghc
  • clyring/ghc
  • MaxHearnden/ghc
  • jumper149/ghc
  • vem/ghc
  • ketzacoatl/ghc
  • Rosuavio/ghc
  • jackohughes/ghc
  • p4l1ly/ghc
  • konsumlamm/ghc
  • shlevy/ghc
  • torsten.schmits/ghc
  • andremarianiello/ghc
  • amesgen/ghc
  • googleson78/ghc
  • InfiniteVerma/ghc
  • uhbif19/ghc
  • yiyunliu/ghc
  • raehik/ghc
  • mrkun/ghc
  • telser/ghc
  • 1Jajen1/ghc
  • slotThe/ghc
  • WinstonHartnett/ghc
  • mpilgrem/ghc
  • dreamsmasher/ghc
  • schuelermine/ghc
  • trac-Viwor/ghc
  • undergroundquizscene/ghc
  • evertedsphere/ghc
  • coltenwebb/ghc
  • oberblastmeister/ghc
  • agrue/ghc
  • lf-/ghc
  • zacwood9/ghc
  • steshaw/ghc
  • high-cloud/ghc
  • SkamDart/ghc
  • PiDelport/ghc
  • maoif/ghc
  • RossPaterson/ghc
  • CharlesTaylor7/ghc
  • ribosomerocker/ghc
  • trac-ramirez7/ghc
  • daig/ghc
  • NicolasT/ghc
  • FinleyMcIlwaine/ghc
  • lawtonnichols/ghc
  • jmtd/ghc
  • ozkutuk/ghc
  • wildsebastian/ghc
  • lrzlin/ghc
  • tobias/ghc
  • fw/ghc
  • hawkinsw/ghc
  • type-dance/ghc
  • rui314/ghc
  • ocharles/ghc
  • wavewave/ghc
  • TheKK/ghc
  • nomeata/ghc
  • trac-csabahruska/ghc
  • jonathanjameswatson/ghc
  • L-as/ghc
  • Axman6/ghc
  • barracuda156/ghc
  • trac-jship/ghc
  • jake-87/ghc
  • meooow/ghc
  • rebeccat/ghc
  • hamana55/ghc
  • Enigmage/ghc
  • kokobd/ghc
  • agevelt/ghc
  • gshen42/ghc
  • chrismwendt/ghc
  • MangoIV/ghc
  • teto/ghc
  • Sookr1/ghc
  • trac-thomasjm/ghc
  • barci2/ghc-dev
  • trac-m4dc4p/ghc
  • dixonary/ghc
  • breakerzirconia/ghc
  • alexsio27444/ghc
  • glocq/ghc
  • sourabhxyz/ghc
  • ryantrinkle/ghc
  • Jade/ghc
  • scedfaliako/ghc
  • martijnbastiaan/ghc
  • trac-george.colpitts/ghc
  • ammarbinfaisal/ghc
  • mimi.vx/ghc
  • lortabac/ghc
  • trac-zyla/ghc
  • benbellick/ghc
  • aadaa-fgtaa/ghc
  • jvanbruegge/ghc
  • archbung/ghc
  • gilmi/ghc
  • mfonism/ghc
  • alex-mckenna/ghc
  • Ei30metry/ghc
  • DiegoDiverio/ghc
  • jorgecunhamendes/ghc
  • liesnikov/ghc
  • akrmn/ghc
  • trac-simplifierticks/ghc
  • jacco/ghc
  • rhendric/ghc
  • damhiya/ghc
  • ryndubei/ghc
  • DaveBarton/ghc
  • trac-Profpatsch/ghc
  • GZGavinZhao/ghc
  • ncfavier/ghc
  • jameshaydon/ghc
  • ajccosta/ghc
  • dschrempf/ghc
  • cydparser/ghc
  • LinuxUserGD/ghc
  • elodielander/ghc
  • facundominguez/ghc
  • psilospore/ghc
  • lachrimae/ghc
  • dylan-thinnes/ghc-type-errors-plugin
  • hamishmack/ghc
  • Leary/ghc
  • lzszt/ghc
  • lyokha/ghc
  • trac-glaubitz/ghc
  • Rewbert/ghc
  • andreabedini/ghc
  • Jasagredo/ghc
  • sol/ghc
  • OlegAlexander/ghc
  • trac-sthibaul/ghc
  • avdv/ghc
  • Wendaolee/ghc
  • ur4t/ghc
  • daylily/ghc
  • boltzmannrain/ghc
  • mmzk1526/ghc
  • trac-fizzixnerd/ghc
  • soulomoon/ghc
  • rwmjones/ghc
  • j14i/ghc
  • tracsis/ghc
  • gesh/ghc
  • flip101/ghc
  • eldritch-cookie/ghc
  • LemonjamesD/ghc
  • pgujjula/ghc
  • skeuchel/ghc
  • noteed/ghc
  • Torrekie/ghc
  • jlwoodwa/ghc
  • ayanamists/ghc
  • husong998/ghc
  • trac-edmundnoble/ghc
  • josephf/ghc
  • contrun/ghc
  • baulig/ghc
  • edsko/ghc
  • mzschr/ghc-issue-24732
  • ulidtko/ghc
  • Arsen/ghc
  • trac-sjoerd_visscher/ghc
  • crumbtoo/ghc
  • L0neGamer/ghc
  • DrewFenwick/ghc
  • benz0li/ghc
  • MaciejWas/ghc
  • jordanrule/ghc
  • trac-qqwy/ghc
  • LiamGoodacre/ghc
  • isomorpheme/ghc
  • trac-danidiaz/ghc
  • Kariim/ghc
  • taimoorzaeem/ghc
  • hololeap/ghc
  • ticat-fp/ghc
  • meritamen/ghc
  • criskell/ghc
  • trac-kraai/ghc
  • aergus/ghc
  • jdral/ghc
  • SamB/ghc
  • Tristian/ghc
  • ywgrit/ghc
  • KatsuPatrick/ghc
  • OsePedro/ghc
  • mpscholten/ghc
  • zaquest/ghc
  • fangyi-zhou/ghc
  • augyg/ghc
  • rkirkman/ghc
  • gulin.serge/ghc-windows-aarch64-bootstrap
  • iris/ghc
  • kwxm/ghc
  • maralorn/ghc
  • rafl/ghc
  • nikshalark/ghc
  • mrcjkb/ghc
  • blackheaven/ghc
  • laurenyim/ghc
  • bolt12/ghc
  • Xitian9/ghc
  • wenkokke/ghc
  • kephas/ghc
  • rmullanix/ghc
  • GunpowderGuy/ghc
  • I_I/ghc
  • leana8959/ghc
  • zlonast/ghc
  • jryans/ghc
657 results
Show changes
Showing
with 4744 additions and 76 deletions
...@@ -80,7 +80,6 @@ module Util ( ...@@ -80,7 +80,6 @@ module Util (
maybeRead, maybeReadFuzzy, maybeRead, maybeReadFuzzy,
-- * IO-ish utilities -- * IO-ish utilities
createDirectoryHierarchy,
doesDirNameExist, doesDirNameExist,
modificationTimeIfExists, modificationTimeIfExists,
...@@ -114,10 +113,9 @@ import Data.List hiding (group) ...@@ -114,10 +113,9 @@ import Data.List hiding (group)
import FastTypes import FastTypes
#endif #endif
import Control.Monad ( unless, liftM ) import Control.Monad ( liftM )
import System.IO.Error as IO ( isDoesNotExistError ) import System.IO.Error as IO ( isDoesNotExistError )
import System.Directory ( doesDirectoryExist, createDirectory, import System.Directory ( doesDirectoryExist, getModificationTime )
getModificationTime )
import System.FilePath import System.FilePath
import System.Time ( ClockTime ) import System.Time ( ClockTime )
...@@ -1017,16 +1015,6 @@ maybeReadFuzzy str = case reads str of ...@@ -1017,16 +1015,6 @@ maybeReadFuzzy str = case reads str of
_ -> _ ->
Nothing Nothing
-----------------------------------------------------------------------------
-- Create a hierarchy of directories
createDirectoryHierarchy :: FilePath -> IO ()
createDirectoryHierarchy dir | isDrive dir = return () -- XXX Hack
createDirectoryHierarchy dir = do
b <- doesDirectoryExist dir
unless b $ do createDirectoryHierarchy (takeDirectory dir)
createDirectory dir
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
-- Verify that the 'dirname' portion of a FilePath exists. -- Verify that the 'dirname' portion of a FilePath exists.
-- --
......
...@@ -218,15 +218,23 @@ vectTopBind b@(Rec bs) ...@@ -218,15 +218,23 @@ vectTopBind b@(Rec bs)
-- Add a vectorised binding to an imported top-level variable that has a VECTORISE [SCALAR] pragma -- Add a vectorised binding to an imported top-level variable that has a VECTORISE [SCALAR] pragma
-- in this module. -- in this module.
-- --
-- RESTIRCTION: Currently, we cannot use the pragma vor mutually recursive definitions.
--
vectImpBind :: Id -> VM CoreBind vectImpBind :: Id -> VM CoreBind
vectImpBind var vectImpBind var
= do { -- Vectorise the right-hand side, create an appropriate top-level binding and add it = do { -- Vectorise the right-hand side, create an appropriate top-level binding and add it
-- to the vectorisation map. For the non-lifted version, we refer to the original -- to the vectorisation map. For the non-lifted version, we refer to the original
-- definition — i.e., 'Var var'. -- definition — i.e., 'Var var'.
; (inline, isScalar, expr') <- vectTopRhs [] var (Var var) -- NB: To support recursive definitions, we tie a lazy knot.
; var' <- vectTopBinder var inline expr' ; (var', _, expr') <- fixV $
; when isScalar $ \ ~(_, inline, rhs) ->
addGlobalScalarVar var do { var' <- vectTopBinder var inline rhs
; (inline, isScalar, expr') <- vectTopRhs [] var (Var var)
; when isScalar $
addGlobalScalarVar var
; return (var', inline, expr')
}
-- We add any newly created hoisted top-level bindings. -- We add any newly created hoisted top-level bindings.
; hs <- takeHoisted ; hs <- takeHoisted
......
-- Types and functions declared in 'Data.Array.Parallel.Prim' and used by the vectoriser. -- Types and functions declared in 'Data.Array.Parallel.Prim' and used by the vectoriser.
-- --
-- The @Builtins@ structure holds the name of all the things in 'Data.Array.Parallel.Prim' that appear in -- The @Builtins@ structure holds the name of all the things in 'Data.Array.Parallel.Prim' that
-- code generated by the vectoriser. -- appear in code generated by the vectoriser.
module Vectorise.Builtins ( module Vectorise.Builtins (
-- * Restrictions
mAX_DPH_SCALAR_ARGS,
-- * Builtins -- * Builtins
Builtins(..), Builtins(..),
......
...@@ -98,6 +98,9 @@ data GlobalEnv ...@@ -98,6 +98,9 @@ data GlobalEnv
-- *without* a right-hand side in the current or an imported module as well as type -- *without* a right-hand side in the current or an imported module as well as type
-- constructors that are automatically identified as scalar by the vectoriser (in -- constructors that are automatically identified as scalar by the vectoriser (in
-- 'Vectorise.Type.Env'). Scalar code may only operate on such data. -- 'Vectorise.Type.Env'). Scalar code may only operate on such data.
--
-- NB: Not all type constructors in that set are members of the 'Scalar' type class
-- (which can be trivially marshalled across scalar code boundaries).
, global_novect_vars :: VarSet , global_novect_vars :: VarSet
-- ^Variables that are not vectorised. (They may be referenced in the right-hand sides -- ^Variables that are not vectorised. (They may be referenced in the right-hand sides
......
...@@ -32,6 +32,7 @@ import DataCon ...@@ -32,6 +32,7 @@ import DataCon
import TyCon import TyCon
import TcType import TcType
import Type import Type
import PrelNames
import NameSet import NameSet
import Var import Var
import VarEnv import VarEnv
...@@ -311,11 +312,15 @@ vectDictExpr (Type ty) ...@@ -311,11 +312,15 @@ vectDictExpr (Type ty)
vectDictExpr (Coercion coe) vectDictExpr (Coercion coe)
= pprSorry "Vectorise.Exp.vectDictExpr: coercion" (ppr coe) = pprSorry "Vectorise.Exp.vectDictExpr: coercion" (ppr coe)
-- |Vectorise an expression of functional type, where all arguments and the result are of scalar -- |Vectorise an expression of functional type, where all arguments and the result are of primitive
-- type (i.e., 'Int', 'Float', 'Double' etc.) and which does not contain any subcomputations that -- types (i.e., 'Int', 'Float', 'Double' etc., which have instances of the 'Scalar' type class) and
-- involve parallel arrays. Such functionals do not requires the full blown vectorisation -- which does not contain any subcomputations that involve parallel arrays. Such functionals do not
-- transformation; instead, they can be lifted by application of a member of the zipWith family -- requires the full blown vectorisation transformation; instead, they can be lifted by application
-- (i.e., 'map', 'zipWith', zipWith3', etc.) -- of a member of the zipWith family (i.e., 'map', 'zipWith', zipWith3', etc.)
--
-- Dictionary functions are also scalar functions (as dictionaries themselves are not vectorised,
-- instead they become dictionaries of vectorised methods). We treat them differently, though see
-- "Note [Scalar dfuns]" in 'Vectorise'.
-- --
vectScalarFun :: Bool -- ^ Was the function marked as scalar by the user? vectScalarFun :: Bool -- ^ Was the function marked as scalar by the user?
-> [Var] -- ^ Functions names in same recursive binding group -> [Var] -- ^ Functions names in same recursive binding group
...@@ -328,19 +333,35 @@ vectScalarFun forceScalar recFns expr ...@@ -328,19 +333,35 @@ vectScalarFun forceScalar recFns expr
(arg_tys, res_ty) = splitFunTys (exprType expr) (arg_tys, res_ty) = splitFunTys (exprType expr)
; MASSERT( not $ null arg_tys ) ; MASSERT( not $ null arg_tys )
; onlyIfV (ptext (sLit "not a scalar function")) ; onlyIfV (ptext (sLit "not a scalar function"))
(forceScalar -- user asserts the functions is scalar (forceScalar -- user asserts the functions is scalar
|| ||
all (is_scalar_ty scalarTyCons) arg_tys -- check whether the function is scalar all is_primitive_ty arg_tys -- check whether the function is scalar
&& is_scalar_ty scalarTyCons res_ty && is_primitive_ty res_ty
&& is_scalar scalarVars (is_scalar_ty scalarTyCons) expr && is_scalar scalarVars (is_scalar_ty scalarTyCons) expr
&& uses scalarVars expr) && uses scalarVars expr
&& length arg_tys <= mAX_DPH_SCALAR_ARGS)
$ mkScalarFun arg_tys res_ty expr $ mkScalarFun arg_tys res_ty expr
} }
where where
-- !!!FIXME: We would like to allow scalar functions with arguments and results that can be
-- any 'scalarTyCons', but can't at the moment, as those argument and result types
-- need to be members of the 'Scalar' class (that in its current form would better
-- be called 'Primitive'). *ALSO* the hardcoded list of types is ugly!
is_primitive_ty ty
| isPredTy ty -- dictionaries never get into the environment
= True
| Just (tycon, _) <- splitTyConApp_maybe ty
= tyConName tycon `elem` [boolTyConName, intTyConName, word8TyConName, doubleTyConName]
| otherwise
= False
is_scalar_ty scalarTyCons ty is_scalar_ty scalarTyCons ty
| isPredTy ty -- dictionaries never get into the environment
= True
| Just (tycon, _) <- splitTyConApp_maybe ty | Just (tycon, _) <- splitTyConApp_maybe ty
= tyConName tycon `elemNameSet` scalarTyCons = tyConName tycon `elemNameSet` scalarTyCons
| otherwise = False | otherwise
= False
-- Checks whether an expression contain a non-scalar subexpression. -- Checks whether an expression contain a non-scalar subexpression.
-- --
...@@ -416,15 +437,27 @@ vectScalarFun forceScalar recFns expr ...@@ -416,15 +437,27 @@ vectScalarFun forceScalar recFns expr
uses_alt funs (_, _bs, e) = uses funs e uses_alt funs (_, _bs, e) = uses funs e
-- Generate code for a scalar function by generating a scalar closure. If the function is a
-- dictionary function, vectorise it as dictionary code.
--
mkScalarFun :: [Type] -> Type -> CoreExpr -> VM VExpr mkScalarFun :: [Type] -> Type -> CoreExpr -> VM VExpr
mkScalarFun arg_tys res_ty expr mkScalarFun arg_tys res_ty expr
= do { fn_var <- hoistExpr (fsLit "fn") expr DontInline | isPredTy res_ty
= do { vExpr <- vectDictExpr expr
; return (vExpr, unused)
}
| otherwise
= do { traceVt "mkScalarFun: " $ ppr expr $$ ptext (sLit " ::") <+> ppr (mkFunTys arg_tys res_ty)
; fn_var <- hoistExpr (fsLit "fn") expr DontInline
; zipf <- zipScalars arg_tys res_ty ; zipf <- zipScalars arg_tys res_ty
; clo <- scalarClosure arg_tys res_ty (Var fn_var) (zipf `App` Var fn_var) ; clo <- scalarClosure arg_tys res_ty (Var fn_var) (zipf `App` Var fn_var)
; clo_var <- hoistExpr (fsLit "clo") clo DontInline ; clo_var <- hoistExpr (fsLit "clo") clo DontInline
; lclo <- liftPD (Var clo_var) ; lclo <- liftPD (Var clo_var)
; return (Var clo_var, lclo) ; return (Var clo_var, lclo)
} }
where
unused = error "Vectorise.Exp.mkScalarFun: we don't lift dictionary expressions"
-- |Vectorise a dictionary function that has a 'VECTORISE SCALAR instance' pragma. -- |Vectorise a dictionary function that has a 'VECTORISE SCALAR instance' pragma.
-- --
......
...@@ -54,12 +54,12 @@ initV :: HscEnv ...@@ -54,12 +54,12 @@ initV :: HscEnv
-> VM a -> VM a
-> IO (Maybe (VectInfo, a)) -> IO (Maybe (VectInfo, a))
initV hsc_env guts info thing_inside initV hsc_env guts info thing_inside
= do { = do { dumpIfVtTrace "Incoming VectInfo" (ppr info)
let type_env = typeEnvFromEntities ids (mg_tcs guts) (mg_fam_insts guts)
; let type_env = typeEnvFromEntities ids (mg_tcs guts) (mg_fam_insts guts)
; (_, Just res) <- initDs hsc_env (mg_module guts) ; (_, Just res) <- initDs hsc_env (mg_module guts)
(mg_rdr_env guts) type_env go (mg_rdr_env guts) type_env go
; dumpIfVtTrace "Incoming VectInfo" (ppr info)
; case res of ; case res of
Nothing Nothing
-> dumpIfVtTrace "Vectorisation FAILED!" empty -> dumpIfVtTrace "Vectorisation FAILED!" empty
......
...@@ -16,7 +16,7 @@ module Vectorise.Monad.Global ( ...@@ -16,7 +16,7 @@ module Vectorise.Monad.Global (
-- * TyCons -- * TyCons
lookupTyCon, lookupTyCon,
defTyCon, globalVectTyCons, defTyConName, defTyCon, globalVectTyCons,
-- * Datacons -- * Datacons
lookupDataCon, lookupDataCon,
...@@ -136,9 +136,13 @@ lookupTyCon tc ...@@ -136,9 +136,13 @@ lookupTyCon tc
-- |Add a mapping between plain and vectorised `TyCon`s to the global environment. -- |Add a mapping between plain and vectorised `TyCon`s to the global environment.
-- --
defTyCon :: TyCon -> TyCon -> VM () -- The second argument is only to enable tracing for (mutually) recursively defined type
defTyCon tc tc' -- constructors, where we /must not/ pull at the vectorised type constructors (because that would
= do { traceVt "add global tycon mapping:" (ppr tc <+> text "-->" <+> ppr tc') -- pull too early at the recursive knot).
--
defTyConName :: TyCon -> Name -> TyCon -> VM ()
defTyConName tc nameOfTc' tc'
= do { traceVt "add global tycon mapping:" (ppr tc <+> text "-->" <+> ppr nameOfTc')
-- check for duplicate vectorisation -- check for duplicate vectorisation
; currentDef <- readGEnv $ \env -> lookupNameEnv (global_tycons env) (tyConName tc) ; currentDef <- readGEnv $ \env -> lookupNameEnv (global_tycons env) (tyConName tc)
...@@ -158,6 +162,11 @@ defTyCon tc tc' ...@@ -158,6 +162,11 @@ defTyCon tc tc'
| otherwise | otherwise
= ptext (sLit "in the current module") = ptext (sLit "in the current module")
-- |Add a mapping between plain and vectorised `TyCon`s to the global environment.
--
defTyCon :: TyCon -> TyCon -> VM ()
defTyCon tc tc' = defTyConName tc (tyConName tc') tc'
-- |Get the set of all vectorised type constructors. -- |Get the set of all vectorised type constructors.
-- --
globalVectTyCons :: VM (NameEnv TyCon) globalVectTyCons :: VM (NameEnv TyCon)
......
...@@ -23,6 +23,7 @@ import DataCon ...@@ -23,6 +23,7 @@ import DataCon
import TyCon import TyCon
import TypeRep import TypeRep
import Type import Type
import PrelNames
import Digraph import Digraph
...@@ -54,14 +55,21 @@ classifyTyCons convStatus tcs = classify [] [] [] convStatus (tyConGroups tcs) ...@@ -54,14 +55,21 @@ classifyTyCons convStatus tcs = classify [] [] [] convStatus (tyConGroups tcs)
where where
refs = ds `delListFromUniqSet` tcs refs = ds `delListFromUniqSet` tcs
can_convert = isNullUFM (refs `minusUFM` cs) && all convertable tcs can_convert = (isNullUFM (refs `minusUFM` cs) && all convertable tcs)
|| isShowClass tcs
must_convert = foldUFM (||) False (intersectUFM_C const cs refs) must_convert = foldUFM (||) False (intersectUFM_C const cs refs)
&& (not . isShowClass $ tcs)
-- We currently admit Haskell 2011-style data and newtype declarations as well as type -- We currently admit Haskell 2011-style data and newtype declarations as well as type
-- constructors representing classes. -- constructors representing classes.
convertable tc convertable tc
= (isDataTyCon tc || isNewTyCon tc) && all isVanillaDataCon (tyConDataCons tc) = (isDataTyCon tc || isNewTyCon tc) && all isVanillaDataCon (tyConDataCons tc)
|| isClassTyCon tc || isClassTyCon tc
-- !!!FIXME: currently we allow 'Show' in vectorised code without actually providing a
-- vectorised definition (to be able to vectorise 'Num')
isShowClass [tc] = tyConName tc == showClassName
isShowClass _ = False
-- Used to group type constructors into mutually dependent groups. -- Used to group type constructors into mutually dependent groups.
-- --
......
...@@ -147,14 +147,6 @@ vectTypeEnv :: [TyCon] -- Type constructors defined in this mod ...@@ -147,14 +147,6 @@ vectTypeEnv :: [TyCon] -- Type constructors defined in this mod
vectTypeEnv tycons vectTypeDecls vectClassDecls vectTypeEnv tycons vectTypeDecls vectClassDecls
= do { traceVt "** vectTypeEnv" $ ppr tycons = do { traceVt "** vectTypeEnv" $ ppr tycons
-- Build a map containing all vectorised type constructor. If they are scalar, they are
-- mapped to 'False' (vectorised type constructor == original type constructor).
; allScalarTyConNames <- globalScalarTyCons -- covers both current and imported modules
; vectTyCons <- globalVectTyCons
; let vectTyConBase = mapNameEnv (const True) vectTyCons -- by default fully vectorised
vectTyConFlavour = foldNameSet (\n env -> extendNameEnv env n False) vectTyConBase
allScalarTyConNames
; let -- {-# VECTORISE SCALAR type T -#} (imported and local tycons) ; let -- {-# VECTORISE SCALAR type T -#} (imported and local tycons)
localAbstractTyCons = [tycon | VectType True tycon Nothing <- vectTypeDecls] localAbstractTyCons = [tycon | VectType True tycon Nothing <- vectTypeDecls]
...@@ -172,6 +164,23 @@ vectTypeEnv tycons vectTypeDecls vectClassDecls ...@@ -172,6 +164,23 @@ vectTypeEnv tycons vectTypeDecls vectClassDecls
localAbstractTyCons ++ map fst3 vectTyConsWithRHS localAbstractTyCons ++ map fst3 vectTyConsWithRHS
notVectSpecialTyCon tc = not $ (tyConName tc) `elemNameSet` vectSpecialTyConNames notVectSpecialTyCon tc = not $ (tyConName tc) `elemNameSet` vectSpecialTyConNames
-- Build a map containing all vectorised type constructor. If they are scalar, they are
-- mapped to 'False' (vectorised type constructor == original type constructor).
; allScalarTyConNames <- globalScalarTyCons -- covers both current and imported modules
; vectTyCons <- globalVectTyCons
; let vectTyConBase = mapNameEnv (const True) vectTyCons -- by default fully vectorised
vectTyConFlavour = vectTyConBase
`plusNameEnv`
mkNameEnv [ (tyConName tycon, True)
| (tycon, _, _) <- vectTyConsWithRHS]
`plusNameEnv`
mkNameEnv [ (tcName, False) -- original representation
| tcName <- nameSetToList allScalarTyConNames]
`plusNameEnv`
mkNameEnv [ (tyConName tycon, False) -- original representation
| tycon <- localAbstractTyCons]
-- Split the list of 'TyCons' into the ones (1) that we must vectorise and those (2) -- Split the list of 'TyCons' into the ones (1) that we must vectorise and those (2)
-- that we could, but don't need to vectorise. Type constructors that are not data -- that we could, but don't need to vectorise. Type constructors that are not data
-- type constructors or use non-Haskell98 features are being dropped. They may not -- type constructors or use non-Haskell98 features are being dropped. They may not
...@@ -219,6 +228,12 @@ vectTypeEnv tycons vectTypeDecls vectClassDecls ...@@ -219,6 +228,12 @@ vectTypeEnv tycons vectTypeDecls vectClassDecls
-- Vectorise all the data type declarations that we can and must vectorise (enter the -- Vectorise all the data type declarations that we can and must vectorise (enter the
-- type and data constructors into the vectorisation map on-the-fly.) -- type and data constructors into the vectorisation map on-the-fly.)
; new_tcs <- vectTyConDecls conv_tcs ; new_tcs <- vectTyConDecls conv_tcs
; let dumpTc tc vTc = traceVt "---" (ppr tc <+> text "::" <+> ppr (dataConSig tc) $$
ppr vTc <+> text "::" <+> ppr (dataConSig vTc))
dataConSig tc | Just dc <- tyConSingleDataCon_maybe tc = dataConRepType dc
| otherwise = panic "dataConSig"
; zipWithM_ dumpTc (filter isClassTyCon conv_tcs) (filter isClassTyCon new_tcs)
-- We don't need new representation types for dictionary constructors. The constructors -- We don't need new representation types for dictionary constructors. The constructors
-- are always fully applied, and we don't need to lift them to arrays as a dictionary -- are always fully applied, and we don't need to lift them to arrays as a dictionary
......
...@@ -22,23 +22,21 @@ import Control.Monad ...@@ -22,23 +22,21 @@ import Control.Monad
-- --
vectTyConDecls :: [TyCon] -> VM [TyCon] vectTyConDecls :: [TyCon] -> VM [TyCon]
vectTyConDecls tcs = fixV $ \tcs' -> vectTyConDecls tcs = fixV $ \tcs' ->
do { mapM_ (uncurry defTyCon) (zipLazy tcs tcs') do { names' <- mapM (mkLocalisedName mkVectTyConOcc . tyConName) tcs
; mapM vectTyConDecl tcs ; mapM_ (uncurry (uncurry defTyConName)) (tcs `zip` names' `zipLazy` tcs')
; zipWithM vectTyConDecl tcs names'
} }
-- |Vectorise a single type constructor. -- |Vectorise a single type constructor.
-- --
vectTyConDecl :: TyCon -> VM TyCon vectTyConDecl :: TyCon -> Name -> VM TyCon
vectTyConDecl tycon vectTyConDecl tycon name'
-- Type constructor representing a type class -- Type constructor representing a type class
| Just cls <- tyConClass_maybe tycon | Just cls <- tyConClass_maybe tycon
= do { unless (null $ classATs cls) $ = do { unless (null $ classATs cls) $
cantVectorise "Associated types are not yet supported" (ppr cls) cantVectorise "Associated types are not yet supported" (ppr cls)
-- make the name of the vectorised class tycon: "Class" --> "V:Class"
; name' <- mkLocalisedName mkVectTyConOcc (tyConName tycon)
-- vectorise superclass constraint (types) -- vectorise superclass constraint (types)
; theta' <- mapM vectType (classSCTheta cls) ; theta' <- mapM vectType (classSCTheta cls)
...@@ -87,9 +85,6 @@ vectTyConDecl tycon ...@@ -87,9 +85,6 @@ vectTyConDecl tycon
= do { unless (all isVanillaDataCon (tyConDataCons tycon)) $ = do { unless (all isVanillaDataCon (tyConDataCons tycon)) $
cantVectorise "Currently only Haskell 2011 datatypes are supported" (ppr tycon) cantVectorise "Currently only Haskell 2011 datatypes are supported" (ppr tycon)
-- make the name of the vectorised class tycon
; name' <- mkLocalisedName mkVectTyConOcc (tyConName tycon)
-- vectorise the data constructor of the class tycon -- vectorise the data constructor of the class tycon
; rhs' <- vectAlgTyConRhs tycon (algTyConRhs tycon) ; rhs' <- vectAlgTyConRhs tycon (algTyConRhs tycon)
......
...@@ -13,7 +13,7 @@ dnl ...@@ -13,7 +13,7 @@ dnl
# see what flags are available. (Better yet, read the documentation!) # see what flags are available. (Better yet, read the documentation!)
# #
AC_INIT([The Glorious Glasgow Haskell Compilation System], [7.3], [glasgow-haskell-bugs@haskell.org], [ghc]) AC_INIT([The Glorious Glasgow Haskell Compilation System], [7.4.1], [glasgow-haskell-bugs@haskell.org], [ghc])
# Set this to YES for a released version, otherwise NO # Set this to YES for a released version, otherwise NO
: ${RELEASE=NO} : ${RELEASE=NO}
...@@ -456,8 +456,6 @@ dnl May need to use gcc to find platform details. ...@@ -456,8 +456,6 @@ dnl May need to use gcc to find platform details.
dnl -------------------------------------------------------------- dnl --------------------------------------------------------------
FPTOOLS_SET_HASKELL_PLATFORM_VARS FPTOOLS_SET_HASKELL_PLATFORM_VARS
FP_SETTINGS
dnl ** figure out how to do context diffs dnl ** figure out how to do context diffs
FP_PROG_CONTEXT_DIFF FP_PROG_CONTEXT_DIFF
...@@ -477,6 +475,7 @@ FP_PROG_AR_NEEDS_RANLIB ...@@ -477,6 +475,7 @@ FP_PROG_AR_NEEDS_RANLIB
dnl ** Check to see whether ln -s works dnl ** Check to see whether ln -s works
AC_PROG_LN_S AC_PROG_LN_S
FP_SETTINGS
dnl ** Find the path to sed dnl ** Find the path to sed
AC_PATH_PROGS(SedCmd,gsed sed,sed) AC_PATH_PROGS(SedCmd,gsed sed,sed)
...@@ -576,6 +575,10 @@ fi ...@@ -576,6 +575,10 @@ fi
AC_CHECK_SIZEOF(unsigned short, 2) AC_CHECK_SIZEOF(unsigned short, 2)
AC_CHECK_SIZEOF(void *, 4) AC_CHECK_SIZEOF(void *, 4)
dnl for use in settings.in
WordSize=$ac_cv_sizeof_void_p
AC_SUBST(WordSize)
dnl ** what are alignment constraints on various types dnl ** what are alignment constraints on various types
FP_CHECK_ALIGNMENT(char) FP_CHECK_ALIGNMENT(char)
FP_CHECK_ALIGNMENT(double) FP_CHECK_ALIGNMENT(double)
......
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "case \"$ACTION\" in clean) rm -rf \"$GHC_UNPACKS_INTO\" ;; build) tar -jxf \"$BINDIST\" && cd \"$GHC_UNPACKS_INTO\" && ./configure --prefix=\"$INSTALL_PATH/$CONTENTS_FOLDER_PATH/usr\" ;; install) cd \"$GHC_UNPACKS_INTO\" && make install DESTDIR=\"$DSTROOT\" ;; *) echo \"Unknown action $ACTION\" >&2 ; exit 1 ;; esac "; shellScript = "case \"$ACTION\" in clean) rm -rf \"$GHC_UNPACKS_INTO\" ;; build) tar -jxf \"$BINDIST\" && cd \"$GHC_UNPACKS_INTO\" && ./configure --prefix=\"$INSTALL_PATH/$CONTENTS_FOLDER_PATH/usr\" --with-gcc=/usr/bin/gcc --with-gcc-4.2=/usr/bin/gcc ;; install) cd \"$GHC_UNPACKS_INTO\" && make install DESTDIR=\"$DSTROOT\" ;; *) echo \"Unknown action $ACTION\" >&2 ; exit 1 ;; esac ";
}; };
E76B00450D52DFDB00A05A2F /* ShellScript */ = { E76B00450D52DFDB00A05A2F /* ShellScript */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
......
...@@ -88,13 +88,18 @@ dnl May need to use gcc to find platform details. ...@@ -88,13 +88,18 @@ dnl May need to use gcc to find platform details.
dnl -------------------------------------------------------------- dnl --------------------------------------------------------------
FPTOOLS_SET_HASKELL_PLATFORM_VARS FPTOOLS_SET_HASKELL_PLATFORM_VARS
FP_SETTINGS dnl WordSize for settings.in
AC_CHECK_SIZEOF(void *, 4)
WordSize=$ac_cv_sizeof_void_p
AC_SUBST(WordSize)
# #
dnl ** how to invoke `ar' and `ranlib' dnl ** how to invoke `ar' and `ranlib'
# #
FP_PROG_AR_NEEDS_RANLIB FP_PROG_AR_NEEDS_RANLIB
FP_SETTINGS
# #
AC_CONFIG_FILES(settings mk/config.mk mk/install.mk) AC_CONFIG_FILES(settings mk/config.mk mk/install.mk)
AC_OUTPUT AC_OUTPUT
......
This diff is collapsed.
<?xml version="1.0" encoding="iso-8859-1"?>
<sect1 id="release-7-2-2">
<title>Release notes for version 7.2.2</title>
<para>
The 7.2.2 release is a bugfix release. The changes relative to 7.2.1
are listed below. The 7.2 branch is intended to be more of a
"technology preview" than normal GHC stable branches.
</para>
<itemizedlist>
<listitem>
<para>
All packages are now trusted by default. If you wish to make use
of Safe Haskell, you will need to manually untrust packages that
you do not wish to trust.
</para>
</listitem>
<listitem>
<para>
An optimiser bug
(<ulink url="http://hackage.haskell.org/trac/ghc/ticket/5453">#5453</ulink>)
which can cause segfaults has been fixed.
</para>
</listitem>
<listitem>
<para>
A native code generator bug
(<ulink url="http://hackage.haskell.org/trac/ghc/ticket/5393">#5393</ulink>)
which can cause segfaults on x86 and
amd64 has been fixed.
</para>
</listitem>
<listitem>
<para>
A race condition in the runtime system
(<ulink url="http://hackage.haskell.org/trac/ghc/ticket/5552">#5552</ulink>)
that can cause segfaults
has been fixed.
</para>
</listitem>
<listitem>
<para>
Exception handlers are now run in the <literal>mask</literal>
state, rather than the <literal>maskUninterruptible</literal>
state. Fixes a bug that could cause the GHCi debugger to hang
(<ulink url="http://hackage.haskell.org/trac/ghc/ticket/4988">#4988</ulink>),
amongst other things.
</para>
</listitem>
<listitem>
<para>
The <literal>shutdownHaskellAndExit</literal> function now
immediately exits, even if <literal>hs_init</literal> has
been called multiple times.
</para>
</listitem>
<listitem>
<para>
A bug arising when using type signature declarations in
Template Haskell splices
(<ulink url="http://hackage.haskell.org/trac/ghc/ticket/5404">#5404</ulink>)
has been fixed.
</para>
</listitem>
<listitem>
<para>
A bug arising when using class instances in
Template Haskell splices
(<ulink url="http://hackage.haskell.org/trac/ghc/ticket/5410">#5410</ulink>)
has been fixed.
</para>
</listitem>
<listitem>
<para>
Incorrectly encoded text at the end of a file is now handled
correctly
(<ulink url="http://hackage.haskell.org/trac/ghc/ticket/5436">#5436</ulink>).
</para>
</listitem>
<listitem>
<para>
The base package is now version 4.4.1.0 (was 4.4.0.0).
</para>
</listitem>
<listitem>
<para>
Haddock is now version 2.9.4.
</para>
</listitem>
</itemizedlist>
</sect1>
This diff is collapsed.
<?xml version="1.0" encoding="iso-8859-1"?>
<sect1 id="release-7-4-2">
<title>Release notes for version 7.4.2</title>
<para>
The 7.4.2 release is a bugfix release. The changes relative to 7.4.1 are
listed below.
</para>
<sect2>
<title>Compiler</title>
<itemizedlist>
<listitem>
<para>
A bug in dependency analysis of type declarations in the presence of
type families (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5826">#5826</ulink>)
has been fixed.
</para>
</listitem>
<listitem>
<para>
The "Heap exhausted" error message was truncating the reported heap
size to 32 bits (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5838">#5838</ulink>).
This has now been fixed.
</para>
</listitem>
<listitem>
<para>
The register clobber list in the ARM runtime now includes extra
registers (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5824">#5824</ulink>).
</para>
</listitem>
<listitem>
<para>
A crash due to a buffer overflow during RTS argument processing
(<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5851">#5851</ulink>)
has been fixed.
</para>
</listitem>
<listitem>
<para>
A blocked STM computation inside <literal>unsafePerformIO</literal>
or <literal>unsafeInterleaveIO</literal> would segfault when resuming
after an asynchronous exception (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5866">#5866</ulink>).
This has now been fixed.
</para>
</listitem>
<listitem>
<para>
A race condition when creating directories during parallel builds
(<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5891">#5891</ulink>)
has been fixed.
</para>
</listitem>
<listitem>
<para>
Changed behavior of the <literal>--main-is</literal> flag so that it
forces recompilation of fewer modules (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5878">#5878</ulink>).
</para>
</listitem>
<listitem>
<para>
The wording of the help text for the <literal>-N</literal> flag has
been improved (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5896">#5896</ulink>).
</para>
</listitem>
<listitem>
<para>
Fixed command line options passed to <literal>clang</literal>, when
used as the assembler (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5903">#5903</ulink>).
</para>
</listitem>
<listitem>
<para>
Changed behavior of unrecognized flags (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5921">#5921</ulink>).
Any unrecognized argument starting with a <literal>'-'</literal> now produces an
error, instead of being passed to the linker.
</para>
</listitem>
<listitem>
<para>
A bug in code generation on PowerPC (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5900">#5900</ulink>)
resulting in an invalid operand for a shift instruction has been
fixed.
</para>
</listitem>
<listitem>
<para>
Updated LLVM backend to support the new "fence" instruction instead
of the llvm.memory.barrier intrinsic (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5814">#5814</ulink>).
</para>
</listitem>
<listitem>
<para>
ARM support in the RTS linker (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5839">#5839</ulink>)
has been implemented.
</para>
</listitem>
<listitem>
<para>
An RTS crash in <literal>threadStackOverflow</literal> (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5214">#5214</ulink>)
has been fixed.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2>
<title>GHCi</title>
<itemizedlist>
<listitem>
<para>
Fixed bug (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5836">#5836</ulink>)
where GHCi would silently accept an import statement for a
non-existing module.
</para>
</listitem>
<listitem>
<para>
Fixed bug (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5904">#5904</ulink>)
which caused GHCi to crash when a *-module was loaded twice.
</para>
</listitem>
<listitem>
<para>
The <literal>:edit</literal> command in GHCi now causes the current
module to be automatically reloaded after exiting from the editor
(<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5343">#5343</ulink>).
</para>
</listitem>
<listitem>
<para>
A GHCi bug (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5534">#5534</ulink>)
causing compiled modules not to be loaded correctly has been fixed.
</para>
</listitem>
<listitem>
<para>
Fixed bug (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5979">#5979</ulink>)
where a failed import in GHCi with -XPackageImport would cause
successive imports to fail.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2>
<title>Libraries</title>
<itemizedlist>
<listitem>
<para>
Fixed bug (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5872">#5872</ulink>)
in the default implementation of <literal>popCount</literal> in
<literal>Data.Bits</literal>.
</para>
</listitem>
<listitem>
<para>
A potential race condition in
<literal>Control.Concurrent.Chan</literal> (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5870">#5870</ulink>)
has been fixed.
</para>
</listitem>
<listitem>
<para>
An <literal>MVar</literal> bug which could cause deadlocks (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5943">#5943</ulink>)
has been fixed.
</para>
</listitem>
<listitem>
<para>
Fixed a bug in <literal>hGetBufSome</literal> (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5843">#5843</ulink>)
which was causing <literal>Data.ByteString.hGetSome</literal> to
block on Windows in some situations.
</para>
</listitem>
<listitem>
<para>
Fixed crash while parsing numeric values in exponential notation
(<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5688">#5688</ulink>).
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2>
<title>Tools</title>
<itemizedlist>
<listitem>
<para>
<literal>hp2ps</literal> can now handle backslashes in identifiers
correctly (<ulink
url="http://hackage.haskell.org/trac/ghc/ticket/5800">#5800</ulink>).
</para>
</listitem>
</itemizedlist>
</sect2>
</sect1>
...@@ -149,6 +149,39 @@ main = do args &lt;- getArgs ...@@ -149,6 +149,39 @@ main = do args &lt;- getArgs
<title>Numbers, basic types, and built-in classes</title> <title>Numbers, basic types, and built-in classes</title>
<variablelist> <variablelist>
<varlistentry>
<term>Num superclasses</term>
<listitem>
<para>
The <literal>Num</literal> class does not have
<literal>Show</literal> or <literal>Eq</literal>
superclasses.
</para>
<para>
You can make code that works with both
Haskell98/Haskell2010 and GHC by:
<itemizedlist>
<listitem>
<para>
Whenever you make a <literal>Num</literal> instance
of a type, also make <literal>Show</literal> and
<literal>Eq</literal> instances, and
</para>
</listitem>
<listitem>
<para>
Whenever you give a function, instance or class a
<literal>Num t</literal> constraint, also give it
<literal>Show t</literal> and
<literal>Eq t</literal> constraints.
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term>Multiply-defined array elements&mdash;not checked:</term> <term>Multiply-defined array elements&mdash;not checked:</term>
<listitem> <listitem>
......
...@@ -808,10 +808,15 @@ ...@@ -808,10 +808,15 @@
<entry>dynamic</entry> <entry>dynamic</entry>
<entry><option>-XNoConstraintKinds</option></entry> <entry><option>-XNoConstraintKinds</option></entry>
</row> </row>
<row>
<entry><option>-XDataKinds</option></entry>
<entry>Enable <link linkend="kind-polymorphism-and-promotion">datatype promotion</link>.</entry>
<entry>dynamic</entry>
<entry><option>-XNoDataKinds</option></entry>
</row>
<row> <row>
<entry><option>-XPolyKinds</option></entry> <entry><option>-XPolyKinds</option></entry>
<entry>Enable <link linkend="kind-polymorphism">kind polymorphism</link>. <entry>Enable <link linkend="kind-polymorphism-and-promotion">kind polymorphism</link>.</entry>
Implies <option>-XKindSignatures</option>.</entry>
<entry>dynamic</entry> <entry>dynamic</entry>
<entry><option>-XNoPolyKinds</option></entry> <entry><option>-XNoPolyKinds</option></entry>
</row> </row>
......
...@@ -2103,8 +2103,9 @@ NilSet :: Set a ...@@ -2103,8 +2103,9 @@ NilSet :: Set a
ConsSet :: Eq a => a -> Set a -> Set a ConsSet :: Eq a => a -> Set a -> Set a
</programlisting> </programlisting>
<para>In GHC this feature is an extension called <para>This is widely considered a misfeature, and is going to be removed from
<literal>DatatypeContexts</literal>, and on by default.</para> the language. In GHC, it is controlled by the deprecated extension
<literal>DatatypeContexts</literal>.</para>
</sect2> </sect2>
<sect2 id="infix-tycons"> <sect2 id="infix-tycons">
...@@ -5152,10 +5153,12 @@ is not what we intend when defining length-indexed vectors. ...@@ -5152,10 +5153,12 @@ is not what we intend when defining length-indexed vectors.
</para> </para>
<para> <para>
With the <option>-XPolyKinds</option> flag, users can specify better kinds for With the flags <option>-XPolyKinds</option> and <option>-XDataKinds</option>,
their programs. This flag enables two orthogonal but related features: kind users get access to a richer kind language.
polymorphism and user defined kinds through datatype promotion. With <option>-XPolyKinds</option> enables kind polymorphism, while
<option>-XPolyKinds</option>, the example above can then be rewritten to: <option>-XDataKinds</option> enables user defined kinds through datatype
promotion. With <option>-XDataKinds</option>, the example above can then be
rewritten to:
<programlisting> <programlisting>
data Nat = Ze | Su Nat data Nat = Ze | Su Nat
...@@ -5193,7 +5196,8 @@ class Typeable2 (t :: * -> * -> *) where ...@@ -5193,7 +5196,8 @@ class Typeable2 (t :: * -> * -> *) where
</para> </para>
<para> <para>
Kind polymorphism allows us to merge all these classes into one: Kind polymorphism (with <option>-XPolyKinds</option>)
allows us to merge all these classes into one:
<programlisting> <programlisting>
data Proxy t = Proxy data Proxy t = Proxy
...@@ -5212,8 +5216,8 @@ Note that the datatype <literal>Proxy</literal> has kind ...@@ -5212,8 +5216,8 @@ Note that the datatype <literal>Proxy</literal> has kind
<para> <para>
There are some restrictions in the current implementation: There are some restrictions in the current implementation:
<itemizedlist> <itemizedlist>
<listitem><para>You cannot explicitly abstract over kinds, or mention kind <listitem><para>You cannot (yet) explicitly abstract over kinds, or mention
variables. So the following are all rejected: kind variables. So the following are all rejected:
<programlisting> <programlisting>
data D1 (t :: k) data D1 (t :: k)
...@@ -5237,8 +5241,7 @@ type instance F Int = Maybe ...@@ -5237,8 +5241,7 @@ type instance F Int = Maybe
<sect2 id="promotion"> <sect2 id="promotion">
<title>Datatype promotion</title> <title>Datatype promotion</title>
<para> <para>
Along with kind polymorphism comes the ability to define custom named kinds. With <option>-XDataKinds</option>, GHC automatically promotes every suitable
With <option>-XPolyKinds</option>, GHC automatically promotes every suitable
datatype to be a kind, and its (value) constructors to be type constructors. datatype to be a kind, and its (value) constructors to be type constructors.
The following types The following types
<programlisting> <programlisting>
...@@ -9189,7 +9192,7 @@ The following are good producers: ...@@ -9189,7 +9192,7 @@ The following are good producers:
<listitem> <listitem>
<para> <para>
Enumerations of <literal>Int</literal> and <literal>Char</literal> (e.g. <literal>['a'..'z']</literal>). Enumerations of <literal>Int</literal>, <literal>Integer</literal> and <literal>Char</literal> (e.g. <literal>['a'..'z']</literal>).
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
......