1 {-# LANGUAGE DeriveDataTypeable #-}
2 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
3 {-# LANGUAGE OverloadedStrings #-}
4 module Hcompta.Amount.Unit where
8 import Data.Eq (Eq(..))
9 import Data.Ord (Ord(..))
10 import Data.String (IsString)
11 import qualified Data.Text as Text
12 import Data.Text (Text)
13 import Data.Typeable ()
14 import Prelude ((.), Int, Show(..))
18 deriving (Data, Eq, IsString, Ord, Show, Typeable)
19 instance NFData Unit where
22 -- NOTE: maybe consider using text-show package
30 length = Text.length . text