]> Git — Sourcephile - comptalang.git/blob - cli/Hcompta/Expr/Eq.hs
Refactor hcompta-lib.
[comptalang.git] / cli / Hcompta / Expr / Eq.hs
1 {-# LANGUAGE NoImplicitPrelude #-}
2 {-# OPTIONS_GHC -fno-warn-tabs #-}
3
4 module Hcompta.Expr.Eq where
5
6 import Data.Bool
7 import Data.Eq (Eq(..))
8
9 import Hcompta.Expr.Dup
10
11 -- * Class 'Expr_Eq'
12
13 class Expr_Eq repr where
14 eq :: Eq a => repr a -> repr a -> repr Bool
15
16 instance (Expr_Eq r1, Expr_Eq r2) => Expr_Eq (Dup r1 r2) where
17 eq (x1 `Dup` x2) (y1 `Dup` y2) = eq x1 y1 `Dup` eq x2 y2