Skip to content

Commit

Permalink
made constructor for DecEq available
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-hoeck committed Nov 26, 2020
1 parent f4e2dff commit 527a5b5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Language/Reflection/Derive.idr
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
||| using the functionality provided here.
module Language.Reflection.Derive

import Decidable.Equality
import public Language.Reflection.Syntax
import public Language.Reflection.Types

Expand Down Expand Up @@ -326,3 +327,9 @@ mkMonoid' = %runElab check (var $ singleCon "Monoid")
public export %inline
mkMonoid : (1 semi : Semigroup a) => (neutral : a) -> Monoid a
mkMonoid = mkMonoid' semi

||| Creates a `DecEq` value from the passed implementation function
||| for `decEq`
public export %inline
mkDecEq : (decEq : (x1 : a) -> (x2 : a) -> Dec (x1 = x2)) -> DecEq a
mkDecEq = %runElab check (var $ singleCon "DecEq")

0 comments on commit 527a5b5

Please sign in to comment.