1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00

add Data.Empty typeclass

This commit is contained in:
Charlie Somerville 2018-04-17 16:31:08 +10:00
parent ae1cc5d689
commit 560642579f
2 changed files with 10 additions and 0 deletions

View File

@ -70,6 +70,7 @@ library
, Data.AST
, Data.Blob
, Data.Diff
, Data.Empty
, Data.Error
, Data.Functor.Both
, Data.Functor.Classes.Generic

9
src/Data/Empty.hs Normal file
View File

@ -0,0 +1,9 @@
{-# LANGUAGE UndecidableInstances #-}
module Data.Empty where
class Empty a where
empty :: a
instance {-# OVERLAPS #-} Monoid a => Empty a where
empty = mempty