Haskell Prime: Ticket Query
https://prime.haskell.org/query?status=new&desc=1&order=time
Haskell Language Report Working Groupen-USHaskell Primehttps://prime.haskell.org/chrome/site/HaskellLogo_2.jpg
https://prime.haskell.org/query?status=new&desc=1&order=time
Trac 1.2.2.dev0
https://prime.haskell.org/ticket/158
https://prime.haskell.org/ticket/158#158: CTime and CClock should be IntegralSun, 13 Mar 2016 15:15:10 GMTbgamari<p>
The fact that these types don't have <code>Integral</code> instances means that users need to jump through insane hoops (e.g. casting through <code>Double</code> with <code>realToFrac</code>) in order to get an <code>Integer</code> out of these values, which are morally integers.
</p>
Resultshttps://prime.haskell.org/ticket/158#changelog
https://prime.haskell.org/ticket/157
https://prime.haskell.org/ticket/157#157: AMP-corollary: `Alternative`/`MonadPlus`Fri, 23 Oct 2015 17:57:06 GMTHerbert Valerio Riedel<p>
Haskell 2010 defines
</p>
<div class="wiki-code"><div class="code"><pre><span class="kr">class</span> <span class="kt">Monad</span> m <span class="ow">=></span> <span class="kt">MonadPlus</span> m <span class="kr">where</span>
mzero <span class="ow">::</span> m a
mplus <span class="ow">::</span> m a <span class="ow">-></span> m a <span class="ow">-></span> m a
<span class="kr">instance</span> <span class="kt">MonadPlus</span> <span class="kt">[]</span>
<span class="kr">instance</span> <span class="kt">MonadPlus</span> <span class="kt">Maybe</span>
</pre></div></div><p>
With AMP, a generalisation to <code>Applicative</code> becomes obvious, which is widely known as <code>Applicative</code>:
</p>
<div class="wiki-code"><div class="code"><pre><span class="kr">class</span> <span class="kt">Applicative</span> f <span class="ow">=></span> <span class="kt">Alternative</span> f <span class="kr">where</span>
empty <span class="ow">::</span> f a
<span class="p">(</span><span class="o"><|></span><span class="p">)</span> <span class="ow">::</span> f a <span class="ow">-></span> f a <span class="ow">-></span> f a
some <span class="ow">::</span> f a <span class="ow">-></span> f <span class="p">[</span>a<span class="p">]</span>
some <span class="ow">=</span> <span class="o">...</span>
many <span class="ow">::</span> f a <span class="ow">-></span> f <span class="p">[</span>a<span class="p">]</span>
many <span class="ow">=</span> <span class="o">...</span>
<span class="kr">instance</span> <span class="kt">Alternative</span> <span class="kt">[]</span>
<span class="kr">instance</span> <span class="kt">Alternative</span> <span class="kt">Maybe</span>
</pre></div></div><p>
This makes <code>MonadPlus</code> mostly redundant, as <code>mzero = empty</code> and <code>mplus = (<|>)</code> is used in most cases.
</p>
<p>
Therefore, it may be sensible to remove <code>MonadPlus</code> from the library report and add <code>Alternative</code> instead. Haskell implementations may still choose to provide a legacy <code>MonadPlus</code> in their standard library.
</p>
Resultshttps://prime.haskell.org/ticket/157#changelog
https://prime.haskell.org/ticket/156
https://prime.haskell.org/ticket/156#156: Contradiction regarding Foreign.C.Types and marshable foreign typesSun, 27 Sep 2015 10:44:15 GMTHerbert Valerio Riedel<p>
SPJ writes in <a class="ext-link" href="https://ghc.haskell.org/intertrac/ticket%3A9079" title="ticket:9079 in GHC's Trac"><span class="icon"></span>#GHC9079</a>:
</p>
<blockquote class="citation">
<p>
Well, this looks to me like a bug in the <a class="ext-link" href="http://www.haskell.org/onlinereport/haskell2010/"><span class="icon"></span>Haskell 2010 report</a>
</p>
<ul><li><a class="ext-link" href="http://www.haskell.org/onlinereport/haskell2010/haskellch8.html"><span class="icon"></span>Section 8.4.2 </a> says that newtypes must have their constructors visible, and claims that <code>Foreign.C.Types</code> follows this convention.
</li></ul><ul><li>But <a class="ext-link" href="http://www.haskell.org/onlinereport/haskell2010/haskellch28.html"><span class="icon"></span>Chapter 28</a> which shows <code>Foreign.C.Types</code> manifestly does <strong>not</strong> follow this convention.
</li></ul><p>
That looks like an outright contradiction.
</p>
<p>
I think we should export all the data constructors in <code>Foreign.C.Types</code> in the <code>haskell2010</code> package. Does anyone disagree?
</p>
</blockquote>
Resultshttps://prime.haskell.org/ticket/156#changelog
https://prime.haskell.org/ticket/155
https://prime.haskell.org/ticket/155#155: Remove return and >> from MonadSat, 26 Sep 2015 11:10:54 GMTDavid Luposchainsky<p>
Due to the AMP <a class="new ticket" href="https://prime.haskell.org/ticket/146" title="#146: modification: Add AMP hierarchy (new)">#146</a> <code>Monad</code> now contains two redundant bindings: <code>return</code> and <code>>></code> are already in <code>Applicative</code> as <code>pure</code> and <code>*></code>.
</p>
<p>
See also <a class="ext-link" href="https://ghc.haskell.org/intertrac/Proposal/MonadOfNoReturn" title="Proposal/MonadOfNoReturn in GHC's Trac"><span class="icon"></span>GHC:Proposal/MonadOfNoReturn</a>
</p>
Resultshttps://prime.haskell.org/ticket/155#changelog
https://prime.haskell.org/ticket/154
https://prime.haskell.org/ticket/154#154: Add Semigroup & Monoid classesSat, 26 Sep 2015 10:53:09 GMTDavid Luposchainsky<p>
Add <code>Semigroup</code> and <code>Monoid</code> classes
</p>
<div class="wiki-code"><div class="code"><pre><span class="kr">class</span> <span class="kt">Semigroup</span> a <span class="kr">where</span>
<span class="p">(</span><span class="o"><></span><span class="p">)</span> <span class="ow">::</span> a <span class="ow">-></span> a <span class="ow">-></span> a <span class="c1">-- Associative</span>
<span class="kr">class</span> <span class="kt">Semigroup</span> a <span class="ow">=></span> <span class="kt">Monoid</span> a <span class="kr">where</span>
mempty <span class="ow">::</span> a <span class="c1">-- left/right zero of (<>)</span>
</pre></div></div><p>
plus the respective instances for the standard types.
</p>
<p>
See also <a class="ext-link" href="https://ghc.haskell.org/intertrac/Proposal/SemigroupMonoid" title="Proposal/SemigroupMonoid in GHC's Trac"><span class="icon"></span>ghc:Proposal/SemigroupMonoid</a>
</p>
Resultshttps://prime.haskell.org/ticket/154#changelog
https://prime.haskell.org/ticket/153
https://prime.haskell.org/ticket/153#153: BiFunctor family of typesSat, 26 Sep 2015 10:52:18 GMTDavid Luposchainsky<p>
Bifunctor, Bitraversable, Bifoldable, …
</p>
Resultshttps://prime.haskell.org/ticket/153#changelog
https://prime.haskell.org/ticket/152
https://prime.haskell.org/ticket/152#152: Add unsigned int to PreludeSat, 26 Sep 2015 10:51:09 GMTDavid Luposchainsky<p>
Data.Word provides unsigned integers. Word, an unsigned version of Int, might be desirable to have in Prelude.
</p>
Resultshttps://prime.haskell.org/ticket/152#changelog
https://prime.haskell.org/ticket/151
https://prime.haskell.org/ticket/151#151: Add Foldable/Traversable to Prelude (FTP)Sat, 26 Sep 2015 10:49:50 GMTDavid Luposchainsky<p>
The FTP added <a class="missing wiki">Foldable/Traversable?</a> to Prelude in GHC, and generalized many existing functions to take this into account.
</p>
<p>
<a class="ext-link" href="https://ghc.haskell.org/trac/ghc/wiki/Prelude710/FTP"><span class="icon"></span>https://ghc.haskell.org/trac/ghc/wiki/Prelude710/FTP</a>
</p>
Resultshttps://prime.haskell.org/ticket/151#changelog
https://prime.haskell.org/ticket/150
https://prime.haskell.org/ticket/150#150: Remove superclasses from NumSat, 26 Sep 2015 10:47:47 GMTDavid Luposchainsky<p>
Haskell 2010 demands Num to be a subclass of both Eq and Show. Remove these constraints, as already implemented in GHC.
</p>
Resultshttps://prime.haskell.org/ticket/150#changelog
https://prime.haskell.org/ticket/149
https://prime.haskell.org/ticket/149#149: Add NumDecimalsSat, 26 Sep 2015 10:29:48 GMTDavid Luposchainsky<p>
The GHC <code>NumDecimals</code> extension allows any Num to be entered in exponential form. For example,
</p>
<div class="wiki-code"><div class="code"><pre><span class="mf">5e6</span> <span class="ow">=</span> <span class="mi">5</span> <span class="o">*</span> <span class="mi">10</span><span class="o">^</span><span class="mi">6</span>
</pre></div></div><p>
GHC manual entry: <a class="ext-link" href="https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/syntax-extns.html#num-decimals"><span class="icon"></span>https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/syntax-extns.html#num-decimals</a>
</p>
Resultshttps://prime.haskell.org/ticket/149#changelog
https://prime.haskell.org/ticket/148
https://prime.haskell.org/ticket/148#148: Add BinaryLiteralsSat, 26 Sep 2015 10:27:19 GMTDavid Luposchainsky<p>
Analogous to <code>0123</code> (octal) and <code>0xabc</code> (hex), add binary literal syntax <code>0b101010</code>.
</p>
<p>
GHC has this implemented as the <a class="missing wiki">BinaryLiterals?</a> extension already. <a class="ext-link" href="https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/syntax-extns.html#binary-literals"><span class="icon"></span>https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/syntax-extns.html#binary-literals</a>
</p>
Resultshttps://prime.haskell.org/ticket/148#changelog
https://prime.haskell.org/ticket/147
https://prime.haskell.org/ticket/147#147: Move Monad.fail into its own MonadFail classSat, 26 Sep 2015 10:11:34 GMTDavid Luposchainsky<p>
Title says it all.
</p>
<p>
MFP proposal text: <a class="ext-link" href="https://wiki.haskell.org/index.php?title=MonadFail_Proposal"><span class="icon"></span>https://wiki.haskell.org/index.php?title=MonadFail_Proposal</a>
</p>
<p>
GHC implementation see <a class="ext-link" href="https://ghc.haskell.org/intertrac/%2310751" title="#10751 in GHC's Trac"><span class="icon"></span>ghc:#10751</a>
</p>
Resultshttps://prime.haskell.org/ticket/147#changelog
https://prime.haskell.org/ticket/146
https://prime.haskell.org/ticket/146#146: Add AMP hierarchySat, 26 Sep 2015 10:10:14 GMTDavid Luposchainsky<p>
See <a class="ext-link" href="https://wiki.haskell.org/Functor-Applicative-Monad_Proposal"><span class="icon"></span>https://wiki.haskell.org/Functor-Applicative-Monad_Proposal</a>
</p>
<p>
Short version: Make Functor ⇒ Applicative ⇒ Monad standard
</p>
<p>
Related: <a class="ext-link" href="https://ghc.haskell.org/intertrac/%238004" title="#8004 in GHC's Trac"><span class="icon"></span>ghc:#8004</a>
</p>
Resultshttps://prime.haskell.org/ticket/146#changelog
https://prime.haskell.org/ticket/145
https://prime.haskell.org/ticket/145#145: 'where' is undocumentedSat, 26 Sep 2015 08:48:04 GMTDavid Luposchainsky<p>
I've looked through the H10 Report several times, and it seems the meaning of "where" blocks has been completely forgotten to be mentioned.
</p>
Resultshttps://prime.haskell.org/ticket/145#changelog
https://prime.haskell.org/ticket/144
https://prime.haskell.org/ticket/144#144: NoImplicitPreludeImportTue, 28 May 2013 01:39:30 GMTIan Lynagh<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/NoImplicitPreludeImport">NoImplicitPreludeImport</a>.
</p>
<p>
See also <a class="new ticket" href="https://prime.haskell.org/ticket/58" title="#58: task: prelude re-organisation proposal (new)">#58</a>, <a class="new ticket" href="https://prime.haskell.org/ticket/124" title="#124: modification: Do not import the Prelude by default for proper modules (new)">#124</a>.
</p>
Resultshttps://prime.haskell.org/ticket/144#changelog
https://prime.haskell.org/ticket/143
https://prime.haskell.org/ticket/143#143: add an opaque Text type to the language standardSun, 01 Apr 2012 15:13:44 GMTGreg Weber<p>
Add the Text datatype to the language.
</p>
<p>
The text package for GHC exposes a Text datatype that represents a string.
</p>
<p>
The current String = [Char] standard has issues with
</p>
<ul><li>efficiency: there are more efficient representations than linked lists
</li><li>correctness: for Unicode correctness, one must operate on a string as a whole rather than individual code points
</li></ul><p>
see <a class="wiki" href="https://prime.haskell.org/wiki/OpaqueText">OpaqueText</a>
</p>
Resultshttps://prime.haskell.org/ticket/143#changelog
https://prime.haskell.org/ticket/142
https://prime.haskell.org/ticket/142#142: typos in Haskell definitionSat, 20 Nov 2010 19:17:56 GMTIan Lynagh<p>
In <a class="ext-link" href="http://www.haskell.org/pipermail/haskell-prime/2010-November/003300.html"><span class="icon"></span>http://www.haskell.org/pipermail/haskell-prime/2010-November/003300.html</a> Yitzchak Gale reported:
</p>
<pre class="wiki">Serge D. Mechveliani wrote:
> Looking into the on-line Haskell-2010 definition,
> I see in the Library definition
>
> 20.4.3 ...
> iteratef (instead of "iterate f"),
> repeatx (instead of "repeat x").
Also, replicaten x (instead of "replicate n x").
</pre>Resultshttps://prime.haskell.org/ticket/142#changelog
https://prime.haskell.org/ticket/141
https://prime.haskell.org/ticket/141#141: Whitespace fixesSat, 20 Nov 2010 00:44:37 GMTIan Lynagh<p>
In <a class="ext-link" href="http://www.haskell.org/onlinereport/haskell2010/haskellch4.html#dx10-65015"><span class="icon"></span>4.1.2</a> there is a <code>*->*->*-> *</code> with a space before the last <code>*</code>.
</p>
<p>
In <a class="ext-link" href="http://www.haskell.org/onlinereport/haskell2010/haskellch4.html#x10-780004.3.3"><span class="icon"></span>4.3.3</a> there are two <code>T</code>s followed by a space:
</p>
<pre class="wiki">When deriving a class C for a type T , instances for all
superclasses of C must exist for T , either via an explicit
instance declaration or by including the superclass in the
deriving clause.
</pre>Resultshttps://prime.haskell.org/ticket/141#changelog
https://prime.haskell.org/ticket/140
https://prime.haskell.org/ticket/140#140: Small report fixesSat, 20 Nov 2010 00:37:20 GMTIan Lynagh<p>
In <a class="ext-link" href="http://www.haskell.org/onlinereport/haskell2010/haskellch3.html#x8-560003.16"><span class="icon"></span>Section 3.16</a>:
</p>
<p>
Replace:
</p>
<div style="background: #fdd; border-color: #c00; border-style: solid; border-width: 1px">
<pre>
<span style="background: #fbb">exp → exp :: [context =>] type</span>
Expression type-signatures have the form <span style="background: #fbb">e :: t</span>, where <span style="background: #fbb">e</span> is an expression and <span style="background: #fbb">t</span> is a type (Section 4.1.2);
they are used to type an expression explicitly and may be used to resolve ambiguous typings due to
overloading (see Section 4.3.4). The value of the expression is just that of <span style="background: #fbb">exp</span>. As with normal type
signatures (see Section 4.4.1), the declared type may be more specific than the principal type derivable from
<span style="background: #fbb">exp</span>, but it is an error to give a type that is more general than, or not comparable to, the principal type.
</pre>
</div>
<p>
with:
</p>
<div style="background: #dfd; border-color: #0c0; border-style: solid; border-width: 1px">
<pre>
<span style="background: #bfb">exp → <span style="border: solid black 2px">infixexp</span> :: [context =>] type</span>
Expression type-signatures have the form <span style="background: #bfb">e :: t</span>, where <span style="background: #bfb">e</span> is an expression and <span style="background: #bfb">t</span> is a type (Section 4.1.2);
they are used to type an expression explicitly and may be used to resolve ambiguous typings due to
overloading (see Section 4.3.4). The value of the expression is just that of <span style="background: #bfb; border: solid black 2px">e</span>. As with normal type
signatures (see Section 4.4.1), the declared type may be more specific than the principal type derivable from
<span style="background: #bfb; border: solid black 2px">e</span>, but it is an error to give a type that is more general than, or not comparable to, the principal type.
</pre>
</div>
<p>
The first change makes 3.16 consistent with the opening of 3 and with 10.5.
</p>
Resultshttps://prime.haskell.org/ticket/140#changelog
https://prime.haskell.org/ticket/139
https://prime.haskell.org/ticket/139#139: NoDatatypeContextsSun, 18 Jul 2010 19:52:01 GMTIan Lynagh<p>
Proposal: <a class="wiki" href="https://prime.haskell.org/wiki/NoDatatypeContexts">NoDatatypeContexts</a>.
</p>
Resultshttps://prime.haskell.org/ticket/139#changelog
https://prime.haskell.org/ticket/138
https://prime.haskell.org/ticket/138#138: PrefixMinusResolutionTue, 13 Jul 2010 15:28:50 GMTmaeder<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/PrefixMinusResolution">PrefixMinusResolution</a>
</p>
Resultshttps://prime.haskell.org/ticket/138#changelog
https://prime.haskell.org/ticket/137
https://prime.haskell.org/ticket/137#137: Named field wild-cards for Haskell 2011Fri, 26 Feb 2010 18:43:51 GMTiavor.diatchki@…<p>
I'd like to propose that we add named field wild-cards to Haskell 2011.
</p>
<p>
<strong>Implementation:</strong> This feature is implemented in GHC with flag <code>-XRecordWildCards</code>.
</p>
<p>
<strong>Documentation:</strong> The feature is documented in <a class="ext-link" href="http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#record-wildcards"><span class="icon"></span>Section 7.3.16</a> of the GHC User's Manual.
</p>
Resultshttps://prime.haskell.org/ticket/137#changelog
https://prime.haskell.org/ticket/136
https://prime.haskell.org/ticket/136#136: Named field punning for Haskell 2011Fri, 26 Feb 2010 18:38:06 GMTiavor.diatchki@…<p>
I'd like to propose that we add named-field punning to Haskell 2011. More concretely, I propose that we add pre-Haskell'98 style punning, combined with field disambiguation.
</p>
<p>
<strong>Implementation:</strong> These features are implemented in GHC, and can be enabled with <code>-XNamedFieldPuns</code> and <code>-XDisambiguateRecordFields</code>
</p>
<p>
<strong>Documentation:</strong> The features are described in <a class="ext-link" href="http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#disambiguate-fields"><span class="icon"></span>Section 7.3.14</a> and <a class="ext-link" href="http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#record-puns"><span class="icon"></span>Section 7.3.15</a> of the GHC User's Manual.
</p>
Resultshttps://prime.haskell.org/ticket/136#changelog
https://prime.haskell.org/ticket/135
https://prime.haskell.org/ticket/135#135: NegateBindsTightlyWed, 24 Feb 2010 12:16:55 GMTSimon Peyton Jones<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/NegationBindsTightly">NegationBindsTightly</a>
</p>
Resultshttps://prime.haskell.org/ticket/135#changelog
https://prime.haskell.org/ticket/134
https://prime.haskell.org/ticket/134#134: AlternativeLayoutRuleWed, 09 Dec 2009 20:17:07 GMTIan Lynagh<p>
Proposal: <a class="wiki" href="https://prime.haskell.org/wiki/AlternativeLayoutRule">AlternativeLayoutRule</a>.
</p>
Resultshttps://prime.haskell.org/ticket/134#changelog
https://prime.haskell.org/ticket/133
https://prime.haskell.org/ticket/133#133: ExplicitForallMon, 27 Jul 2009 11:05:39 GMTNiklas Broberg<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/ExplicitForall">ExplicitForall</a>.
</p>
Resultshttps://prime.haskell.org/ticket/133#changelog
https://prime.haskell.org/ticket/131
https://prime.haskell.org/ticket/131#131: NoMonomorphismRestrictionSat, 25 Jul 2009 14:37:56 GMTIan Lynagh<p>
Proposal: <a class="wiki" href="https://prime.haskell.org/wiki/NoMonomorphismRestriction">NoMonomorphismRestriction</a>.
</p>
Resultshttps://prime.haskell.org/ticket/131#changelog
https://prime.haskell.org/ticket/129
https://prime.haskell.org/ticket/129#129: Add Type Directed Name ResolutionThu, 16 Jul 2009 16:14:22 GMTSimon Peyton Jones<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/TypeDirectedNameResolution">TypeDirectedNameResolution</a>
</p>
Resultshttps://prime.haskell.org/ticket/129#changelog
https://prime.haskell.org/ticket/127
https://prime.haskell.org/ticket/127#127: QualifiedOperatorsWed, 08 Jul 2009 11:48:15 GMTSimon Marlow<p>
Change the syntax for qualified operators from Prelude.>≥ to Prelude.(>≥).
</p>
<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/QualifiedOperators">QualifiedOperators</a>.
</p>
Resultshttps://prime.haskell.org/ticket/127#changelog
https://prime.haskell.org/ticket/126
https://prime.haskell.org/ticket/126#126: Instances of Read on bounded integral types should fail on overflowTue, 11 Sep 2007 18:11:53 GMTbos@…<p>
The behaviour of the instances of <code>Read</code> on bounded integral types in H98 is rather unfortunate:
</p>
<p>
{{{> read "33333333333333333333333333333" :: Int
-3520117339065068203}}}
</p>
<p>
The behaviour is similar for types in <code>Data.Int</code> and <code>Data.Word</code>.
</p>
<p>
It would be much better if such instances were to detect wraparound errors, and throw an exception. Having parsers silently do the wrong thing is rather at odds with the language's goal of safety.
</p>
<p>
I will be happy to provide a sample implementation that does the right thing, upon request.
</p>
Resultshttps://prime.haskell.org/ticket/126#changelog
https://prime.haskell.org/ticket/125
https://prime.haskell.org/ticket/125#125: Rename interact to iofilterThu, 02 Aug 2007 16:17:02 GMT<p>
The interact function in Prelude has an un-intuitive name.
I suggest using the name "iofilter" instead.
</p>
<ul><li>Alexander Rødseth (rodseth "@" gmail.com)
</li></ul>Resultshttps://prime.haskell.org/ticket/125#changelog
https://prime.haskell.org/ticket/124
https://prime.haskell.org/ticket/124#124: Do not import the Prelude by default for proper modulesSun, 25 Mar 2007 15:03:22 GMTIan Lynagh<p>
In a cross-posted thread starting:
</p>
<ul><li><a class="ext-link" href="http://www.haskell.org/pipermail/libraries/2007-March/007236.html"><span class="icon"></span>http://www.haskell.org/pipermail/libraries/2007-March/007236.html</a>
</li><li><a class="ext-link" href="http://www.haskell.org/pipermail/haskell-cafe/2007-March/023826.html"><span class="icon"></span>http://www.haskell.org/pipermail/haskell-cafe/2007-March/023826.html</a>
</li></ul><p>
it was proposed that a module beginning <code>module Foo</code> would not implicitly import the Prelude. Modules without this would still import the Prelude. Interactive environments would have the Prelude in scope unless they have loaded a module beginning <code>module Foo</code>.
</p>
<p>
In terms of changes to the report, 5.1 "Module Structure" would be changed to say that if no header is given then
</p>
<pre class="wiki">module Main (main) where
import Prelude
</pre><p>
is prepended.
</p>
<p>
See also <a class="new ticket" href="https://prime.haskell.org/ticket/58" title="#58: task: prelude re-organisation proposal (new)">#58</a> and <a class="wiki" href="https://prime.haskell.org/wiki/Prelude">Prelude</a>.
</p>
Resultshttps://prime.haskell.org/ticket/124#changelog
https://prime.haskell.org/ticket/123
https://prime.haskell.org/ticket/123#123: Fix Ord so Ord Double and Ord Float make senseThu, 22 Mar 2007 00:08:36 GMTIan Lynagh<p>
Consider:
</p>
<pre class="wiki">let n = 0/0 :: Double in (n `compare` n, n < n, n == n, n > n)
</pre><p>
In GHC and YHC this gives
</p>
<pre class="wiki">(GT,False,False,False)
</pre><p>
while in hugs it gives
</p>
<pre class="wiki">(EQ,False,False,False)
</pre><p>
Neither of these is very satisfactory, as I would expect
</p>
<pre class="wiki">x `compare` y === EQ => (x == y) === True
x `compare` y === GT => (x > y) === True
</pre><p>
and it's even less pleasant that the implementations differ for no good
reason.
</p>
<p>
The Haskell report isn't currently very helpful on how comparing exceptional
Doubles should behave, as it doesn't even say you need to have NaN etc:
</p>
<pre class="wiki">http://haskell.org/onlinereport/basic.html#sect6.4
The results of exceptional conditions (such as overflow or
underflow) on the fixed-precision numeric types are undefined; an
implementation may choose error (_|_, semantically), a truncated
value, or a special value such as infinity, indefinite, etc.
</pre><p>
Four possible solutions to the problem have been proposed.
While Haskell' would presumably continue not to legislate what
implementations should do in this case, some of the solutions
require changes to the report, so we do need to discuss it in
the context of Haskell'.
</p>
<p>
The possible solutions are:
</p>
<ul><li><code>compare</code> should raise an exception (Haskell' doesn't need to be changed)
</li><li><code>compare</code>, <code>(<)</code>, <code>(>)</code>, etc should raise an exception (Haskell' doesn't need to be changed)
</li><li>There should be no <code>Ord</code> instance for <code>Float</code> and <code>Double</code> (changes needed for Haskell')
</li><li>Add an <code>Incomparable</code> constructor to <code>Ordering</code> (changes needed for Haskell')
</li></ul>Resultshttps://prime.haskell.org/ticket/123#changelog
https://prime.haskell.org/ticket/122
https://prime.haskell.org/ticket/122#122: clarify literate script syntaxThu, 15 Mar 2007 01:13:57 GMTIan Lynagh<p>
The syntax for literate scripts needs to be clarified. See the thread
<a class="ext-link" href="http://www.haskell.org/pipermail/haskell-cafe/2007-March/023027.html"><span class="icon"></span>http://www.haskell.org/pipermail/haskell-cafe/2007-March/023027.html</a>
for more details.
</p>
<p>
The report should also give a reference unlitter. I'll attach (an untested) one from the above thread.
</p>
Resultshttps://prime.haskell.org/ticket/122#changelog
https://prime.haskell.org/ticket/121
https://prime.haskell.org/ticket/121#121: ExitCode consistencyWed, 14 Mar 2007 23:26:56 GMTIan Lynagh<p>
Haskell 98 says
</p>
<pre class="wiki">Computation system cmd returns the exit code produced when the operating system processes the command cmd.
</pre><p>
and
</p>
<pre class="wiki">The exact interpretation of code is operating-system dependent.
</pre><p>
However, on Unix systems <code>system "exit 3" >>= print</code> prints <code>ExitFailure 3</code> under ghc and hugs, but <code>ExitFailure 768</code> under nhc98, despite both being the same operating system.
</p>
<p>
It may not be possible to fix this within the boundaries of the report, but Something Must Be Done somewhere.
</p>
<p>
Additionally, the report says
</p>
<pre class="wiki">The value exitFailure is equal to exitWith (ExitFailure exitfail), where exitfail is implementation-dependent.
</pre><p>
while <code>operating-system dependent</code> seems better than <code>implementation-dependent</code>.
</p>
Resultshttps://prime.haskell.org/ticket/121#changelog
https://prime.haskell.org/ticket/120
https://prime.haskell.org/ticket/120#120: Should sum and product be strict? Or have strict variants?Sun, 11 Mar 2007 22:59:55 GMTIan Lynagh<p>
Currently sum and product are lazy according to the report. GHC matches the report, while hugs makes them strict. nhc98 recently made them strict, but reverted to lazy upon the report's definition being pointed out.
</p>
<p>
For most cases, such as summing a list of Ints or Integers, strict behaviour is desirable. Thus we propose that either sum and product are made strict (i.e. use foldl') or strict variants sum' and product' are made available as well.
</p>
<p>
Here is a program to demonstrate the difference:
</p>
<pre class="wiki">import Data.List
data Foo = Zero | A | B | C
deriving (Eq, Show)
instance Num Foo where
_ + Zero = error "Adding Zero"
_ + A = error "Adding A"
_ + B = error "Adding B"
_ + C = C
fromInteger 0 = Zero
xs = [A, B, C]
f = foldl (+) 0 xs
f' = foldl' (+) 0 xs
s = sum xs
</pre><p>
GHC and Haskell 98 say:
</p>
<pre class="wiki">*Main> f
C
*Main> f'
*** Exception: Adding A
*Main> s
C
*Main>
</pre><p>
while hugs and this proposal say:
</p>
<pre class="wiki">Main> f
C
Main> f'
Program error: Adding A
Main> s
Program error: Adding A
Main>
</pre>Resultshttps://prime.haskell.org/ticket/120#changelog
https://prime.haskell.org/ticket/119
https://prime.haskell.org/ticket/119#119: splitAt should be strict in its first argumentMon, 05 Mar 2007 22:55:37 GMTIan Lynagh<p>
The below is a slightly editted version of <a class="ext-link" href="http://hackage.haskell.org/trac/ghc/ticket/1182"><span class="icon"></span>http://hackage.haskell.org/trac/ghc/ticket/1182</a>
</p>
<hr />
<p>
The <a class="ext-link" href="http://haskell.org/onlinereport/standard-prelude.html"><span class="icon"></span>H98 report</a> defines <code>splitAt</code> by:
</p>
<pre class="wiki">splitAt :: Int -> [a] -> ([a],[a])
splitAt n xs = (take n xs, drop n xs)
</pre><p>
So we would expect:
</p>
<pre class="wiki">splitAt _|_ xs = (take _|_ xs, drop _|_ xs)
</pre><p>
however, both GHC and hugs have (different) implementations that are strict in 'n', that is:
</p>
<pre class="wiki">split _|_ xs = _|_
</pre><p>
These cases can be distinguished with the expression:
</p>
<pre class="wiki">case splitAt undefined [] of (_,_) -> ()
</pre><p>
We propose splitAt be changed to be strict in its first argument for Haskell'.
</p>
Resultshttps://prime.haskell.org/ticket/119#changelog
https://prime.haskell.org/ticket/118
https://prime.haskell.org/ticket/118#118: Remove libraries from the report (to the greatest extent possible)Mon, 05 Mar 2007 22:23:14 GMTIan Lynagh<p>
There is a tension between having the
ability to fix and evolve the libraries, and people wanting to write
books on how to use Haskell' (without having to define (+) and map etc
themselves!).
</p>
<p>
We've been lucky thus far that having the hierarchial libraries
completely disjoint with the report has meant that we have been able add
to and alter things even in the base package without breaking anything
assuming Haskell 98. We haven't had to worry about clashing with a user's
<code>Data.Function</code> module as the Haskell 98 namespace is flat, nor worry whether
adding an <code>on</code> function will cause ambiguous-import errors in someone's
Haskell 98 program.
</p>
<p>
We still get the occasional person in #haskell asking why they can't
find the <code>fromInt</code> their book talks about, and I think that was probably
published in the 90s?
</p>
<p>
This proposal is that books should be about
</p>
<pre class="wiki">Haskell', base 3.0.* and mtl 2.1.*
</pre><p>
and Haskell'
should say pretty much nothing about libraries. This gives book writers
the ability to target something (and even if newer library versions come out,
the old ones will still be available; old branches can even be maintained so they
stay working with newer implementations if necessary) while still letting us
remain agile.
</p>
<p>
The report will probably need to continue to use things like <code>head</code> in
non-normative sections such as examples.
</p>
<p>
There will probably also need to be a package defined by Haskell' that includes things like seq and the derivable classes. It might also define IO primitives etc,
but these might be better left unspecified, with the (portable) <code>io</code> package depending on <code>$impl-io</code> (e.g. <code>ghc-io</code>) which defines suitable primitives for the implementation.
</p>
Resultshttps://prime.haskell.org/ticket/118#changelog
https://prime.haskell.org/ticket/117
https://prime.haskell.org/ticket/117#117: Allow unnamed record fieldsSun, 04 Mar 2007 14:37:57 GMTIan Lynagh<p>
It would be nice to be able to have unnamed fields in a record to save having to invent names for everything, e.g.
</p>
<pre class="wiki">data Foo = Foo { _ :: Int, _ :: Char, pos :: Position }
| Bar { _ :: String, pos :: Position }
</pre><p>
The <code>Show</code> instance would have to use the non-record syntax, but other than that I don't think there would be any problems.
</p>
Resultshttps://prime.haskell.org/ticket/117#changelog
https://prime.haskell.org/ticket/116
https://prime.haskell.org/ticket/116#116: Read Char instance, for [Char], and ['a', 'b'] syntaxSun, 04 Mar 2007 14:30:30 GMTIan Lynagh<p>
Haskell 98, in section 10.4, states:
</p>
<pre class="wiki">readsPrec will parse any valid representation of the standard types apart
from strings, for which only quoted strings are accepted
</pre><p>
hugs follows this:
</p>
<pre class="wiki">Hugs.Base> read "['a', 'b']" :: String
"
Program error: Prelude.read: no parse
</pre><p>
while GHC ignores it:
</p>
<pre class="wiki">Prelude> read "['a', 'b']" :: String
"ab"
</pre><p>
The GHC libraries source shows that this is a wilful variation from H98:
</p>
<pre class="wiki"> readListPrec =
parens
( do L.String s <- lexP -- Looks for "foo"
return s
+++
readListPrecDefault -- Looks for ['f','o','o']
) -- (more generous than H98 spec)
</pre><p>
I do not see the point of this inconsistency, so I believe we should consider changing it for Haskell'.
</p>
Resultshttps://prime.haskell.org/ticket/116#changelog
https://prime.haskell.org/ticket/115
https://prime.haskell.org/ticket/115#115: Complex arithmetic misbehaves in boundary casesTue, 02 Jan 2007 18:08:19 GMT<p>
Consider complex multiplication. If we have a number x+iy and multiply this number by i we get -y+ix.
Let us try the same thing in Haskell with IEEE floating point:
let inf = 1.0/0.0
</p>
<blockquote>
<p>
a = 1 :+ inf
i = 0 :+ 1
</p>
</blockquote>
<p>
in a * i
This comes out as (-Infinity) :+ NaN when it should have been (-Infinity) :+ 1.0.
It is not just a made up problem, see, e.g., <a class="ext-link" href="http://www.cs.berkeley.edu/~wkahan/Curmudge.pdf"><span class="icon"></span>http://www.cs.berkeley.edu/~wkahan/Curmudge.pdf</a>
</p>
<p>
We should address this problem. I have not yet determined if testing for
a real part of 0 in multiplication (and division) is sufficent, but I think
it is. I will be back with more information on the fix.
</p>
<blockquote>
<p>
— Lennart
</p>
</blockquote>
Resultshttps://prime.haskell.org/ticket/115#changelog
https://prime.haskell.org/ticket/114
https://prime.haskell.org/ticket/114#114: introduce lambda-match (explicit match failure and fall-through)Mon, 30 Oct 2006 23:19:16 GMTclaus.reinke@…<h2 id="name:">name:</h2>
<p>
<strong>introduce lambda-match (explicit match failure and fall-through)</strong>
</p>
<h2 id="summary:">summary:</h2>
<p>
Haskell 98 provides *two different translations* of lambda
abstractions involving pattern matching, only one of which is
directly accessible (Section 3.3 - the other is embedded in the
translation of do-notation, see "ok" in Section 3.14).
</p>
<p>
Providing explicit source notation for the second translation,
substantially simplifies programmability of pattern-match
fall-through by reification of pattern-match failure, two
central language features that are so far only available
through the built-in, non-composable case construct.
</p>
<h2 id="what:">what:</h2>
<p>
In Section 3.3, the translation for conventional lambda
abstractions with patterns is given as
</p>
<pre class="wiki"> [| \p1 .. pn-> e |] = \x1 .. xn-> case (x1,..,xn) of
(p1,..,pn) -> e
</pre><p>
with xi fresh identifiers, and pattern-match failure resulting in
_|_. the latter is unfortunate, and results in partial functions the
coverage of which cannot be combined, but it is forced by
translation into conventional lambda calculus.
</p>
<p>
since computational lambda calculus (\-M) has become a central part
of Haskell programming practice, there shall be an alternative form
of lambda abstraction, dubbed here <strong>lambda-match</strong>, with associated
translation into \-M:
</p>
<pre class="wiki"> [| |p1 .. pn-> e |] = \x1 .. xn-> case (x1,..,xn) of
{ (p1,..,pn) -> return e;
_ -> fail "no match" }
</pre><p>
<em>[note1: this is the translation in principle - in practice, to enable composition of lambda-matches without further language extensions, a slight modification is needed, wrapping the right-hand sides of the case in a Match constructor, see library, examples, and patch]</em>
</p>
<p>
a library for composing these lambda-matches provides for
composition of alternative lambda-matches ( <code>(+++)</code> ), match failure
(<code>nomatch</code>, <code>matchError <message></code>) and embedding of the explicit
match monad into pure expressions (<code>splice</code>, where
<code> \p1..pn->e = splice |p1..pn->e </code>, also <code>spliceE</code> -preserving
error messages by using <code>(Either String)</code> as the match monad, and
<code>allMatches</code>, using the <code>[]</code> monad to deliver all successful matches).
other lambda-match related auxiliaries include <code>caseOf</code> as a
user-defined version of <code>case _ of _</code>, argument supply to matches
( <code>(>|)</code> ), and joining of nested matches (so that, for instance
</p>
<pre class="wiki"> nest (|<outer>-> (|<inner>-> expr)) = (|<outer> <inner>-> expr)
</pre><p>
).
</p>
<p>
<em>[note2: an alternative translation would use do-notation instead of case as the target:
</em></p>
<pre class="wiki"> [| |p1 .. pn-> e |] = \x1 .. xn-> do {
(p1,..,pn) <- return (x1,..,xn);
return e }
</pre><p>
both translations easily accomodate guards and pattern guards as well, the former by building on existing support for these two features in case constructs, the latter without requiring any previous implementation of pattern guards, by lifting (pattern)guards into the match monad:
</p>
<pre class="wiki"> [| pat <- expr |] = pat <- return expr
[| expr |] = guard expr
</pre><p>
]<em>
</em></p>
<h2 id="implementationimpact:">implementation impact:</h2>
<p>
minimal - limited to an extension in parser/desugarer, employing
previously inaccessible syntax for lambda-match, and a slight
variation of the existing lambda translation; also adds a small
library to support composition of matches.
</p>
<p>
<em>[note3: an updated draft of the composition library and a patch for GHC (about a dozen new lines in the parser, changed from the original proposal email only in requiring parentheses) are provided as attachments to this proposal, together with some examples (updated since original email). please add patches for other Haskell implementations, and test whether they can handle the library code (tried for Hugs and GHC)]</em>
</p>
<h2 id="motivation:">motivation:</h2>
<ol><li>patterns/guards in lambda abstractions are of limited use if match failure cannot be handled
</li></ol><ul><li>match failure in lambda abstractions can only lead to an exception
</li></ul><ol start="2"><li>the only direct way of handling match-failure and fall-through to other alternatives, without something like lambda-match, is not by composing alternatives, but within the built-in construct case; a slightly more indirect way employs the built-in do notation, where again the functionality is not available to (monadic) composition, but only within the do notation
</li></ol><ol start="3"><li>workarounds to mimick the functionality of lambda-match without syntactic sugar (translating into lambda+do or lambda+case) are so cumbersome and unreadable as to be unusable in practice (translating into lambda+list-comprehension is almost readable, but restricted to lists). compare:
<pre class="wiki"> (|(Just x)-> x)
\fresh->do { Just x <- return fresh; return x }
\fresh->case fresh of { Just x -> return x; _ -> fail "no match" }
\fresh->[ x | Just x <- [fresh] ]
</pre></li></ol><ol start="4"><li>since the functionality is already available in the language, and even explicitly used in the report for a feature as frequently used as the do notation, there should be a language construct making this functionality directly accessible
</li></ol><ul><li>the functions named "ok", constructed in Section 3.14 of the report, can be expressed directly using lambda-match (the library contains a function <code>ok</code> for this purpose)
<pre class="wiki"> do { p <- e; stmts } = e >>= ok (|p-> stmts)
</pre></li></ul><ol start="5"><li>unlike lambda, lambda-match truly expresses a single alternative in a case statement, as a first-class language expression - it can be named, passed as parameter or result, manipulated as a function, and composed with other alternatives. as a corollary, lambda, case, and other monadic abstractions can be defined easily in terms of lambda-match and its support library
<pre class="wiki"> - splice (|x->expr) = \x->expr
- case expr of { pat -> expr; ..} = caseOf expr $ (| pat -> expr ) +++ ..
- ok (|pat->do statements) = \fresh->do { pat <- return fresh; statements }
</pre></li></ol><ol start="6"><li>while the present proposal suggests lambda-match as a small extension to the language, it also lays the groundwork for a major simplification
</li></ol><ul><li>as points 4 and 5 indicate, several core constructs of Haskell need no longer be considered as built into the language, but become user-definable; this would simplify the language definition, implementations, teaching, learning, and tool building
</li></ul><ol start="7"><li>although the present lambda-match proposal is fairly conservative, it also aims to lay the groundwork for a substantial increase in language expressiveness
</li></ol><ul><li>the fundamental idea, used here only to reify pattern-match failure and fall-through, is that of replacing built-in pattern matching with user-definable monadic data parsers and associated combinators
</li></ul><ul><li>this same idea lies at the heart of a more radical decomposition of pattern-matching, which has been studied in the literature as first-class patterns (eg, Tullsen, PADL2000)
</li></ul><ul><li>having pattern-match alternatives as first-class language constructs also paves the way for user-defined pattern abstractions, or more generally, views (various literature)
</li></ul><p>
this completes the main part of this proposal.
</p>
<hr />
<p>
relevant mailing list threads include the main proposal thread and an examples thread demonstrating monadic data parsing and views:
</p>
<ul><li><a class="ext-link" href="http://www.haskell.org/pipermail/haskell-prime/2006-October/001797.html"><span class="icon"></span>http://www.haskell.org/pipermail/haskell-prime/2006-October/001797.html</a>
</li></ul><ul><li><a class="ext-link" href="http://www.haskell.org/pipermail/haskell-prime/2006-November/001892.html"><span class="icon"></span>http://www.haskell.org/pipermail/haskell-prime/2006-November/001892.html</a>
</li></ul><ul><li><a class="ext-link" href="http://www.haskell.org/pipermail/haskell-prime/2006-November/001915.html"><span class="icon"></span>http://www.haskell.org/pipermail/haskell-prime/2006-November/001915.html</a>
</li></ul><hr />
<h2 id="contextandreferences:">context and references:</h2>
<p>
as has been pointed out in the thread on replacing and improving
pattern guards, Haskell's pattern matching support, even before
pattern guards, is monolithic (built-in case is the only way to handle
multiple alternative matches) rather than compositional (lambdas
seem to represent individual alternatives, but cannot be composed on
match fall-through). this implies increased complexity of the language
definition, limited expressiveness of its features, and more difficult
reasoning, when compared with alternative models (eg, Wolfram Kahl has
suggested to adapt his pattern match calculus for Haskell). see, eg.:
</p>
<p>
<a class="ext-link" href="http://www.haskell.org/pipermail/haskell-prime/2006-October/001713.html"><span class="icon"></span>http://www.haskell.org/pipermail/haskell-prime/2006-October/001713.html</a>
<a class="ext-link" href="http://www.haskell.org/pipermail/haskell-prime/2006-October/001720.html"><span class="icon"></span>http://www.haskell.org/pipermail/haskell-prime/2006-October/001720.html</a>
<a class="ext-link" href="http://www.haskell.org/pipermail/haskell-prime/2006-October/001723.html"><span class="icon"></span>http://www.haskell.org/pipermail/haskell-prime/2006-October/001723.html</a>
<a class="ext-link" href="http://www.haskell.org/pipermail/haskell-prime/2006-October/001724.html"><span class="icon"></span>http://www.haskell.org/pipermail/haskell-prime/2006-October/001724.html</a>
</p>
<p>
as well as the PMC home page
</p>
<p>
<a class="ext-link" href="http://www.cas.mcmaster.ca/~kahl/PMC/"><span class="icon"></span>http://www.cas.mcmaster.ca/~kahl/PMC/</a>
</p>
<p>
and a newer thread discussing some differences between
this lambda-match proposal and PMC
</p>
<p>
<a class="ext-link" href="http://www.haskell.org/pipermail/haskell-prime/2006-October/001823.html"><span class="icon"></span>http://www.haskell.org/pipermail/haskell-prime/2006-October/001823.html</a>
</p>
<p>
in principle, replacing Haskell's current pattern matching support
with a simpler, more compositional model, and defining the current
constructs on top of that new core is the way forward, IMHO. in
practice, however, I suspect that the committee is less than tempted
to introduce such a substantial simplification for Haskell'.
</p>
<p>
the present proposal is an attempt at a compromise, suggesting a
minimal language change to introduce compositional pattern-match
failure and fall-through. with lambda-match, it implements only a
single language extension (as syntactic sugar), delegating the rest
of the functionality to a library. without the sugar, the result of the
by-hand translation becomes so hard to read as to be near
unusable, while the chosen form of sugaring allows to provide
most of the language features discussed in the earlier threads to
be provided as a library. this does seem to be a useable balance.
</p>
<p>
building constructs of the simpler pattern-match model on top of
the more complex one is somewhat irksome from a language design
perspective, but does at least gain the expressiveness of the simpler
model. if programmers make substantial use of this new functionality
in Haskell' (as I strongly suspect they will - I have been doing similar
translations by hand for some time now), it will be up to Haskell' ' to
turn the table, and to define the current complex model on top of a
compositional one.
</p>
<p>
as a preview of this anticipated language refactoring;), it is instructive
to compare the two alternative translations of lambda-match sketched
above:
</p>
<ul><li>the first directly builds on the existing, complex case constructs with their built-in (pattern) guards and match fall-through support; this eases adding the new, simpler features to implementations that support the old, complex ones (like GHC), but completely foregoes any attempt to simplify those implementations in the process; <em>[the attached patch for GHC follows this route]</em>
</li></ul><ul><li>the second translation avoids any direct reference to case, employing do-notation instead; this requires slightly more effort, eg. in translating pattern guards into the match monad, but is eminently suitable for adding the new features to implementations that do not support pattern guards yet, or that simply want to reduce the number of built-in constructs. <em>[patchers for Hugs, etc., might want to follow this route]</em>
</li></ul><p>
finally, while it is not directly relevant for the present proposal,
Tullsen's PADL 2000 paper investigates one way in which monadic data
parsing can be built on to go beyond first-class match alternatives
all the way to first-class patterns:
</p>
<p>
<a class="ext-link" href="http://citeseer.ist.psu.edu/tullsen00first.html"><span class="icon"></span>http://citeseer.ist.psu.edu/tullsen00first.html</a>
</p>
<p>
this, in turn, relates directly to Views and <a class="wiki" href="https://prime.haskell.org/wiki/PatternSynonyms">PatternSynonyms</a>.
</p>
Resultshttps://prime.haskell.org/ticket/114#changelog
https://prime.haskell.org/ticket/112
https://prime.haskell.org/ticket/112#112: Break unnecessary dependencies between Haskell numeric classesWed, 20 Sep 2006 19:51:39 GMT<p>
Motivation:
</p>
<p>
The Haskell numeric classes contain some interdependencies that look rather odd to a mathematician. For example, why do you have to be Show in order to be Num, and why do you have to be Enum in order to be Integral. These dependencies are not justified by mathematical considerations, and make it hard to represent some mathematical concepts in Haskell.
</p>
<p>
For example, consider the Gaussian integers - numbers of the form a+bi, where a and b are integers, and i is the square root of -1. (Complex Integer, if you like.) There is a division with remainder algorithm for the Gaussian integers, so that we would like to declare them as an instance of Integral, and define the quotRem function. However, to do this we would have to declare them as an instance of Enum - and this makes no sense - there is no natural way to define the Enum functions on the Gaussian integers.
</p>
<p>
For similar reasons, the dependency of Integral on Real is suspect - there is no natural way to define toRational on the Gaussian integers.
</p>
<p>
The dependency of <a class="missing wiki">RealFrac?</a> on Fractional is also unnecessary - what have floor, ceiling etc got to do with recip?
</p>
<p>
Note that breaking these dependencies will not break any existing code. At present, if I declare a type T to be a Num instance, I must also declare it to be an Eq instance and a Show instance. If the dependency is broken, that is, if
</p>
<p>
class (Eq a, Show a) ⇒ Num a
</p>
<p>
is replaced by
</p>
<p>
class Num a
</p>
<p>
then existing code will still work.
</p>
<p>
What will have changed is that it will now be possible to declare a type T to be a Num instance without also declaring it to be an Eq and a Show instance.
</p>
<p>
Proposal:
</p>
<p>
Conservative version:
</p>
<p>
Replace the existing Prelude class declarations with:
</p>
<ol><li>class Eq a ⇒ Num a — remove dependency on Show
</li></ol><ol start="2"><li>class Num a ⇒ Integral a — replace dependency on Real, Enum by dependency on Num
</li></ol><ol start="3"><li>class Real a ⇒ <a class="missing wiki">RealFrac?</a> a — remove dependency on Fractional
</li></ol><p>
Radical version:
</p>
<p>
In addition to the above:
</p>
<ol start="4"><li>Split abs and signum out from Num into a new
</li></ol><p>
class Num a ⇒ Quantity a
</p>
<p>
(There are plenty of objects in mathematics for which the arithmetical operations +,-,* make sense, but the size and direction operations abs and signum do not - for example polynomials, matrices.)
</p>
<ol start="5"><li>Amalgamate classes Real and <a class="missing wiki">RealFrac?</a> - Real no longer has any purpose as a distinct class. The new class should probably be called Real.
</li></ol><p>
See also: <a class="wiki" href="https://prime.haskell.org/wiki/NumericClasses">NumericClasses</a>.
</p>
Resultshttps://prime.haskell.org/ticket/112#changelog
https://prime.haskell.org/ticket/111
https://prime.haskell.org/ticket/111#111: remove local fixity declarationsMon, 18 Sep 2006 00:34:14 GMTDoaitse Swierstra<p>
On page 38 the language definition allows local fixity declarations. Since no-one seems to be using these, not to be aware of the possibility to do so, I propose to remove them. The necessity to inspect every block to see whether there are fixity declarations, and the necessity to parse all expressions twice is cumbersome.
</p>
Resultshttps://prime.haskell.org/ticket/111#changelog
https://prime.haskell.org/ticket/110
https://prime.haskell.org/ticket/110#110: Generalize types of IO actionsFri, 21 Apr 2006 18:33:30 GMT<p>
One nice way to structure programs is to use monad transformers on top of IO. For example, one common technique is to use StateT or ReaderT to propagate custom state through IO code. This technique has two problems
</p>
<p>
1) It requires one to use 'liftIO' rather a lot, which is mildly irritating
</p>
<p>
2) It makes it very difficult to use higher-order IO combinators, such as try or bracket, which is highly irritating
</p>
<p>
This proposal involves generalizing the types of standard IO functions to make this use-case easier.
</p>
<p>
Conservative proposal:
</p>
<p>
Generalize higher order IO combinators to take a MonadIO context. For example, try and catch would then have types
</p>
<pre class="wiki">try :: MonadIO m => m a -> m (Either Exception a)
catch :: MonadIO m => m a -> (Exception -> m a) - > m a
</pre><p>
This allows one to use custom monads built on IO and still do correct exception handling, etc. without having to do lots of nasty monad unwrapping/rewrapping.
</p>
<p>
NOTE: This is not possible to implement. there is no way to 'rewind' a monad
in a generic way in order to implement try or catch. - <a class="missing wiki">JohnMeacham?</a>
</p>
<p>
NOTE: An alternative is to use a different version of Control.Exception that defines a typeclass as follows:
</p>
<pre class="wiki">class MonadIO m => MonadException m where
catch :: m a -> (Exception -> m a) -> m a
block, unblock :: m a -> m a
</pre><p>
This can be implemented for the common monad transformers, and all the other exception functions can be implemented just using the methods in the above typeclass, or using liftIO with the existing functions. A full implementation (not fully tested though) is attached. — Brian Hulley
</p>
<p>
NOTE: Even though not all uses of IO can be eliminated (eg when defining callback functions to use with FFI), the importance of having an Exception module which is not tied to concrete <code>IO</code> is that it would allow library writers which require <code>block</code>, <code>bracket</code> etc to use the more general <code>MonadException</code> in place of <code>IO</code>. If library writers do not do this, users of the library, which may be other libraries etc, are also tied down to concrete <code>IO</code>, so the longer we leave it, the more difficult it will be to "unconcretise" the code base. — Brian Hulley
</p>
<p>
More radical proposal:
</p>
<p>
Generalize the types of all standard library IO routines to take MonadIO contexts. For example,
</p>
<p>
putChar :: MonadIO m ⇒ Char → m ()
</p>
<p>
getChar :: MonadIO m ⇒ m Char
</p>
<p>
These could easily be defined in terms of lower level IO primitives:
</p>
<p>
putCharIO :: Char → IO ()
</p>
<p>
putCharIO = …
</p>
<p>
putChar c = liftIO (putChar c)
</p>
<p>
Now you can eliminate a bunch of noisy calls to liftIO in client code.
</p>
<p>
NOTE: This should be quite trivial to implement for all functions which just use <code>IO</code> in the return value. When <code>IO</code> is used in other positions it is unlikely to be possible to implement except by replacing the other occurrence of <code>IO</code> by <code>MonadIOU</code> defined by:
</p>
<pre class="wiki"> class MonadIO m => MonadIOU m where
getUnliftIO :: m (m a -> IO a)
</pre><p>
Unfortunately only a few of the monad transformers support this operation (eg <code>ReaderT</code> ) but at least it's better than nothing. An alternative would be to define special typeclasses for related sets of operations if this would allow more monad transformers to be supported by the particular operations, or to add first-order api functions which a library user could use to build a specialised version of the higher order function for a specific monad. — Brian Hulley
</p>
Resultshttps://prime.haskell.org/ticket/110#changelog
https://prime.haskell.org/ticket/109
https://prime.haskell.org/ticket/109#109: split Enum into two typeclassesSun, 09 Apr 2006 23:26:41 GMT<p>
The current uses of Enum are somewhat confusing — this is partially because of the name, but partially because two seperate interfaces are glued together. One provides Enumeration of all possible values and conversion to integers for binary storage, and the other provides sequences of values (usually arithmetic) (which [a..b], etc desugar to).
</p>
<pre class="wiki">class Enum a where
succ, pred :: a -> a
toEnum :: Int -> a
fromEnum :: a -> Int
instance Enum Integer
instance Enum Int
instance Enum Bool
instance Enum Ordering
instance Enum Word...
</pre><pre class="wiki">class ArithmeticSequence a where
stepFrom :: a -> [a] -- [n..]
stepFromThen :: a -> a -> [a] -- [n, n'..]
stepFromTo :: a -> a -> [a] -- [n..m]
stepFromThenTo :: a -> a -> a -> [a] -- [n,n'..m]
instance ArithmeticSequence Integer
instance ArithmeticSequence Int
instance ArithmeticSequence Bool
instance ArithmeticSequence Ordering
instance ArithmeticSequence Float
instance ArithmeticSequence Double
instance ArithmeticSequence Rational
instance ArithmeticSequence Word...
...
</pre><p>
Steppable may be a preferrable name.
</p>
<p>
pros:
</p>
<ul><li>Clearly divides two seperate uses, while keeping functionality.
</li><li>Can re-introduce relationship between Ix and Enum?
</li></ul><p>
cons:
</p>
<ul><li>Yet another typeclass.
</li><li>Slightly misleading name, as non-arithmetic structures _should_ be supported. Also a bit long.
</li><li>Automatically supporting such isn't trivial if they're not in Enum, though.
</li></ul>Resultshttps://prime.haskell.org/ticket/109#changelog
https://prime.haskell.org/ticket/108
https://prime.haskell.org/ticket/108#108: make toEnum and fromEnum take and return IntegersSun, 09 Apr 2006 23:07:00 GMT<p>
Change the signature of toEnum and fromEnum in the Enum a typeclass to
</p>
<pre class="wiki"> toEnum :: Integer -> a
fromEnum :: a -> Integer
</pre><p>
(they currently use Int)
</p>
<p>
It's possible, for example, to have Enumeratable types that are larger than Int
</p>
<p>
pros: No overflow possibilities
</p>
<p>
cons: efficiency
</p>
Resultshttps://prime.haskell.org/ticket/108#changelog
https://prime.haskell.org/ticket/107
https://prime.haskell.org/ticket/107#107: Add assertionsTue, 04 Apr 2006 20:48:26 GMT<p>
GHC currently has a nice feature for assertions, which allow the programmer to insert a condition which is asserted to be true. If the condition is in fact false, an error is raised which contains the source code line of the assertion. A compiler flag allows all assertions to be disabled.
</p>
<p>
<a class="ext-link" href="http://www.haskell.org/ghc/docs/latest/html/users_guide/sec-assertions.html"><span class="icon"></span>http://www.haskell.org/ghc/docs/latest/html/users_guide/sec-assertions.html</a>
</p>
<p>
Possible variations:
</p>
<ol><li>Have a form of 'assert' which can take an arbitrary string to which the source file location is prepended.
</li><li>assert can tie in to imprecise exceptions, if they are adopted, or a failed assertion can be bottom
</li><li>Remove the source line feature (makes the proposal simpler, but less useful because now all you get is the compiler flag to turn assertions off)
</li></ol>Resultshttps://prime.haskell.org/ticket/107#changelog
https://prime.haskell.org/ticket/106
https://prime.haskell.org/ticket/106#106: Adding deepSeq/strict to Haskell' beside seq.Thu, 30 Mar 2006 22:51:03 GMTandy@…<p>
We are considering deepSeq for Haskell'.
See <a class="wiki" href="https://prime.haskell.org/wiki/deep_seq">deep_seq</a> for more details.
</p>
Resultshttps://prime.haskell.org/ticket/106#changelog
https://prime.haskell.org/ticket/105
https://prime.haskell.org/ticket/105#105: Disambiguate MonadPlusThu, 30 Mar 2006 05:49:17 GMTashley@…<p>
Reform the <code>MonadPlus</code> class along these lines:
</p>
<pre class="wiki">class Monad m => MonadZero m where
mzero :: m a
class MonadZero m => MonadPlus m where
mplus :: m a -> m a -> m a
class MonadZero m => MonadOr m where
morelse :: m a -> m a -> m a
</pre><p>
<a class="ext-link" href="http://haskell.org/haskellwiki/MonadPlus_reform_proposal"><span class="icon"></span>http://haskell.org/haskellwiki/MonadPlus_reform_proposal</a>
</p>
Resultshttps://prime.haskell.org/ticket/105#changelog
https://prime.haskell.org/ticket/104
https://prime.haskell.org/ticket/104#104: Add Time LibraryThu, 30 Mar 2006 05:38:12 GMTashley@…<ol><li>Add Data.Fixed module to the base package.
<a class="ext-link" href="http://semantic.org/TimeLib/doc/html/Data-Fixed.html"><span class="icon"></span>http://semantic.org/TimeLib/doc/html/Data-Fixed.html</a> <br />
<a class="ext-link" href="http://darcs.haskell.org/packages/time/fixed/Data/Fixed.hs"><span class="icon"></span>http://darcs.haskell.org/packages/time/fixed/Data/Fixed.hs</a>
</li></ol><ol start="2"><li>Add package "time" to the standard libraries.
<a class="ext-link" href="http://semantic.org/TimeLib/doc/html/"><span class="icon"></span>http://semantic.org/TimeLib/doc/html/</a> <br />
<a class="ext-link" href="http://darcs.haskell.org/packages/time/"><span class="icon"></span>http://darcs.haskell.org/packages/time/</a>
</li></ol><ol start="3"><li>Deprecate System.Time.
<a class="ext-link" href="http://haskell.org/ghc/dist/current/docs/libraries/base/System-Time.html"><span class="icon"></span>http://haskell.org/ghc/dist/current/docs/libraries/base/System-Time.html</a>
</li></ol>Resultshttps://prime.haskell.org/ticket/104#changelog
https://prime.haskell.org/ticket/103
https://prime.haskell.org/ticket/103#103: Make pattern bindings monomorphicWed, 29 Mar 2006 07:32:41 GMTSimon Peyton Jones<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/MonomorphicPatternBindings">MonomorphicPatternBindings</a>
</p>
Resultshttps://prime.haskell.org/ticket/103#changelog
https://prime.haskell.org/ticket/102
https://prime.haskell.org/ticket/102#102: add Liberal Type SynonymsTue, 28 Mar 2006 11:14:57 GMTSimon Marlow<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/LiberalTypeSynonyms">LiberalTypeSynonyms</a>
</p>
Resultshttps://prime.haskell.org/ticket/102#changelog
https://prime.haskell.org/ticket/101
https://prime.haskell.org/ticket/101#101: Class AliasesSun, 26 Mar 2006 00:43:25 GMT<p>
See <a class="ext-link" href="http://repetae.net/john/recent/out/classalias.html"><span class="icon"></span>http://repetae.net/john/recent/out/classalias.html</a>
</p>
<pre class="wiki">class alias Num a = (Additive a, AdditiveNegation a,
Multiplicative a, FromInteger a) where
one = fromInteger 1
zero = fromInteger 0
negate x = zero - x
</pre>Resultshttps://prime.haskell.org/ticket/101#changelog
https://prime.haskell.org/ticket/100
https://prime.haskell.org/ticket/100#100: Replace named fields with an extensible record systemThu, 23 Mar 2006 16:07:05 GMTmalcolm.wallace@…<p>
This proposal is to remove the existing named field system, and replace it with an extensible record system. Candidates for this new system are open for discussion, but Daan Leijen has several interesting variations which might be a good starting point.
</p>
Resultshttps://prime.haskell.org/ticket/100#changelog
https://prime.haskell.org/ticket/99
https://prime.haskell.org/ticket/99#99: Move existing named field (record) system to an addendum.Thu, 23 Mar 2006 16:03:58 GMTmalcolm.wallace@…<p>
This is a proposal to explicitly reject any new record system for Haskell-prime, but to keep the current named field system, possibly with some minor tweaking. However, the named field system would be moved to an addendum, which a future committee may see fit to discard in favour of some other record system.
</p>
<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/ExistingRecords">ExistingRecords</a>.
</p>
Resultshttps://prime.haskell.org/ticket/99#changelog
https://prime.haskell.org/ticket/98
https://prime.haskell.org/ticket/98#98: Restricted Data Types NowWed, 22 Mar 2006 00:12:00 GMT<p>
We should adopt Oleg's "Restricted Data Types Now" approach for simpler cases, like Functor, that don't involve creating new type classes.
</p>
<pre class="wiki">class Functor f a b where
fmap :: (a -> b) -> f a -> f b
instance (Ord a, Ord b) => Functor Data.Set.Set a b where
...
</pre>Resultshttps://prime.haskell.org/ticket/98#changelog
https://prime.haskell.org/ticket/97
https://prime.haskell.org/ticket/97#97: Collection library interfaceWed, 22 Mar 2006 00:04:48 GMT<p>
We should make a collection library interface, using whatever new features end up in Haskell'. See: <a class="ext-link" href="http://hackage.haskell.org/trac/ghc/wiki/CollectionClassFramework"><span class="icon"></span>http://hackage.haskell.org/trac/ghc/wiki/CollectionClassFramework</a>
</p>
Resultshttps://prime.haskell.org/ticket/97#changelog
https://prime.haskell.org/ticket/96
https://prime.haskell.org/ticket/96#96: Replace the array indexing operator, '!'Tue, 21 Mar 2006 13:50:38 GMTSimon Marlow<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/ArrayIndexing">ArrayIndexing</a>.
</p>
Resultshttps://prime.haskell.org/ticket/96#changelog
https://prime.haskell.org/ticket/95
https://prime.haskell.org/ticket/95#95: improve module interfacesWed, 22 Feb 2006 15:45:28 GMTmalcolm.wallace@…<p>
Proposal:
</p>
<p>
adopt <a class="wiki" href="https://prime.haskell.org/wiki/TagExportsWithNamespace">TagExportsWithNamespace</a> and <a class="wiki" href="https://prime.haskell.org/wiki/PermitSignaturesInExports">PermitSignaturesInExports</a>
</p>
<p>
I don't understand the <a class="missing wiki">NameSpace?</a> proposal: neither what it is trying to accomplish, not what it achieves. Could you be a little more explicit? Thanks, John
</p>
Resultshttps://prime.haskell.org/ticket/95#changelog
https://prime.haskell.org/ticket/94
https://prime.haskell.org/ticket/94#94: Syntax for specifing language extensionsThu, 16 Feb 2006 23:44:15 GMTpatrykz@…<p>
One of the original Haskell goals was to define a language for experimentation
with functional language features. This will not change with Haskell' - we
already know that at least one feature that is in high demand (FDs) is not ready
for inclusion in Haskell'.
</p>
<p>
However, Haskell still does not provide any internal mechanism to facilitate
language experimentation. In particular, the language does not provide
a mechanism for keeping track of the languaged extensions in used by
a particular piece of code.
</p>
<p>
To make things worse, many (most?) extension require lexical and/or
syntactic changes to the language. Some extensions in the past proved
to be incompatible, and not all compilers implement all extensions.
</p>
<p>
So, looking at a particular piece of code, how do we know which compiler
it can be compiled with, and which command-line flags do we pass to
which compiler? The answer is, simply, we don't.
</p>
<p>
Currently, we do this by introducing ugly GHC-specific pragmas, comments
in the documentation, and a plethora of similar half-measures.
</p>
<p>
I would like to propose a language feature to address this concern
once and for all. I know that a similar proposal has been circulated on the
Haskell mailing list in the past, but to the best of my knowledge, none of
the current tickets addresses this problem.
</p>
<h2 id="TheProposal">The Proposal</h2>
<p>
Add explicit syntax for documenting language extensions required to
compile a module.
</p>
<h2 id="TheProblem">The Problem</h2>
<ul><li>Current language does not provide a uniform extension mechanism.
</li><li>Pragmas (as currently used in GHC) are NOT suitable for this. Specifically,
by their design they are COMMENTS, and therefore should have no impact on
the language semantics. Unrecognized pragmas should be ignorable without
warnings, while, currently, if you omit the GHC options pragma for a module
that requires some syntactic extension, you will receive thousands of lexical
and syntactic errors completely unrelated to your extension.
</li><li>I <em>strongly</em> believe that compiler pragmas should ONLY be used for
extensions (such as <code>INLINE</code>, various <code>SPECIALIZE</code>, etc.) that have no impact
on the program semantics.
</li></ul><h2 id="TheSolution">The Solution</h2>
<p>
Add an <code>extension</code> clause to the language.
</p>
<p>
To avoid introduction of a new keyword, I propose to use the following syntax:
</p>
<pre class="wiki"> module -> [extensions;] "module" modid [exports] "where" body
| body
extensions -> extension_1 ; ... ; extension_n
extension -> "import" "extension" varid [extparam_1 ... extparam_n]
extparam -> varid | conid | literal
</pre><p>
A module using some GHC woo-hah extension would look like:
</p>
<pre class="wiki"> import extension GHC "woo-hah!"
module Foo ...
</pre><p>
Or, if an extension is common enough:
</p>
<pre class="wiki"> import extension fundeps
module Foo ...
</pre><p>
This is a very conservative syntax. It does not support grouping, aliasing and
renaming of extensions (as previously circulated on the haskell mailing list)
which I personally believe would be very a bad idea. I want to be able to look
at a piece of Haskell code and tell immediately which extensions it uses,
without being forced to browse through the included modules, etc. Further,
the parsers and lexers must be able to tell where the list of extensions finishes
and the module code (which uses these extensions) starts. The "module" keyword
is a natural candidate for that.
</p>
<p>
Extensions would NOT be exported by a module that uses that
extension, but would have to be specified separately by each module that uses the
features provided by that extension. For example, one often hides uses of unboxed
types, functional dependencies, etc, behind a curtain of abstract data types, and
such data type implemented using non-standard features can be happily used within
standard-conforming Haskell programs. On the other hand, if an extension is visible in
an interface exported by a module, it has to be named explicitly (with <code>import extension</code>
clauses) by any module importing that interface.
</p>
<p>
Extensions could be parametized, since I can readily imagine extensions that
would require such a thing. I would also recommend in the standard
that every compiler groups its own extensions under a common name (for
example, GHC, HUGS, JHC, NHC, etc.) until they are in sufficiently common use to be
standardized independently (such as fundeps), at which stage there should
probably be a corresponding addendum to the standard for that extension.
</p>
<p>
Specifying extensions before the <code>module</code> keyword ensures that the
lexer and parser can find them before parsing of the actual module. I
recommend that bare modules without the <code>module</code> keyword cannot specify any
extensions, and therefore must be written in pure Haskell'.
</p>
<p>
The standard itself should not define any extensions and state that
the standard grammar and semantics describes the base language in
absence of any <code>import extension</code> clauses.
</p>
<p>
Each extension, including FFI, should be described in a separate addendum.
Once an extension has been fully defined and tested in production code, it
may be <em>blessed</em> by including it in the list of addenda to the standard, at
which case its name will change from compiler-specific (eg. <code>GHC woohoo</code>)
to standard (eg. <code>woohoo</code>.)
</p>
<h3 id="Pros">Pros</h3>
<ul><li>Addresses a pending language design goal.
</li><li>Useful for automatic documentation tools such as Haddock, which could
even generate a hyperlink from an extension name to the relevant
addendum when available.
</li><li>Simple to implement.
</li><li>Neat syntax.
</li><li>Backwards-compatible (introduces no keyword polution.)
</li><li>Makes all information required to compile a program available directly
in the source code, rather than in ad-hoc places such as command-line,
Cabal package descriptions, documentation, comments, pragmas and what-not.
</li><li>Returns all comments (including pragmas) to their original code as
semantically-neutral annotations on the source program.
</li></ul><p>
</p>
<h3 id="Cons">Cons</h3>
<ul><li>Some implementation hassles. The compiler must use either a predicated
parser and lexer (I believe most do already) or else parse the module
until it finds the "module" keyword collecting the extension clauses,
and then parse the actual module using an appropriate parser and
lexer chosen according to the specified extensions.
</li></ul>Resultshttps://prime.haskell.org/ticket/94#changelog
https://prime.haskell.org/ticket/92
https://prime.haskell.org/ticket/92#92: add First Class LabelsSat, 11 Feb 2006 22:52:21 GMTclaus.reinke@…<p>
Designing the <em>right</em> record system for Haskell has proven to be tricky, the
only general agreement appearing to be that the old Haskell 98 records are not
sufficient. Yet the only record-related proposal ticket for Haskell' at this
stage is <a class="new ticket" href="https://prime.haskell.org/ticket/27" title="#27: task: create proposal(s): tweak the existing records system (new)">ticket:27</a>, "create proposal(s): tweak the existing records system".
</p>
<p>
Between the extremes of designing and implementing a new record systems on the
one hand and just trying to tweak what we've got, there are <em>opportunities
provided by Haskell's type class and instance language</em>. While not offering a
replacement for a well-integrated proper record system, <em>libraries
implementing record functionality can help to explore the gap between what we
want and what we have in Haskell records</em>. Examples include
</p>
<ul><li><a class="ext-link" href="http://homepages.cwi.nl/~ralf/HList/"><span class="icon"></span>Strongly typed heterogeneous collections</a>
</li><li><a class="attachment" href="https://prime.haskell.org/attachment/ticket/92/Data.Record.hs" title="Attachment 'Data.Record.hs' in Ticket #92">attachment:Data.Record.hs</a><a class="trac-rawlink" href="https://prime.haskell.org/raw-attachment/ticket/92/Data.Record.hs" title="Download"></a>
</li></ul><p>
<em>Any such libary will need to represent record field labels, and if record
field selection is based on type-level programming, each of these labels needs
to inhabit its own type.</em>
</p>
<p>
<strong>I propose to add implicitly declared record field labels as first class
values to Haskell' (<a class="wiki" href="https://prime.haskell.org/wiki/FirstClassLabels">FirstClassLabels</a>)</strong>, to support experimentation with and
use of such record libraries (such typed constants have other uses in
type-level programming as well).
</p>
<hr />
<p>
<span class="wikiextras phrase todo">TODO</span>
</p>
<ol><li>need to identify which interfaces labels should support
<ul><li>like constructors/constants: <a class="missing wiki">Read/Show/Matching?</a>
</li></ul></li></ol><ul><li>a type-level equality predicate would also be useful, but seems hard to define with current extensions (we want it to be generic, but with functional dependencies)
</li></ul><ol start="2"><li>could refine some of the record variants as libraries under Data.Record.VariantX
</li></ol><hr />
<p>
add impact information below:
</p>
<pre class="wiki">> option 1: syntax change (and '#' as an identifier prefix might
> conflict with other uses)
> option 2: non-trivial change of module/type system
> option 3: change of module hierarchy, re-interpretation of
> import behaviour for specific modules
>
> option 3 is the smallest change I could think of (perhaps with
> John's modification to import constructors instead of variables),
> and I've selected minor impact..
</pre>Resultshttps://prime.haskell.org/ticket/92#changelog
https://prime.haskell.org/ticket/91
https://prime.haskell.org/ticket/91#91: Unify various annotation proposalsSat, 11 Feb 2006 01:39:24 GMTijones<p>
Is an elegant, more specific proposal possible that will solve these problems?
</p>
<ol><li>Waldmann proposed <a class="new ticket" href="https://prime.haskell.org/ticket/88" title="#88: enhancement: unified and extensible annotations (new)">unified and extensible annotations</a>.
</li><li>Zadarnowski proposed <a class="ext-link" href="http://www.haskell.org//pipermail/haskell-prime/2006-February/000335.html"><span class="icon"></span>specifying language extensions</a>.
</li><li>There are some <a class="wiki" href="https://prime.haskell.org/wiki/NewPragmas">NewPragmas</a> which are <a class="new ticket" href="https://prime.haskell.org/ticket/51" title="#51: enhancement: add new pragmas (new)">under consideration</a>. These might be eliminated by annotations.
</li></ol>Resultshttps://prime.haskell.org/ticket/91#changelog
https://prime.haskell.org/ticket/90
https://prime.haskell.org/ticket/90#90: solve the MultiParamTypeClassDilemmaSat, 11 Feb 2006 00:41:36 GMTijones<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/MultiParamTypeClassesDilemma">a description of the dilemma</a>. This is not a proposal, but is related to a number of proposals that must be considered together:
</p>
<ol><li><a class="wiki" href="https://prime.haskell.org/wiki/MultiParamTypeClasses">MultiParamTypeClasses</a>
</li><li><a class="wiki" href="https://prime.haskell.org/wiki/FunctionalDependencies">FunctionalDependencies</a>
</li><li><a class="wiki" href="https://prime.haskell.org/wiki/AssociatedTypes">AssociatedTypes</a>
</li></ol>Resultshttps://prime.haskell.org/ticket/90#changelog
https://prime.haskell.org/ticket/89
https://prime.haskell.org/ticket/89#89: standardize the System.FilePath module for Haskell'Fri, 10 Feb 2006 23:01:48 GMTijonesResultshttps://prime.haskell.org/ticket/89#changelog
https://prime.haskell.org/ticket/88
https://prime.haskell.org/ticket/88#88: unified and extensible annotationsWed, 08 Feb 2006 10:27:17 GMTwaldmann@…<p>
We have several annotations in current Haskell:
deriving, <a class="ext-link" href="http://www.haskell.org/ghc/docs/6.4/html/users_guide/pragmas.html"><span class="icon"></span>pragmas</a> {-# #-}, {-! !-} (<a class="ext-link" href="http://repetae.net/~john/computer/haskell/DrIFT/"><span class="icon"></span>DrIFT</a>), <a class="ext-link" href="http://www.haskell.org/haddock/"><span class="icon"></span>haddock</a>…
These are ad-hoc, and not extensible by the programmer.
</p>
<p>
There are better ways:
</p>
<ul><li>C-sharp has <a class="ext-link" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vclrfcreatingcustomattributes.asp"><span class="icon"></span>custom attributes</a>.
</li><li>Java (1.5) has <a class="ext-link" href="http://java.sun.com/docs/books/tutorial/java/javaOO/annotations.html"><span class="icon"></span>annotations</a>.
</li></ul><p>
For me the important features are
</p>
<ul><li>An annotation is allowed basically at any declaration,
</li><li>and programmers can define their own annotations,
</li><li>and annotations can also have values.
</li><li>Also, they have a retention policy saying whether they should be visible at compile time or at run time, where compile time is for tools/preprocessors, and visibility at run time is helpful for reflection. (Would need some support from Data.Generics or thereabouts.)
</li></ul><p>
I have brought this <a class="ext-link" href="http://www.haskell.org//pipermail/haskell-prime/2006-February/000279.html"><span class="icon"></span>proposal</a> up on the mailing list and there was one <a class="ext-link" href="http://www.haskell.org//pipermail/haskell-prime/2006-February/000366.html"><span class="icon"></span>response</a>.
</p>
Resultshttps://prime.haskell.org/ticket/88#changelog
https://prime.haskell.org/ticket/87
https://prime.haskell.org/ticket/87#87: add dictionary definitions to wikiFri, 03 Feb 2006 18:51:36 GMTflippa<p>
Add some definitions of technical terms users of this wiki may not be familiar with.
</p>
<p>
An example might be Predicativity (or equally, Impredicativity) in the context of type systems. A starter definition for those might be:
</p>
<p>
"When talking about type systems, and ignoring historical context:
</p>
<ul><li>Predicative: type variables only instantiate to monotypes
</li><li>Impredicative: type variables may be instantiated to any type"
</li></ul>Resultshttps://prime.haskell.org/ticket/87#changelog
https://prime.haskell.org/ticket/86
https://prime.haskell.org/ticket/86#86: add PartialTypeAnnotations?Thu, 02 Feb 2006 18:03:20 GMTflippa<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/PartialTypeAnnotations">PartialTypeAnnotations</a>.
</p>
Resultshttps://prime.haskell.org/ticket/86#changelog
https://prime.haskell.org/ticket/85
https://prime.haskell.org/ticket/85#85: more liberal kind inferenceThu, 02 Feb 2006 12:48:40 GMTross@…<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/KindInference">KindInference</a> for a choice of proposals.
</p>
Resultshttps://prime.haskell.org/ticket/85#changelog
https://prime.haskell.org/ticket/84
https://prime.haskell.org/ticket/84#84: Kind AnnotationsThu, 02 Feb 2006 11:07:15 GMTmalcolm.wallace@…<p>
Add <a class="wiki" href="https://prime.haskell.org/wiki/KindAnnotations">KindAnnotations</a> to the language of type expressions.
</p>
Resultshttps://prime.haskell.org/ticket/84#changelog
https://prime.haskell.org/ticket/82
https://prime.haskell.org/ticket/82#82: Allow import declarations anywhere at the top levelTue, 31 Jan 2006 11:31:02 GMTSimon Marlow<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/AllowImportAnywhere">AllowImportAnywhere</a>.
</p>
Resultshttps://prime.haskell.org/ticket/82#changelog
https://prime.haskell.org/ticket/81
https://prime.haskell.org/ticket/81#81: scoping of type variables in class instancesTue, 31 Jan 2006 10:23:17 GMT<p>
The scoping of type variables in class instances is underspecified. GHC scopes them for the entire instance, Hugs does not.
</p>
<p>
GHC's approach is more expressive, it is sometimes needed - especially in combination with multi-parameter classes.
Example:
</p>
<pre class="wiki">class Ping a b where ping:: a->b
newtype A a = A a
instance (Show b,Ping a b) => Show (A a) where
show (A x) = show (ping x)
</pre><p>
This is ambiguous and thus rejected, but we could resolve the ambiguity by annotating 'ping' with its expected type a→b, but that only works if the scoping of the class instance extends to the member definition.
</p>
<h2 id="pros">pros</h2>
<p>
: extends expressiveness, implemented in GHC anyway, was underspecified in Haskell anyway
</p>
<h2 id="cons">cons</h2>
<p>
: very minor: it could break some existing programs as it makes some local functions non-polymorphic, though these would have been badly written
</p>
<p>
See also: <a class="ext-link" href="http://hackage.haskell.org/trac/haskell-prime/wiki/ScopedTypeVariables"><span class="icon"></span>http://hackage.haskell.org/trac/haskell-prime/wiki/ScopedTypeVariables</a>
</p>
Resultshttps://prime.haskell.org/ticket/81#changelog
https://prime.haskell.org/ticket/80
https://prime.haskell.org/ticket/80#80: Reform the monomorphism restrictionMon, 30 Jan 2006 16:47:21 GMTSimon Marlow<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/MonomorphismRestriction">MonomorphismRestriction</a>. There are several proposals on the table.
</p>
Resultshttps://prime.haskell.org/ticket/80#changelog
https://prime.haskell.org/ticket/79
https://prime.haskell.org/ticket/79#79: Natural numbersFri, 27 Jan 2006 11:12:58 GMTmalcolm.wallace@…<p>
Add a <a class="wiki" href="https://prime.haskell.org/wiki/Natural">Natural number</a> type to the pre-defined basic types.
</p>
Resultshttps://prime.haskell.org/ticket/79#changelog
https://prime.haskell.org/ticket/78
https://prime.haskell.org/ticket/78#78: Add infix type constructorsWed, 25 Jan 2006 13:29:21 GMTSimon Marlow<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/InfixTypeConstructors">InfixTypeConstructors</a>.
</p>
Resultshttps://prime.haskell.org/ticket/78#changelog
https://prime.haskell.org/ticket/77
https://prime.haskell.org/ticket/77#77: add MultiWayIfWed, 25 Jan 2006 13:06:04 GMTSimon Marlow<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/MultiWayIf">MultiWayIf</a>
</p>
Resultshttps://prime.haskell.org/ticket/77#changelog
https://prime.haskell.org/ticket/76
https://prime.haskell.org/ticket/76#76: Bang patternsTue, 17 Jan 2006 15:07:40 GMTSimon Peyton Jones<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/BangPatterns">BangPatterns</a>.
</p>
Resultshttps://prime.haskell.org/ticket/76#changelog
https://prime.haskell.org/ticket/74
https://prime.haskell.org/ticket/74#74: add some kind of concurrencySat, 17 Dec 2005 01:33:52 GMTijones<p>
<a class="wiki" href="https://prime.haskell.org/wiki/Concurrency">Concurrency</a> seems vital to modern applications.
</p>
Resultshttps://prime.haskell.org/ticket/74#changelog
https://prime.haskell.org/ticket/73
https://prime.haskell.org/ticket/73#73: add viewsSat, 17 Dec 2005 01:01:34 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/Views">Views</a>.
</p>
Resultshttps://prime.haskell.org/ticket/73#changelog
https://prime.haskell.org/ticket/72
https://prime.haskell.org/ticket/72#72: Make underscore 'caseless'Sat, 17 Dec 2005 00:59:45 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/Underscore">Underscore</a>.
</p>
Resultshttps://prime.haskell.org/ticket/72#changelog
https://prime.haskell.org/ticket/71
https://prime.haskell.org/ticket/71#71: Allow Undecidable InstancesSat, 17 Dec 2005 00:58:43 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/UndecidableInstances">UndecidableInstances</a>.
</p>
Resultshttps://prime.haskell.org/ticket/71#changelog
https://prime.haskell.org/ticket/70
https://prime.haskell.org/ticket/70#70: allow TypeSynonymInstancesSat, 17 Dec 2005 00:57:49 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/TypeSynonymInstances">TypeSynonymInstances</a>.
</p>
Resultshttps://prime.haskell.org/ticket/70#changelog
https://prime.haskell.org/ticket/69
https://prime.haskell.org/ticket/69#69: allow tuple sectionsSat, 17 Dec 2005 00:55:44 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/TupleSections">TupleSections</a>.
</p>
Resultshttps://prime.haskell.org/ticket/69#changelog
https://prime.haskell.org/ticket/68
https://prime.haskell.org/ticket/68#68: Eliminate tabsSat, 17 Dec 2005 00:54:00 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/Tabs">Tabs</a>.
</p>
Resultshttps://prime.haskell.org/ticket/68#changelog
https://prime.haskell.org/ticket/67
https://prime.haskell.org/ticket/67#67: add Scoped Type VariablesSat, 17 Dec 2005 00:51:57 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/ScopedTypeVariables">ScopedTypeVariables</a>.
</p>
Resultshttps://prime.haskell.org/ticket/67#changelog
https://prime.haskell.org/ticket/66
https://prime.haskell.org/ticket/66#66: make sure removal candidates are added as proposalsSat, 17 Dec 2005 00:50:44 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/RemovalCandidates">RemovalCandidates</a>.
</p>
Resultshttps://prime.haskell.org/ticket/66#changelog
https://prime.haskell.org/ticket/64
https://prime.haskell.org/ticket/64#64: add recursive do syntaxSat, 17 Dec 2005 00:48:52 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/RecursiveDo">RecursiveDo</a>.
</p>
Resultshttps://prime.haskell.org/ticket/64#changelog
https://prime.haskell.org/ticket/63
https://prime.haskell.org/ticket/63#63: "Informal Semantics of Pattern Matching", is a bit vague on matching record patterns.Sat, 17 Dec 2005 00:47:29 GMTijones<p>
should we delete this page: <a class="wiki" href="https://prime.haskell.org/wiki/RecordPatternMatching">RecordPatternMatching</a>?
</p>
Resultshttps://prime.haskell.org/ticket/63#changelog
https://prime.haskell.org/ticket/62
https://prime.haskell.org/ticket/62#62: allow data consructors to be exported and imported readonlySat, 17 Dec 2005 00:44:06 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/ReadonlyConstructors">ReadonlyConstructors</a>
</p>
Resultshttps://prime.haskell.org/ticket/62#changelog
https://prime.haskell.org/ticket/61
https://prime.haskell.org/ticket/61#61: replace the Read classSat, 17 Dec 2005 00:41:49 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/ReadClass">ReadClass</a>.
</p>
Resultshttps://prime.haskell.org/ticket/61#changelog
https://prime.haskell.org/ticket/60
https://prime.haskell.org/ticket/60#60: add RankNTypes or Rank2TypesSat, 17 Dec 2005 00:41:00 GMTijones<p>
See:
</p>
<ul><li><a class="wiki" href="https://prime.haskell.org/wiki/Rank2Types">Rank2Types</a>
</li><li><a class="wiki" href="https://prime.haskell.org/wiki/RankNTypes">RankNTypes</a>
</li></ul><p>
One is needed; we need to decide which.
</p>
Resultshttps://prime.haskell.org/ticket/60#changelog
https://prime.haskell.org/ticket/59
https://prime.haskell.org/ticket/59#59: Fix the lexical syntax for qualified identifiersSat, 17 Dec 2005 00:37:10 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/QualifiedIdentifiers">QualifiedIdentifiers</a>.
</p>
Resultshttps://prime.haskell.org/ticket/59#changelog
https://prime.haskell.org/ticket/58
https://prime.haskell.org/ticket/58#58: prelude re-organisation proposalSat, 17 Dec 2005 00:35:08 GMTijones<p>
see the concrete proposal at the bottom of this page: <a class="wiki" href="https://prime.haskell.org/wiki/Prelude">Prelude</a>.
</p>
<p>
See also <a class="new ticket" href="https://prime.haskell.org/ticket/124" title="#124: modification: Do not import the Prelude by default for proper modules (new)">#124</a>.
</p>
Resultshttps://prime.haskell.org/ticket/58#changelog
https://prime.haskell.org/ticket/57
https://prime.haskell.org/ticket/57#57: add polymorphic componentsSat, 17 Dec 2005 00:34:23 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/PolymorphicComponents">PolymorphicComponents</a>.
</p>
Resultshttps://prime.haskell.org/ticket/57#changelog
https://prime.haskell.org/ticket/55
https://prime.haskell.org/ticket/55#55: add Parallel List comprehensionsSat, 17 Dec 2005 00:32:01 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/ParallelListComp">ParallelListComp</a>.
</p>
Resultshttps://prime.haskell.org/ticket/55#changelog
https://prime.haskell.org/ticket/54
https://prime.haskell.org/ticket/54#54: add overlapping or incoherent instancesSat, 17 Dec 2005 00:31:28 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/OverlappingInstances">OverlappingInstances</a> and <a class="wiki" href="https://prime.haskell.org/wiki/IncoherentInstances">IncoherentInstances</a>.
</p>
Resultshttps://prime.haskell.org/ticket/54#changelog
https://prime.haskell.org/ticket/53
https://prime.haskell.org/ticket/53#53: Nondecreasing IndentationSat, 17 Dec 2005 00:22:19 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/NondecreasingIndentation">NondecreasingIndentation</a>.
</p>
Resultshttps://prime.haskell.org/ticket/53#changelog
https://prime.haskell.org/ticket/52
https://prime.haskell.org/ticket/52#52: Generalised deriving for newtypeSat, 17 Dec 2005 00:21:09 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/NewtypeDeriving">NewtypeDeriving</a>.
</p>
Resultshttps://prime.haskell.org/ticket/52#changelog
https://prime.haskell.org/ticket/51
https://prime.haskell.org/ticket/51#51: add new pragmasFri, 16 Dec 2005 23:58:08 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/NewPragmas">NewPragmas</a>.
</p>
Resultshttps://prime.haskell.org/ticket/51#changelog
https://prime.haskell.org/ticket/50
https://prime.haskell.org/ticket/50#50: get rid of unary '-' operatorFri, 16 Dec 2005 23:56:36 GMTijones<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/NegativeSyntax">NegativeSyntax</a>.
</p>
Resultshttps://prime.haskell.org/ticket/50#changelog