]> Git — Sourcephile - comptalang.git/blob - lib/Hcompta/Unit.hs
Simplify hcompta-lib.
[comptalang.git] / lib / Hcompta / Unit.hs
1 {-# LANGUAGE OverloadedStrings #-}
2 module Hcompta.Unit where
3
4 import Data.Function (id)
5 import Data.Proxy (Proxy(..))
6 import Data.Text (Text)
7
8 class Unit u where
9 unit_empty :: u
10 unit_text :: u -> Text
11 instance Unit Text where
12 unit_empty = ""
13 unit_text = id
14
15 _Unit :: Proxy Unit
16 _Unit = Proxy