diff --git a/ChangeLog.md b/ChangeLog.md index 0833aa8..51abaee 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -2,6 +2,10 @@ ## [Unreleased] +## [0.1.2.8] - 2020-03-12 +### Added +- `instance Traversable (Sequence mk w)`. + ## [0.1.2.7] - 2020-02-11 ### Changed - Support GHC-8.8. diff --git a/package.yaml b/package.yaml index 2b12fec..7257dcc 100644 --- a/package.yaml +++ b/package.yaml @@ -1,8 +1,8 @@ name: cobot-io -version: 0.1.2.7 +version: 0.1.2.8 github: "less-wrong/cobot-io" license: BSD3 -category: Bio +category: Bio author: "Pavel Yakovlev, Bogdan Neterebskii, Alexander Sadovnikov" maintainer: "pavel@yakovlev.me" copyright: "2018-2019, Less Wrong Bio" @@ -57,7 +57,7 @@ library: - TypeOperators - TemplateHaskell - FlexibleContexts - + tests: cobot-io-test: diff --git a/src/Bio/Sequence/Class.hs b/src/Bio/Sequence/Class.hs index bd5d74c..f183125 100644 --- a/src/Bio/Sequence/Class.hs +++ b/src/Bio/Sequence/Class.hs @@ -87,6 +87,9 @@ instance Foldable (Sequence mk w) where length = V.length . _sequ +instance Traversable (Sequence mk w) where + traverse f s@Sequence{..} = fmap (\newSeq -> s { _sequ = newSeq }) $ traverse f _sequ + -- | Exported constructor for 'Sequence'. Should be used ONLY in module Bio.Sequence. -- _sequenceInner :: Vector a -> [(mk, Range)] -> Vector w -> Sequence mk w a