1
1
mirror of https://github.com/github/semantic.git synced 2024-12-21 13:51:44 +03:00

Define Sequenceable over [] in terms of GSequenceable over [].

This commit is contained in:
Rob Rix 2016-07-22 16:14:27 -04:00
parent dabffff7d0
commit f959917ae3

View File

@ -1,5 +1,6 @@
module Data.Sequenceable where
import Data.Sequenceable.Generic
import Prologue
-- Classes
@ -10,6 +11,4 @@ class Functor t => Sequenceable t where
-- Instances
instance Sequenceable [] where
sequenceAlt (x:xs) = ((:) <$> x <|> pure identity) <*> sequenceAlt xs
sequenceAlt [] = pure []
instance Sequenceable [] where sequenceAlt = gsequenceAlt