Haskell Prime: Ticket Query
https://prime.haskell.org/query?status=!closed&desc=1&order=summary
Haskell Language Report Working Groupen-USHaskell Primehttps://prime.haskell.org/chrome/site/HaskellLogo_2.jpg
https://prime.haskell.org/query?status=!closed&desc=1&order=summary
Trac 1.0.9
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/142
https://prime.haskell.org/ticket/142#142: typos in Haskell definitionSat, 20 Nov 2010 19:17:56 GMTigloo<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/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/119
https://prime.haskell.org/ticket/119#119: splitAt should be strict in its first argumentMon, 05 Mar 2007 22:55:37 GMTigloo@…<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 <tt>splitAt</tt> 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/109
https://prime.haskell.org/ticket/109#109: split Enum into two typeclassesSun, 09 Apr 2006 23:26:41 GMTguest<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/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/81
https://prime.haskell.org/ticket/81#81: scoping of type variables in class instancesTue, 31 Jan 2006 10:23:17 GMTguest<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/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/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/17
https://prime.haskell.org/ticket/17#17: relax restriction on signatures of class methodsFri, 16 Dec 2005 22:37:35 GMTijones<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/ClassMethodTypes">ClassMethodTypes</a>.
</p>
Resultshttps://prime.haskell.org/ticket/17#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="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/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/108
https://prime.haskell.org/ticket/108#108: make toEnum and fromEnum take and return IntegersSun, 09 Apr 2006 23:07:00 GMTguest<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/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/47
https://prime.haskell.org/ticket/47#47: make sure all minor library changes are added as proposals?Fri, 16 Dec 2005 23:49:57 GMTijones<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/MinorLibraryChanges">MinorLibraryChanges</a>. This might be too much to track w/ ticket system?
</p>
Resultshttps://prime.haskell.org/ticket/47#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 ( <tt>(+++)</tt> ), match failure
(<tt>nomatch</tt>, <tt>matchError <message></tt>) and embedding of the explicit
match monad into pure expressions (<tt>splice</tt>, where
<tt> \p1..pn->e = splice |p1..pn->e </tt>, also <tt>spliceE</tt> -preserving
error messages by using <tt>(Either String)</tt> as the match monad, and
<tt>allMatches</tt>, using the <tt>[]</tt> monad to deliver all successful matches).
other lambda-match related auxiliaries include <tt>caseOf</tt> as a
user-defined version of <tt>case _ of _</tt>, argument supply to matches
( <tt>(>|)</tt> ), 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 <tt>ok</tt> 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/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/21
https://prime.haskell.org/ticket/21#21: improve defaulting rulesFri, 16 Dec 2005 22:48:26 GMTijones<p>
see proposal on this page: <a class="wiki" href="https://prime.haskell.org/wiki/Defaulting">Defaulting</a>.
</p>
Resultshttps://prime.haskell.org/ticket/21#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
https://prime.haskell.org/ticket/45
https://prime.haskell.org/ticket/45#45: double check that all MinorFixes are listed as proposals, and minorFri, 16 Dec 2005 23:48:41 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/MinorFixes">MinorFixes</a>.
</p>
Resultshttps://prime.haskell.org/ticket/45#changelog
https://prime.haskell.org/ticket/27
https://prime.haskell.org/ticket/27#27: create proposal(s): tweak the existing records systemFri, 16 Dec 2005 23:01:21 GMTijones<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/ExistingRecords">ExistingRecords</a>. Create specific proposals for this.
</p>
<p>
Here's a proposal from David Roundy (found on Haskell mailing list):
</p>
<p>
I'd like to humbly submit a conservative proposal for changes to the
records mechanism for Haskell '06. The plan for Haskell '06 (to the
extent
that there is one) is to make it a conservative modification of Haskell
98, which is a good idea. As such, I don't think features should be
added
to the language that haven't been both implemented and tested, and the
problem with the whole records problem is that pretty much every
proposed
improvement is *not* backwards-compatible with Haskell 98, and therefore
hasn't been either implemented or tried out.
</p>
<p>
My idea is to make a small change, which will also not be
backwards-compatible with Haskell 98, but will *almost* be, and will be
hopefully forward-compatible with most complete solutions. At a
minimum,
the proposed change will allow the prototyping of real solutions as a
non-invasive preprocessor a la DrIFT.
</p>
<p>
My proposal is simply to remove the automatic declaration of accessor
functions. In Haskell 98,
</p>
<pre class="wiki">data FooBar = Foo { foo :: Int } | FooBar = { foo :: Int, bar :: Int }
</pre><p>
desugars to something like
</p>
<pre class="wiki">data FooBar = Foo Int | FooBar Int Int
foo :: FooBar -> Int
foo (Foo f) = f
foo (FooBar f _) = f
bar :: FooBar -> Int
bar (Foo _) = error "bad Foo"
bar (FooBar _ b) = b
</pre><p>
plus additional sugar for constructors and pattern matching. I would
leave
the sugar for constructors and pattern matching in place, but remove the
automatic declaration of functions "foo" and "bar".
</p>
<p>
This change "solves" the problem that different records in a single
namespace cannot share field names in a simple manner. In order to
allow
the writing of records code with is both valid Haskell 98 and valid
Haskell
'06, I'd suggest a pragma that causes the Haskell '06 compiler to
generate
the accessor functions. It's a bit ugly, but seems best to me. An
alternative would be a standard TH function to do the same, but I don't
know if TH is going to be included in Haskell '06.
</p>
<p>
This change may look like a step backwards (which it is), but I think
that
it would allow significant steps forward.
</p>
<p>
One open question (in my mind) would be whether we'd allow
</p>
<pre class="wiki">data Foo = FooInt { foo :: Int } | FooChar { foo :: Char }
</pre><p>
In the "new" system, there's no reason this need be illegal.
</p>
Resultshttps://prime.haskell.org/ticket/27#changelog
https://prime.haskell.org/ticket/22
https://prime.haskell.org/ticket/22#22: create DerivedInstances proposalFri, 16 Dec 2005 22:49:37 GMTijones<p>
There are a number of issues relating to <a class="wiki" href="https://prime.haskell.org/wiki/DerivedInstances">DerivedInstances</a>. Create concrete proposal(s) for them. See also <a class="wiki" href="https://prime.haskell.org/wiki/NewtypeDeriving">NewtypeDeriving</a>.
</p>
Resultshttps://prime.haskell.org/ticket/22#changelog
https://prime.haskell.org/ticket/19
https://prime.haskell.org/ticket/19#19: control export and import of class instancesFri, 16 Dec 2005 22:44:29 GMTijones<p>
Allow class instances to be imported or exported somehow.
</p>
Resultshttps://prime.haskell.org/ticket/19#changelog
https://prime.haskell.org/ticket/48
https://prime.haskell.org/ticket/48#48: clarify module system proposalsFri, 16 Dec 2005 23:52:02 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/ModuleSystem">ModuleSystem</a>. Lots of stuff here, not necessarily clear proposals.
</p>
Resultshttps://prime.haskell.org/ticket/48#changelog
https://prime.haskell.org/ticket/122
https://prime.haskell.org/ticket/122#122: clarify literate script syntaxThu, 15 Mar 2007 01:13:57 GMTigloo@…<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/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/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/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/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/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/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/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/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/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/49
https://prime.haskell.org/ticket/49#49: add multi parameter type classesFri, 16 Dec 2005 23:53:57 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/MultiParamTypeClasses">MultiParamTypeClasses</a> and the <a class="wiki" href="https://prime.haskell.org/wiki/MultiParamTypeClassesDilemma">dilemma</a> they cause.
</p>
Resultshttps://prime.haskell.org/ticket/49#changelog
https://prime.haskell.org/ticket/38
https://prime.haskell.org/ticket/38#38: add implicit parametersFri, 16 Dec 2005 23:35:41 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/ImplicitParams">ImplicitParams</a>.
</p>
Resultshttps://prime.haskell.org/ticket/38#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/18
https://prime.haskell.org/ticket/18#18: add closed classesFri, 16 Dec 2005 22:39:05 GMTijones<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/ClosedClasses">ClosedClasses</a>.
</p>
Resultshttps://prime.haskell.org/ticket/18#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 GMTGregWeber<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/15
https://prime.haskell.org/ticket/15#15: add a binary IO interfaceFri, 16 Dec 2005 22:29:58 GMTijones<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/BinaryIO">BinaryIO</a>.
</p>
Resultshttps://prime.haskell.org/ticket/15#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/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/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/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/77
https://prime.haskell.org/ticket/77#77: add MultiWayIfWed, 25 Jan 2006 13:06:04 GMTsimonmar@…<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/44
https://prime.haskell.org/ticket/44#44: add MagicUnderscoreFri, 16 Dec 2005 23:47:11 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/MagicUnderscore">MagicUnderscore</a>.
</p>
Resultshttps://prime.haskell.org/ticket/44#changelog
https://prime.haskell.org/ticket/43
https://prime.haskell.org/ticket/43#43: add Linear implicit paramsFri, 16 Dec 2005 23:46:01 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/LinearImplicitParams">LinearImplicitParams</a>.
</p>
Resultshttps://prime.haskell.org/ticket/43#changelog
https://prime.haskell.org/ticket/102
https://prime.haskell.org/ticket/102#102: add Liberal Type SynonymsTue, 28 Mar 2006 11:14:57 GMTsimonmar@…<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/41
https://prime.haskell.org/ticket/41#41: add LambdaCaseFri, 16 Dec 2005 23:41:54 GMTijones<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/LambdaCase">LambdaCase</a> (see also <a class="wiki" href="https://prime.haskell.org/wiki/MultiWayIf">MultiWayIf</a>, <a class="new ticket" href="https://prime.haskell.org/ticket/77" title="enhancement: add MultiWayIf (new)">#77</a>)
</p>
Resultshttps://prime.haskell.org/ticket/41#changelog
https://prime.haskell.org/ticket/39
https://prime.haskell.org/ticket/39#39: add ImpreciseExceptionsFri, 16 Dec 2005 23:36:48 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/ImpreciseExceptions">ImpreciseExceptions</a>.
</p>
<p>
(JL). We've had challenges with imprecise exceptions in practice. It is very easy to expect that the expression will have been evaluated (and hence the exception raised), and it wasn't. So the error is not caught. Worse, it may get evaluated later, and raise the exception outside the scope of the intended handler. *Imprecise* captures them well. They seem to be so imprecise as to be detremental.
</p>
<p>
(FJH). Having a standard deepSeq would help address most of the problems that JL is referring to, I think.
</p>
Resultshttps://prime.haskell.org/ticket/39#changelog
https://prime.haskell.org/ticket/37
https://prime.haskell.org/ticket/37#37: add GADTsFri, 16 Dec 2005 23:34:31 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/GADTs">GADTs</a>.
</p>
Resultshttps://prime.haskell.org/ticket/37#changelog
https://prime.haskell.org/ticket/36
https://prime.haskell.org/ticket/36#36: add FunctionalDependenciesFri, 16 Dec 2005 23:33:08 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/FunctionalDependencies">FunctionalDependencies</a>.
</p>
Resultshttps://prime.haskell.org/ticket/36#changelog
https://prime.haskell.org/ticket/34
https://prime.haskell.org/ticket/34#34: add ForeignDataFri, 16 Dec 2005 23:30:12 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/ForeignData">ForeignData</a>.
</p>
Resultshttps://prime.haskell.org/ticket/34#changelog
https://prime.haskell.org/ticket/32
https://prime.haskell.org/ticket/32#32: add FlexibleInstancesFri, 16 Dec 2005 23:27:17 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/FlexibleInstances">FlexibleInstances</a>.
</p>
Resultshttps://prime.haskell.org/ticket/32#changelog
https://prime.haskell.org/ticket/31
https://prime.haskell.org/ticket/31#31: add Flexible ContextsFri, 16 Dec 2005 23:23:22 GMTijones<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/FlexibleContexts">FlexibleContexts</a>.
</p>
Resultshttps://prime.haskell.org/ticket/31#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="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/29
https://prime.haskell.org/ticket/29#29: add ExtensibleExceptionsFri, 16 Dec 2005 23:05:42 GMTijones<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/ExtensibleExceptions">ExtensibleExceptions</a>. There are multiple proposals here, so we need to either add more tickets or narrow it down.
</p>
<p>
I (Simon M.) prefer Proposal 3.
</p>
<p>
John G. notes that this still doesn't let you subclass exceptions, which is often a useful idiom in Python and OO languages.
</p>
Resultshttps://prime.haskell.org/ticket/29#changelog
https://prime.haskell.org/ticket/26
https://prime.haskell.org/ticket/26#26: add ExistentialQuantificationFri, 16 Dec 2005 23:00:23 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/ExistentialQuantification">ExistentialQuantification</a>.
</p>
Resultshttps://prime.haskell.org/ticket/26#changelog
https://prime.haskell.org/ticket/33
https://prime.haskell.org/ticket/33#33: add BlockableFri, 16 Dec 2005 23:28:19 GMTijones<p>
see <a class="wiki" href="https://prime.haskell.org/wiki/ForeignBlocking">ForeignBlocking</a>.
</p>
Resultshttps://prime.haskell.org/ticket/33#changelog
https://prime.haskell.org/ticket/14
https://prime.haskell.org/ticket/14#14: add Associated TypesFri, 16 Dec 2005 22:28:23 GMTijones<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/AssociatedTypes">AssociatedTypes</a>.
</p>
Resultshttps://prime.haskell.org/ticket/14#changelog
https://prime.haskell.org/ticket/13
https://prime.haskell.org/ticket/13#13: add ArrowsFri, 16 Dec 2005 22:26:17 GMTijones<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/Arrows">Arrows</a>.
</p>
Resultshttps://prime.haskell.org/ticket/13#changelog
https://prime.haskell.org/ticket/141
https://prime.haskell.org/ticket/141#141: Whitespace fixesSat, 20 Nov 2010 00:44:37 GMTigloo<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 <tt>*->*->*-> *</tt> with a space before the last <tt>*</tt>.
</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 <tt>T</tt>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/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="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="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/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 <tt>INLINE</tt>, various <tt>SPECIALIZE</tt>, etc.) that have no impact
on the program semantics.
</li></ul><h2 id="TheSolution">The Solution</h2>
<p>
Add an <tt>extension</tt> 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 <tt>import extension</tt>
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 <tt>module</tt> keyword ensures that the
lexer and parser can find them before parsing of the actual module. I
recommend that bare modules without the <tt>module</tt> 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 <tt>import extension</tt> 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. <tt>GHC woohoo</tt>)
to standard (eg. <tt>woohoo</tt>.)
</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/140
https://prime.haskell.org/ticket/140#140: Small report fixesSat, 20 Nov 2010 00:37:20 GMTigloo<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/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 GMTigloo@…<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/98
https://prime.haskell.org/ticket/98#98: Restricted Data Types NowWed, 22 Mar 2006 00:12:00 GMTguest<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/28
https://prime.haskell.org/ticket/28#28: Require explicit quantification on all expression bound type sigaturesFri, 16 Dec 2005 23:02:43 GMTijones<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/ExplicitQuantification">ExplicitQuantification</a>.
</p>
Resultshttps://prime.haskell.org/ticket/28#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 GMTsimonmar@…<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/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/125
https://prime.haskell.org/ticket/125#125: Rename interact to iofilterThu, 02 Aug 2007 16:17:02 GMTguest<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/150
https://prime.haskell.org/ticket/150#150: Remove superclasses from NumSat, 26 Sep 2015 10:47:47 GMTquchen<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/155
https://prime.haskell.org/ticket/155#155: Remove return and >> from MonadSat, 26 Sep 2015 11:10:54 GMTquchen<p>
Due to the AMP <a class="new ticket" href="https://prime.haskell.org/ticket/146" title="modification: Add AMP hierarchy (new)">#146</a> <tt>Monad</tt> now contains two redundant bindings: <tt>return</tt> and <tt>>></tt> are already in <tt>Applicative</tt> as <tt>pure</tt> and <tt>*></tt>.
</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/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 GMTigloo@…<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
<tt>Data.Function</tt> module as the Haskell 98 namespace is flat, nor worry whether
adding an <tt>on</tt> 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 <tt>fromInt</tt> 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 <tt>head</tt> 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) <tt>io</tt> package depending on <tt>$impl-io</tt> (e.g. <tt>ghc-io</tt>) which defines suitable primitives for the implementation.
</p>
Resultshttps://prime.haskell.org/ticket/118#changelog
https://prime.haskell.org/ticket/80
https://prime.haskell.org/ticket/80#80: Reform the monomorphism restrictionMon, 30 Jan 2006 16:47:21 GMTsimonmar@…<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/116
https://prime.haskell.org/ticket/116#116: Read Char instance, for [Char], and ['a', 'b'] syntaxSun, 04 Mar 2007 14:30:30 GMTigloo@…<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/127
https://prime.haskell.org/ticket/127#127: QualifiedOperatorsWed, 08 Jul 2009 11:48:15 GMTsimonmar@…<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/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/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/131
https://prime.haskell.org/ticket/131#131: NoMonomorphismRestrictionSat, 25 Jul 2009 14:37:56 GMTigloo<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/144
https://prime.haskell.org/ticket/144#144: NoImplicitPreludeImportTue, 28 May 2013 01:39:30 GMTigloo<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="task: prelude re-organisation proposal (new)">#58</a>, <a class="new ticket" href="https://prime.haskell.org/ticket/124" title="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/139
https://prime.haskell.org/ticket/139#139: NoDatatypeContextsSun, 18 Jul 2010 19:52:01 GMTigloo<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/135
https://prime.haskell.org/ticket/135#135: NegateBindsTightlyWed, 24 Feb 2010 12:16:55 GMTsimonpj@…<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/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/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 <tt>-XRecordWildCards</tt>.
</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 <tt>-XNamedFieldPuns</tt> and <tt>-XDisambiguateRecordFields</tt>
</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/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/147
https://prime.haskell.org/ticket/147#147: Move Monad.fail into its own MonadFail classSat, 26 Sep 2015 10:11:34 GMTquchen<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/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/103
https://prime.haskell.org/ticket/103#103: Make pattern bindings monomorphicWed, 29 Mar 2006 07:32:41 GMTsimonpj@…<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/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/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 <tt>Read</tt> on bounded integral types in H98 is rather unfortunate:
</p>
<p>
{{{> read "33333333333333333333333333333" :: Int
-3520117339065068203}}}
</p>
<p>
The behaviour is similar for types in <tt>Data.Int</tt> and <tt>Data.Word</tt>.
</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/110
https://prime.haskell.org/ticket/110#110: Generalize types of IO actionsFri, 21 Apr 2006 18:33:30 GMTguest<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 <tt>IO</tt> is that it would allow library writers which require <tt>block</tt>, <tt>bracket</tt> etc to use the more general <tt>MonadException</tt> in place of <tt>IO</tt>. If library writers do not do this, users of the library, which may be other libraries etc, are also tied down to concrete <tt>IO</tt>, 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 <tt>IO</tt> in the return value. When <tt>IO</tt> is used in other positions it is unlikely to be possible to implement except by replacing the other occurrence of <tt>IO</tt> by <tt>MonadIOU</tt> 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 <tt>ReaderT</tt> ) 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/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/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/123
https://prime.haskell.org/ticket/123#123: Fix Ord so Ord Double and Ord Float make senseThu, 22 Mar 2007 00:08:36 GMTigloo@…<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><tt>compare</tt> should raise an exception (Haskell' doesn't need to be changed)
</li><li><tt>compare</tt>, <tt>(<)</tt>, <tt>(>)</tt>, etc should raise an exception (Haskell' doesn't need to be changed)
</li><li>There should be no <tt>Ord</tt> instance for <tt>Float</tt> and <tt>Double</tt> (changes needed for Haskell')
</li><li>Add an <tt>Incomparable</tt> constructor to <tt>Ordering</tt> (changes needed for Haskell')
</li></ul>Resultshttps://prime.haskell.org/ticket/123#changelog
https://prime.haskell.org/ticket/133
https://prime.haskell.org/ticket/133#133: ExplicitForallMon, 27 Jul 2009 11:05:39 GMTNiklasBroberg<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/121
https://prime.haskell.org/ticket/121#121: ExitCode consistencyWed, 14 Mar 2007 23:26:56 GMTigloo@…<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 <tt>system "exit 3" >>= print</tt> prints <tt>ExitFailure 3</tt> under ghc and hugs, but <tt>ExitFailure 768</tt> 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 <tt>operating-system dependent</tt> seems better than <tt>implementation-dependent</tt>.
</p>
Resultshttps://prime.haskell.org/ticket/121#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/20
https://prime.haskell.org/ticket/20#20: Eliminate . as an operatorFri, 16 Dec 2005 22:45:57 GMTijones<p>
See <a class="wiki" href="https://prime.haskell.org/wiki/CompositionAsDot">CompositionAsDot</a>.
</p>
Resultshttps://prime.haskell.org/ticket/20#changelog