Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions djembe.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ library
Drum
-- other-modules:
-- other-extensions:
build-depends: base >=4.6 && <4.9
,lens >=4.7 && <4.14
build-depends: base
,lens
,hmidi >= 0.2.1 && <3.0
,random >=1.0 && <1.2
,QuickCheck >=2.7 && <2.9
,hspec >=2.1 && <2.3
,QuickCheck
,hspec
,mtl
hs-source-dirs: src
default-language: Haskell2010
Expand Down
6 changes: 4 additions & 2 deletions src/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,12 @@ instance Monad Composition where
let (Composition (b', a')) = k a
in Composition (Series b b', a')

instance Semigroup (Composition ()) where
(Composition (b1, _)) <> (Composition (b2, _))
= Composition (Parallel b1 b2, ())

instance Monoid (Composition ()) where
mempty = Composition (None, ())
mappend (Composition (b1, _)) (Composition (b2, _))
= Composition (Parallel b1 b2, ())

-- | Lift a function on `Hit`s over a `Composition`
cmap :: (Hit -> Hit) -> Composition a -> Composition a
Expand Down
4 changes: 2 additions & 2 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
flags: {}
packages:
- '.'
extra-deps: [hmidi-0.2.2.0]
resolver: lts-2.22
extra-deps: [hmidi-0.2.2.1]
resolver: lts-16.1