{-# LANGUAGE BangPatterns #-}
module Data.ASN1.Types.Lowlevel
(
ASN1Class(..)
, ASN1Tag
, ASN1Length(..)
, ASN1Header(..)
, ASN1Event(..)
) where
import Data.ByteString (ByteString)
data ASN1Class = Universal
| Application
| Context
| Private
deriving (Int -> ASN1Class -> ShowS
[ASN1Class] -> ShowS
ASN1Class -> String
(Int -> ASN1Class -> ShowS)
-> (ASN1Class -> String)
-> ([ASN1Class] -> ShowS)
-> Show ASN1Class
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ASN1Class] -> ShowS
$cshowList :: [ASN1Class] -> ShowS
show :: ASN1Class -> String
$cshow :: ASN1Class -> String
showsPrec :: Int -> ASN1Class -> ShowS
$cshowsPrec :: Int -> ASN1Class -> ShowS
Show,ASN1Class -> ASN1Class -> Bool
(ASN1Class -> ASN1Class -> Bool)
-> (ASN1Class -> ASN1Class -> Bool) -> Eq ASN1Class
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ASN1Class -> ASN1Class -> Bool
$c/= :: ASN1Class -> ASN1Class -> Bool
== :: ASN1Class -> ASN1Class -> Bool
$c== :: ASN1Class -> ASN1Class -> Bool
Eq,Eq ASN1Class
Eq ASN1Class
-> (ASN1Class -> ASN1Class -> Ordering)
-> (ASN1Class -> ASN1Class -> Bool)
-> (ASN1Class -> ASN1Class -> Bool)
-> (ASN1Class -> ASN1Class -> Bool)
-> (ASN1Class -> ASN1Class -> Bool)
-> (ASN1Class -> ASN1Class -> ASN1Class)
-> (ASN1Class -> ASN1Class -> ASN1Class)
-> Ord ASN1Class
ASN1Class -> ASN1Class -> Bool
ASN1Class -> ASN1Class -> Ordering
ASN1Class -> ASN1Class -> ASN1Class
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 :: ASN1Class -> ASN1Class -> ASN1Class
$cmin :: ASN1Class -> ASN1Class -> ASN1Class
max :: ASN1Class -> ASN1Class -> ASN1Class
$cmax :: ASN1Class -> ASN1Class -> ASN1Class
>= :: ASN1Class -> ASN1Class -> Bool
$c>= :: ASN1Class -> ASN1Class -> Bool
> :: ASN1Class -> ASN1Class -> Bool
$c> :: ASN1Class -> ASN1Class -> Bool
<= :: ASN1Class -> ASN1Class -> Bool
$c<= :: ASN1Class -> ASN1Class -> Bool
< :: ASN1Class -> ASN1Class -> Bool
$c< :: ASN1Class -> ASN1Class -> Bool
compare :: ASN1Class -> ASN1Class -> Ordering
$ccompare :: ASN1Class -> ASN1Class -> Ordering
$cp1Ord :: Eq ASN1Class
Ord,Int -> ASN1Class
ASN1Class -> Int
ASN1Class -> [ASN1Class]
ASN1Class -> ASN1Class
ASN1Class -> ASN1Class -> [ASN1Class]
ASN1Class -> ASN1Class -> ASN1Class -> [ASN1Class]
(ASN1Class -> ASN1Class)
-> (ASN1Class -> ASN1Class)
-> (Int -> ASN1Class)
-> (ASN1Class -> Int)
-> (ASN1Class -> [ASN1Class])
-> (ASN1Class -> ASN1Class -> [ASN1Class])
-> (ASN1Class -> ASN1Class -> [ASN1Class])
-> (ASN1Class -> ASN1Class -> ASN1Class -> [ASN1Class])
-> Enum ASN1Class
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: ASN1Class -> ASN1Class -> ASN1Class -> [ASN1Class]
$cenumFromThenTo :: ASN1Class -> ASN1Class -> ASN1Class -> [ASN1Class]
enumFromTo :: ASN1Class -> ASN1Class -> [ASN1Class]
$cenumFromTo :: ASN1Class -> ASN1Class -> [ASN1Class]
enumFromThen :: ASN1Class -> ASN1Class -> [ASN1Class]
$cenumFromThen :: ASN1Class -> ASN1Class -> [ASN1Class]
enumFrom :: ASN1Class -> [ASN1Class]
$cenumFrom :: ASN1Class -> [ASN1Class]
fromEnum :: ASN1Class -> Int
$cfromEnum :: ASN1Class -> Int
toEnum :: Int -> ASN1Class
$ctoEnum :: Int -> ASN1Class
pred :: ASN1Class -> ASN1Class
$cpred :: ASN1Class -> ASN1Class
succ :: ASN1Class -> ASN1Class
$csucc :: ASN1Class -> ASN1Class
Enum)
type ASN1Tag = Int
data ASN1Length = LenShort Int
| LenLong Int Int
| LenIndefinite
deriving (Int -> ASN1Length -> ShowS
[ASN1Length] -> ShowS
ASN1Length -> String
(Int -> ASN1Length -> ShowS)
-> (ASN1Length -> String)
-> ([ASN1Length] -> ShowS)
-> Show ASN1Length
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ASN1Length] -> ShowS
$cshowList :: [ASN1Length] -> ShowS
show :: ASN1Length -> String
$cshow :: ASN1Length -> String
showsPrec :: Int -> ASN1Length -> ShowS
$cshowsPrec :: Int -> ASN1Length -> ShowS
Show,ASN1Length -> ASN1Length -> Bool
(ASN1Length -> ASN1Length -> Bool)
-> (ASN1Length -> ASN1Length -> Bool) -> Eq ASN1Length
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ASN1Length -> ASN1Length -> Bool
$c/= :: ASN1Length -> ASN1Length -> Bool
== :: ASN1Length -> ASN1Length -> Bool
$c== :: ASN1Length -> ASN1Length -> Bool
Eq)
data = !ASN1Class !ASN1Tag !Bool !ASN1Length
deriving (Int -> ASN1Header -> ShowS
[ASN1Header] -> ShowS
ASN1Header -> String
(Int -> ASN1Header -> ShowS)
-> (ASN1Header -> String)
-> ([ASN1Header] -> ShowS)
-> Show ASN1Header
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ASN1Header] -> ShowS
$cshowList :: [ASN1Header] -> ShowS
show :: ASN1Header -> String
$cshow :: ASN1Header -> String
showsPrec :: Int -> ASN1Header -> ShowS
$cshowsPrec :: Int -> ASN1Header -> ShowS
Show,ASN1Header -> ASN1Header -> Bool
(ASN1Header -> ASN1Header -> Bool)
-> (ASN1Header -> ASN1Header -> Bool) -> Eq ASN1Header
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ASN1Header -> ASN1Header -> Bool
$c/= :: ASN1Header -> ASN1Header -> Bool
== :: ASN1Header -> ASN1Header -> Bool
$c== :: ASN1Header -> ASN1Header -> Bool
Eq)
data ASN1Event = ASN1Header
| Primitive !ByteString
| ConstructionBegin
| ConstructionEnd
deriving (Int -> ASN1Event -> ShowS
[ASN1Event] -> ShowS
ASN1Event -> String
(Int -> ASN1Event -> ShowS)
-> (ASN1Event -> String)
-> ([ASN1Event] -> ShowS)
-> Show ASN1Event
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ASN1Event] -> ShowS
$cshowList :: [ASN1Event] -> ShowS
show :: ASN1Event -> String
$cshow :: ASN1Event -> String
showsPrec :: Int -> ASN1Event -> ShowS
$cshowsPrec :: Int -> ASN1Event -> ShowS
Show,ASN1Event -> ASN1Event -> Bool
(ASN1Event -> ASN1Event -> Bool)
-> (ASN1Event -> ASN1Event -> Bool) -> Eq ASN1Event
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ASN1Event -> ASN1Event -> Bool
$c/= :: ASN1Event -> ASN1Event -> Bool
== :: ASN1Event -> ASN1Event -> Bool
$c== :: ASN1Event -> ASN1Event -> Bool
Eq)