Skip to content
This repository has been archived by the owner on Mar 21, 2020. It is now read-only.

Commit

Permalink
add applicative instance required for compiling on ghc 7.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Noam Lewis committed Apr 23, 2015
1 parent 3d6902e commit 2ceb726
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dependent-sum-template.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: dependent-sum-template
version: 0.0.0.2
version: 0.0.0.3
stability: experimental

cabal-version: >= 1.6
Expand Down
3 changes: 3 additions & 0 deletions src/Data/GADT/Compare/TH.hs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ instance Monad (GComparing a b) where
return = GComparing . Right
GComparing (Left x) >>= f = GComparing (Left x)
GComparing (Right x) >>= f = f x
instance Applicative (GComparing a b) where
pure = return
(<*>) = ap

geq' :: GCompare t => t a -> t b -> GComparing x y (a := b)
geq' x y = GComparing (case gcompare x y of
Expand Down

0 comments on commit 2ceb726

Please sign in to comment.