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