use `TypeRep f` in traverse instead of `a -> f a`
See original GitHub issueAs continuation of #206 I think we should change the signature of traverse
-traverse :: Applicative f, Traversable t => t a ~> (a -> f b, c -> f c) -> f (t b)
+traverse :: Applicative f, Traversable t => t a ~> (TypeRep f, a -> f b) -> f (t b)
sanctuary-type-classes
TypeReps are first arguments and i think it’s fine, but if someone things that TypeRep f
should be last argument let’s discuss that too.
This would be a breaking change so we might hold it for some time.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:12 (8 by maintainers)
Top Results From Across the Web
SCP-3673: SCP-2997: versioned builtins. fix consByteString integer ...
An example use of this feature is for "fixing" the behaviour of `ConsByteString` builtin to throw an error instead. +. of overflowing its...
Read more >Traverse City, MI Weather Conditions | Weather Underground
Traverse City, MI Weather Conditionsstar_ratehome ; Pressure. 29.76 · in ; Visibility. 10 · miles ; Dew Point. 34 · F ; Humidity....
Read more >Untitled
County Attorney A. RES Authorize - Closed Meeting 8 Pubic Hearings 2:00 P.M. A. RES - Authorize 'Dumfries- Triangle Volunteer Fire Department...
Read more >Programming-Language-Identification/keywords.txt at master
Name already in use ... f 6026. IhWees 1. ZIkiffqu 1. ylVFliuepOfdOYl 1. maxBodyTemperatureInGalaxy 2 ... aFa 1. Analysis 16. bang 2. substituteTemplates...
Read more >Full text of "Quantum Physics" - Internet Archive
One may gather from this short sketch how important and use¬ ful it ... tw een the plates constant, if the distance between...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It is incredibly instructive to implement
traverse
for a data type likeMaybe a
. Here’s a link to a partial implementation: https://glot.io/snippets/elw3v9lfkc You should only have to implement the twotraverse
functions. There’s a couple of assertions at the bottom that should all pass.For more insight, try to understand why the
traverse1
function cannot be implemented forNothing
. If you thinktraverse1
can be implemented forNothing
, please provide an implementation.It doesn’t work like that for haskell because of type inference.