mirror of
https://github.com/github/semantic.git
synced 2025-01-02 20:41:38 +03:00
Define Sequenceable over [] in terms of GSequenceable over [].
This commit is contained in:
parent
dabffff7d0
commit
f959917ae3
@ -1,5 +1,6 @@
|
|||||||
module Data.Sequenceable where
|
module Data.Sequenceable where
|
||||||
|
|
||||||
|
import Data.Sequenceable.Generic
|
||||||
import Prologue
|
import Prologue
|
||||||
|
|
||||||
-- Classes
|
-- Classes
|
||||||
@ -10,6 +11,4 @@ class Functor t => Sequenceable t where
|
|||||||
|
|
||||||
-- Instances
|
-- Instances
|
||||||
|
|
||||||
instance Sequenceable [] where
|
instance Sequenceable [] where sequenceAlt = gsequenceAlt
|
||||||
sequenceAlt (x:xs) = ((:) <$> x <|> pure identity) <*> sequenceAlt xs
|
|
||||||
sequenceAlt [] = pure []
|
|
||||||
|
Loading…
Reference in New Issue
Block a user