{-# LANGUAGE TemplateHaskell #-}
--------------------------------------------------------------------------------
-- |
-- Module      :  Ipe.Layer
-- Copyright   :  (C) Frank Staals
-- License     :  see the LICENSE file
-- Maintainer  :  Frank Staals
--
-- Layers in Ipe documents.
--
--------------------------------------------------------------------------------
module Ipe.Layer(
  LayerName(LayerName), layerName
  ) where

import           Control.Lens
import           Data.Text (Text)
import           GHC.Exts

--------------------------------------------------------------------------------

-- | Defines an Layer in Ipe.
newtype LayerName = LayerName {LayerName -> Text
_layerName :: Text } deriving (Int -> LayerName -> ShowS
[LayerName] -> ShowS
LayerName -> String
(Int -> LayerName -> ShowS)
-> (LayerName -> String)
-> ([LayerName] -> ShowS)
-> Show LayerName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LayerName] -> ShowS
$cshowList :: [LayerName] -> ShowS
show :: LayerName -> String
$cshow :: LayerName -> String
showsPrec :: Int -> LayerName -> ShowS
$cshowsPrec :: Int -> LayerName -> ShowS
Show,ReadPrec [LayerName]
ReadPrec LayerName
Int -> ReadS LayerName
ReadS [LayerName]
(Int -> ReadS LayerName)
-> ReadS [LayerName]
-> ReadPrec LayerName
-> ReadPrec [LayerName]
-> Read LayerName
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LayerName]
$creadListPrec :: ReadPrec [LayerName]
readPrec :: ReadPrec LayerName
$creadPrec :: ReadPrec LayerName
readList :: ReadS [LayerName]
$creadList :: ReadS [LayerName]
readsPrec :: Int -> ReadS LayerName
$creadsPrec :: Int -> ReadS LayerName
Read,LayerName -> LayerName -> Bool
(LayerName -> LayerName -> Bool)
-> (LayerName -> LayerName -> Bool) -> Eq LayerName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LayerName -> LayerName -> Bool
$c/= :: LayerName -> LayerName -> Bool
== :: LayerName -> LayerName -> Bool
$c== :: LayerName -> LayerName -> Bool
Eq,Eq LayerName
Eq LayerName
-> (LayerName -> LayerName -> Ordering)
-> (LayerName -> LayerName -> Bool)
-> (LayerName -> LayerName -> Bool)
-> (LayerName -> LayerName -> Bool)
-> (LayerName -> LayerName -> Bool)
-> (LayerName -> LayerName -> LayerName)
-> (LayerName -> LayerName -> LayerName)
-> Ord LayerName
LayerName -> LayerName -> Bool
LayerName -> LayerName -> Ordering
LayerName -> LayerName -> LayerName
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: LayerName -> LayerName -> LayerName
$cmin :: LayerName -> LayerName -> LayerName
max :: LayerName -> LayerName -> LayerName
$cmax :: LayerName -> LayerName -> LayerName
>= :: LayerName -> LayerName -> Bool
$c>= :: LayerName -> LayerName -> Bool
> :: LayerName -> LayerName -> Bool
$c> :: LayerName -> LayerName -> Bool
<= :: LayerName -> LayerName -> Bool
$c<= :: LayerName -> LayerName -> Bool
< :: LayerName -> LayerName -> Bool
$c< :: LayerName -> LayerName -> Bool
compare :: LayerName -> LayerName -> Ordering
$ccompare :: LayerName -> LayerName -> Ordering
$cp1Ord :: Eq LayerName
Ord,String -> LayerName
(String -> LayerName) -> IsString LayerName
forall a. (String -> a) -> IsString a
fromString :: String -> LayerName
$cfromString :: String -> LayerName
IsString)
makeLenses ''LayerName