ghc-experimental (empty) → 0.1.0.0
raw patch · 8 files changed
+393/−0 lines, 8 filesdep +basedep +ghc-internaldep +ghc-prim
Dependencies added: base, ghc-internal, ghc-prim
Files
- CHANGELOG.md +5/−0
- LICENSE +30/−0
- ghc-experimental.cabal +38/−0
- src/Data/Sum/Experimental.hs +84/−0
- src/Data/Tuple/Experimental.hs +164/−0
- src/GHC/Profiling/Eras.hs +19/−0
- src/GHC/Wasm/Prim.hs +23/−0
- src/Prelude/Experimental.hs +30/−0
+ CHANGELOG.md view
@@ -0,0 +1,5 @@+# Revision history for ghc-experimental++## 0.1.0.0 -- YYYY-mm-dd++* First version. Released on an unsuspecting world.
+ LICENSE view
@@ -0,0 +1,30 @@+Copyright (c) 2023, ghc-devs@haskell.org++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++ * Redistributions of source code must retain the above copyright+ notice, this list of conditions and the following disclaimer.++ * Redistributions in binary form must reproduce the above+ copyright notice, this list of conditions and the following+ disclaimer in the documentation and/or other materials provided+ with the distribution.++ * Neither the name of ghc-devs@haskell.org nor the names of other+ contributors may be used to endorse or promote products derived+ from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ ghc-experimental.cabal view
@@ -0,0 +1,38 @@+cabal-version: 3.0+name: ghc-experimental+version: 0.1.0.0+synopsis: Experimental features of GHC's standard library+description:+ This package is where experimental GHC standard library interfaces start+ life and mature. Eventually, stabilized interfaces will be+ migrated into the @base@ library.++homepage: https://www.haskell.org/ghc/+license: BSD-3-Clause+license-file: LICENSE+author: The GHC Team+maintainer: ghc-devs@haskell.org+copyright: (c) 2023 The GHC Team+category: Development+build-type: Simple+extra-doc-files: CHANGELOG.md++common warnings+ ghc-options: -Wall++library+ import: warnings+ exposed-modules:+ GHC.Profiling.Eras+ Data.Tuple.Experimental+ Data.Sum.Experimental+ Prelude.Experimental+ if arch(wasm32)+ exposed-modules: GHC.Wasm.Prim+ other-extensions:+ build-depends: base ^>=4.20,+ ghc-internal >= 9.1001 && < 9.1002,+ ghc-prim >= 0.11 && < 0.12+ hs-source-dirs: src+ default-language: Haskell2010+ ghc-options: -this-unit-id ghc-experimental
+ src/Data/Sum/Experimental.hs view
@@ -0,0 +1,84 @@+{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedSums, NoListTuplePuns #-}++{-+Module : Data.Sum.Experimental+Copyright : (c) The GHC Team+License : see libraries/ghc-experimental/LICENSE++Maintainer : ghc-devs@haskell.org+Stability : experimental+Portability : non-portable (GHC extensions)++This module exports the new user-syntax types for unboxed sums, which avoid the+ambiguity of the old punned names.+See the proposal for motivation and explanations:+https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0475-tuple-syntax.rst+-}+module Data.Sum.Experimental (+ Sum2#,+ Sum3#,+ Sum4#,+ Sum5#,+ Sum6#,+ Sum7#,+ Sum8#,+ Sum9#,+ Sum10#,+ Sum11#,+ Sum12#,+ Sum13#,+ Sum14#,+ Sum15#,+ Sum16#,+ Sum17#,+ Sum18#,+ Sum19#,+ Sum20#,+ Sum21#,+ Sum22#,+ Sum23#,+ Sum24#,+ Sum25#,+ Sum26#,+ Sum27#,+ Sum28#,+ Sum29#,+ Sum30#,+ Sum31#,+ Sum32#,+ Sum33#,+ Sum34#,+ Sum35#,+ Sum36#,+ Sum37#,+ Sum38#,+ Sum39#,+ Sum40#,+ Sum41#,+ Sum42#,+ Sum43#,+ Sum44#,+ Sum45#,+ Sum46#,+ Sum47#,+ Sum48#,+ Sum49#,+ Sum50#,+ Sum51#,+ Sum52#,+ Sum53#,+ Sum54#,+ Sum55#,+ Sum56#,+ Sum57#,+ Sum58#,+ Sum59#,+ Sum60#,+ Sum61#,+ Sum62#,+ Sum63#,+) where++import GHC.Num.BigNat () -- for build ordering+import GHC.Types
+ src/Data/Tuple/Experimental.hs view
@@ -0,0 +1,164 @@+{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples, NoListTuplePuns #-}++{-+Module : Data.Tuple.Experimental+Copyright : (c) The GHC Team+License : see libraries/ghc-experimental/LICENSE++Maintainer : ghc-devs@haskell.org+Stability : experimental+Portability : non-portable (GHC extensions)++This module exports the new user-syntax types for (boxed, unboxed, constraint)+tuples, which avoid the ambiguity of the old punned names.+See the proposal for motivation and explanations:+https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0475-tuple-syntax.rst+-}+module Data.Tuple.Experimental (+ module GHC.Tuple,+ Solo (Solo, MkSolo),++ -- * Unboxed tuples+ Unit#,+ Solo#,+ Tuple0#,+ Tuple1#,+ Tuple2#,+ Tuple3#,+ Tuple4#,+ Tuple5#,+ Tuple6#,+ Tuple7#,+ Tuple8#,+ Tuple9#,+ Tuple10#,+ Tuple11#,+ Tuple12#,+ Tuple13#,+ Tuple14#,+ Tuple15#,+ Tuple16#,+ Tuple17#,+ Tuple18#,+ Tuple19#,+ Tuple20#,+ Tuple21#,+ Tuple22#,+ Tuple23#,+ Tuple24#,+ Tuple25#,+ Tuple26#,+ Tuple27#,+ Tuple28#,+ Tuple29#,+ Tuple30#,+ Tuple31#,+ Tuple32#,+ Tuple33#,+ Tuple34#,+ Tuple35#,+ Tuple36#,+ Tuple37#,+ Tuple38#,+ Tuple39#,+ Tuple40#,+ Tuple41#,+ Tuple42#,+ Tuple43#,+ Tuple44#,+ Tuple45#,+ Tuple46#,+ Tuple47#,+ Tuple48#,+ Tuple49#,+ Tuple50#,+ Tuple51#,+ Tuple52#,+ Tuple53#,+ Tuple54#,+ Tuple55#,+ Tuple56#,+ Tuple57#,+ Tuple58#,+ Tuple59#,+ Tuple60#,+ Tuple61#,+ Tuple62#,+ Tuple63#,+ Tuple64#,++ -- * Constraint tuples+ CUnit,+ CSolo,+ CTuple0,+ CTuple1,+ CTuple2,+ CTuple3,+ CTuple4,+ CTuple5,+ CTuple6,+ CTuple7,+ CTuple8,+ CTuple9,+ CTuple10,+ CTuple11,+ CTuple12,+ CTuple13,+ CTuple14,+ CTuple15,+ CTuple16,+ CTuple17,+ CTuple18,+ CTuple19,+ CTuple20,+ CTuple21,+ CTuple22,+ CTuple23,+ CTuple24,+ CTuple25,+ CTuple26,+ CTuple27,+ CTuple28,+ CTuple29,+ CTuple30,+ CTuple31,+ CTuple32,+ CTuple33,+ CTuple34,+ CTuple35,+ CTuple36,+ CTuple37,+ CTuple38,+ CTuple39,+ CTuple40,+ CTuple41,+ CTuple42,+ CTuple43,+ CTuple44,+ CTuple45,+ CTuple46,+ CTuple47,+ CTuple48,+ CTuple49,+ CTuple50,+ CTuple51,+ CTuple52,+ CTuple53,+ CTuple54,+ CTuple55,+ CTuple56,+ CTuple57,+ CTuple58,+ CTuple59,+ CTuple60,+ CTuple61,+ CTuple62,+ CTuple63,+ CTuple64,+) where++import GHC.Tuple+import GHC.Types+import GHC.Classes+import GHC.Num.BigNat () -- for build ordering
+ src/GHC/Profiling/Eras.hs view
@@ -0,0 +1,19 @@+{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE NoImplicitPrelude #-}++module GHC.Profiling.Eras ( setUserEra+ , getUserEra+ , incrementUserEra+ ) where++import GHC.Internal.Base++-- | Set the heap profiling era, setting the era to 0 will stop closures being+-- counted.+foreign import ccall setUserEra :: Word -> IO ()++-- | Query the profiling era+foreign import ccall getUserEra :: IO Word++-- | Increment the era by a given amount, and return the new era.+foreign import ccall incrementUserEra :: Word -> IO Word
+ src/GHC/Wasm/Prim.hs view
@@ -0,0 +1,23 @@+{-# LANGUAGE NoImplicitPrelude #-}++module GHC.Wasm.Prim (+ -- User-facing JSVal type and freeJSVal+ JSVal (..),+ freeJSVal,++ -- The JSString type and conversion from/to Haskell String+ JSString (..),+ fromJSString,+ toJSString,++ -- Exception types related to JSFFI+ JSException (..),+ WouldBlockException (..),+ PromisePendingException (..),++ -- Is JSFFI used in the current wasm module?+ isJSFFIUsed+) where++import GHC.Internal.Wasm.Prim+
+ src/Prelude/Experimental.hs view
@@ -0,0 +1,30 @@+{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_HADDOCK not-home #-}++{-+Module : Prelude.Experimental+Copyright : (c) The GHC Team+License : see libraries/ghc-experimental/LICENSE++Maintainer : libraries@haskell.org+Stability : experimental+Portability : non-portable (GHC extensions)++The Prelude for ghc-experimental, re-exporting definitions peculiar to GHC that+are safe to use in ordinary code, but whose API may evolve rapidly over+subsequent releases.+-}+module Prelude.Experimental (+ List,++ -- * Tuple/sum syntax families and tycons+ module Data.Tuple.Experimental,+ module Data.Sum.Experimental,+) where++import GHC.Types (List)+import GHC.Classes++import Data.Tuple.Experimental+import Data.Sum.Experimental