[GHC] #14107: Implement Semigroup and Monoid instances for the ST monad

GHC ghc-devs at haskell.org
Sat Aug 12 14:20:32 UTC 2017


#14107: Implement Semigroup and Monoid instances for the ST monad
-------------------------------------+-------------------------------------
        Reporter:  plato             |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Core Libraries    |              Version:  8.2.1
      Resolution:                    |             Keywords:  newcomer
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by plato):

 I dug into the source code and have two questions:

 1. Adding the `Monoid` and `Semigroup` instances was simple enough, but I
 noticed some instances have a `since` annotation. Should I add one, too?
 If so, which version should I add?
 2. I tested this by recompiling ghc, running `ghc-stage2` interactively
 and typing `:info ST`, which printed the correct instances. I also ran
 `./validate`. Are there any other tests I shall perform for this kind of
 feature?

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14107#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list