mirror of
https://github.com/github/semantic.git
synced 2024-12-19 12:51:52 +03:00
Define a default implementation of gsequenceAlt.
This commit is contained in:
parent
ff869ec517
commit
bc5f05494d
@ -1,3 +1,4 @@
|
||||
{-# LANGUAGE DefaultSignatures #-}
|
||||
module Data.Sequenceable.Generic where
|
||||
|
||||
import GHC.Generics
|
||||
@ -7,6 +8,8 @@ import Prologue
|
||||
|
||||
class GSequenceable t where
|
||||
gsequenceAlt :: Alternative f => t (f a) -> f (t a)
|
||||
default gsequenceAlt :: (Generic1 t, GSequenceable (Rep1 t), Alternative f) => t (f a) -> f (t a)
|
||||
gsequenceAlt = fmap to1 . gsequenceAlt . from1
|
||||
|
||||
|
||||
-- Instances
|
||||
|
Loading…
Reference in New Issue
Block a user