module Data.Modifiers(
NonEmpty(..),
mkNonEmpty,
Nat(..),
NonZero(..),
Unicode(..),
unicodes,
Printable(..),
printables
) where
import Data.Typeable
newtype Nat a = Nat {nat :: a}
deriving (Typeable, Show, Eq, Ord)
newtype NonZero a = NonZero {nonZero :: a}
deriving (Typeable, Show, Eq, Ord)
newtype NonEmpty a = NonEmpty {nonEmpty :: [a]}
deriving (Typeable, Show)
mkNonEmpty :: a -> [a] -> NonEmpty a
mkNonEmpty x xs = NonEmpty $ x:xs
newtype Unicode = Unicode {unicode :: Char}
deriving (Typeable, Show, Eq, Ord)
unicodes :: [Unicode] -> String
unicodes = map unicode
newtype Printable = Printable {printable :: Char}
deriving (Typeable, Show)
printables :: [Printable] -> String
printables = map printable