{-
Copyright (c) 2015, Dan Rosén
Copyright (c) 2016, Nick Smallbone

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.

    * Redistributions in binary form must reproduce the above
      copyright notice, this list of conditions and the following
      disclaimer in the documentation and/or other materials provided
      with the distribution.

    * Neither the name of the copyright holder nor the names of other
      contributors may be used to endorse or promote products derived
      from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-}
-- File generated by the BNF Converter (bnfc 2.9.4).

{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE PatternSynonyms #-}

-- | The abstract syntax of language TIP.

module TIP.AbsTIP where

import Prelude (Integer, String)
import qualified Prelude as C
  ( Eq, Ord, Show, Read
  , Int, Maybe(..)
  )
import qualified Data.String

data Start = Start [Decl]
  deriving (Start -> Start -> Bool
(Start -> Start -> Bool) -> (Start -> Start -> Bool) -> Eq Start
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Start -> Start -> Bool
$c/= :: Start -> Start -> Bool
== :: Start -> Start -> Bool
$c== :: Start -> Start -> Bool
C.Eq, Eq Start
Eq Start =>
(Start -> Start -> Ordering)
-> (Start -> Start -> Bool)
-> (Start -> Start -> Bool)
-> (Start -> Start -> Bool)
-> (Start -> Start -> Bool)
-> (Start -> Start -> Start)
-> (Start -> Start -> Start)
-> Ord Start
Start -> Start -> Bool
Start -> Start -> Ordering
Start -> Start -> Start
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 :: Start -> Start -> Start
$cmin :: Start -> Start -> Start
max :: Start -> Start -> Start
$cmax :: Start -> Start -> Start
>= :: Start -> Start -> Bool
$c>= :: Start -> Start -> Bool
> :: Start -> Start -> Bool
$c> :: Start -> Start -> Bool
<= :: Start -> Start -> Bool
$c<= :: Start -> Start -> Bool
< :: Start -> Start -> Bool
$c< :: Start -> Start -> Bool
compare :: Start -> Start -> Ordering
$ccompare :: Start -> Start -> Ordering
$cp1Ord :: Eq Start
C.Ord, Int -> Start -> ShowS
[Start] -> ShowS
Start -> String
(Int -> Start -> ShowS)
-> (Start -> String) -> ([Start] -> ShowS) -> Show Start
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Start] -> ShowS
$cshowList :: [Start] -> ShowS
show :: Start -> String
$cshow :: Start -> String
showsPrec :: Int -> Start -> ShowS
$cshowsPrec :: Int -> Start -> ShowS
C.Show, ReadPrec [Start]
ReadPrec Start
Int -> ReadS Start
ReadS [Start]
(Int -> ReadS Start)
-> ReadS [Start]
-> ReadPrec Start
-> ReadPrec [Start]
-> Read Start
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Start]
$creadListPrec :: ReadPrec [Start]
readPrec :: ReadPrec Start
$creadPrec :: ReadPrec Start
readList :: ReadS [Start]
$creadList :: ReadS [Start]
readsPrec :: Int -> ReadS Start
$creadsPrec :: Int -> ReadS Start
C.Read)

data Decl
    = DeclareDatatype AttrSymbol Datatype
    | DeclareDatatypes [DatatypeName] [Datatype]
    | DeclareSort AttrSymbol Integer
    | DeclareConst AttrSymbol ConstType
    | DeclareFun AttrSymbol FunType
    | DefineFun FunDec Expr
    | DefineFunRec FunDec Expr
    | DefineFunsRec [BracketedFunDec] [Expr]
    | Formula Assertion [Attr] Expr
    | FormulaPar Assertion [Attr] Par Expr
  deriving (Decl -> Decl -> Bool
(Decl -> Decl -> Bool) -> (Decl -> Decl -> Bool) -> Eq Decl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Decl -> Decl -> Bool
$c/= :: Decl -> Decl -> Bool
== :: Decl -> Decl -> Bool
$c== :: Decl -> Decl -> Bool
C.Eq, Eq Decl
Eq Decl =>
(Decl -> Decl -> Ordering)
-> (Decl -> Decl -> Bool)
-> (Decl -> Decl -> Bool)
-> (Decl -> Decl -> Bool)
-> (Decl -> Decl -> Bool)
-> (Decl -> Decl -> Decl)
-> (Decl -> Decl -> Decl)
-> Ord Decl
Decl -> Decl -> Bool
Decl -> Decl -> Ordering
Decl -> Decl -> Decl
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 :: Decl -> Decl -> Decl
$cmin :: Decl -> Decl -> Decl
max :: Decl -> Decl -> Decl
$cmax :: Decl -> Decl -> Decl
>= :: Decl -> Decl -> Bool
$c>= :: Decl -> Decl -> Bool
> :: Decl -> Decl -> Bool
$c> :: Decl -> Decl -> Bool
<= :: Decl -> Decl -> Bool
$c<= :: Decl -> Decl -> Bool
< :: Decl -> Decl -> Bool
$c< :: Decl -> Decl -> Bool
compare :: Decl -> Decl -> Ordering
$ccompare :: Decl -> Decl -> Ordering
$cp1Ord :: Eq Decl
C.Ord, Int -> Decl -> ShowS
[Decl] -> ShowS
Decl -> String
(Int -> Decl -> ShowS)
-> (Decl -> String) -> ([Decl] -> ShowS) -> Show Decl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Decl] -> ShowS
$cshowList :: [Decl] -> ShowS
show :: Decl -> String
$cshow :: Decl -> String
showsPrec :: Int -> Decl -> ShowS
$cshowsPrec :: Int -> Decl -> ShowS
C.Show, ReadPrec [Decl]
ReadPrec Decl
Int -> ReadS Decl
ReadS [Decl]
(Int -> ReadS Decl)
-> ReadS [Decl] -> ReadPrec Decl -> ReadPrec [Decl] -> Read Decl
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Decl]
$creadListPrec :: ReadPrec [Decl]
readPrec :: ReadPrec Decl
$creadPrec :: ReadPrec Decl
readList :: ReadS [Decl]
$creadList :: ReadS [Decl]
readsPrec :: Int -> ReadS Decl
$creadsPrec :: Int -> ReadS Decl
C.Read)

data Assertion = Assert | Prove
  deriving (Assertion -> Assertion -> Bool
(Assertion -> Assertion -> Bool)
-> (Assertion -> Assertion -> Bool) -> Eq Assertion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Assertion -> Assertion -> Bool
$c/= :: Assertion -> Assertion -> Bool
== :: Assertion -> Assertion -> Bool
$c== :: Assertion -> Assertion -> Bool
C.Eq, Eq Assertion
Eq Assertion =>
(Assertion -> Assertion -> Ordering)
-> (Assertion -> Assertion -> Bool)
-> (Assertion -> Assertion -> Bool)
-> (Assertion -> Assertion -> Bool)
-> (Assertion -> Assertion -> Bool)
-> (Assertion -> Assertion -> Assertion)
-> (Assertion -> Assertion -> Assertion)
-> Ord Assertion
Assertion -> Assertion -> Bool
Assertion -> Assertion -> Ordering
Assertion -> Assertion -> Assertion
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 :: Assertion -> Assertion -> Assertion
$cmin :: Assertion -> Assertion -> Assertion
max :: Assertion -> Assertion -> Assertion
$cmax :: Assertion -> Assertion -> Assertion
>= :: Assertion -> Assertion -> Bool
$c>= :: Assertion -> Assertion -> Bool
> :: Assertion -> Assertion -> Bool
$c> :: Assertion -> Assertion -> Bool
<= :: Assertion -> Assertion -> Bool
$c<= :: Assertion -> Assertion -> Bool
< :: Assertion -> Assertion -> Bool
$c< :: Assertion -> Assertion -> Bool
compare :: Assertion -> Assertion -> Ordering
$ccompare :: Assertion -> Assertion -> Ordering
$cp1Ord :: Eq Assertion
C.Ord, Int -> Assertion -> ShowS
[Assertion] -> ShowS
Assertion -> String
(Int -> Assertion -> ShowS)
-> (Assertion -> String)
-> ([Assertion] -> ShowS)
-> Show Assertion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Assertion] -> ShowS
$cshowList :: [Assertion] -> ShowS
show :: Assertion -> String
$cshow :: Assertion -> String
showsPrec :: Int -> Assertion -> ShowS
$cshowsPrec :: Int -> Assertion -> ShowS
C.Show, ReadPrec [Assertion]
ReadPrec Assertion
Int -> ReadS Assertion
ReadS [Assertion]
(Int -> ReadS Assertion)
-> ReadS [Assertion]
-> ReadPrec Assertion
-> ReadPrec [Assertion]
-> Read Assertion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Assertion]
$creadListPrec :: ReadPrec [Assertion]
readPrec :: ReadPrec Assertion
$creadPrec :: ReadPrec Assertion
readList :: ReadS [Assertion]
$creadList :: ReadS [Assertion]
readsPrec :: Int -> ReadS Assertion
$creadsPrec :: Int -> ReadS Assertion
C.Read)

data Par = Par [Symbol]
  deriving (Par -> Par -> Bool
(Par -> Par -> Bool) -> (Par -> Par -> Bool) -> Eq Par
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Par -> Par -> Bool
$c/= :: Par -> Par -> Bool
== :: Par -> Par -> Bool
$c== :: Par -> Par -> Bool
C.Eq, Eq Par
Eq Par =>
(Par -> Par -> Ordering)
-> (Par -> Par -> Bool)
-> (Par -> Par -> Bool)
-> (Par -> Par -> Bool)
-> (Par -> Par -> Bool)
-> (Par -> Par -> Par)
-> (Par -> Par -> Par)
-> Ord Par
Par -> Par -> Bool
Par -> Par -> Ordering
Par -> Par -> Par
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 :: Par -> Par -> Par
$cmin :: Par -> Par -> Par
max :: Par -> Par -> Par
$cmax :: Par -> Par -> Par
>= :: Par -> Par -> Bool
$c>= :: Par -> Par -> Bool
> :: Par -> Par -> Bool
$c> :: Par -> Par -> Bool
<= :: Par -> Par -> Bool
$c<= :: Par -> Par -> Bool
< :: Par -> Par -> Bool
$c< :: Par -> Par -> Bool
compare :: Par -> Par -> Ordering
$ccompare :: Par -> Par -> Ordering
$cp1Ord :: Eq Par
C.Ord, Int -> Par -> ShowS
[Par] -> ShowS
Par -> String
(Int -> Par -> ShowS)
-> (Par -> String) -> ([Par] -> ShowS) -> Show Par
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Par] -> ShowS
$cshowList :: [Par] -> ShowS
show :: Par -> String
$cshow :: Par -> String
showsPrec :: Int -> Par -> ShowS
$cshowsPrec :: Int -> Par -> ShowS
C.Show, ReadPrec [Par]
ReadPrec Par
Int -> ReadS Par
ReadS [Par]
(Int -> ReadS Par)
-> ReadS [Par] -> ReadPrec Par -> ReadPrec [Par] -> Read Par
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Par]
$creadListPrec :: ReadPrec [Par]
readPrec :: ReadPrec Par
$creadPrec :: ReadPrec Par
readList :: ReadS [Par]
$creadList :: ReadS [Par]
readsPrec :: Int -> ReadS Par
$creadsPrec :: Int -> ReadS Par
C.Read)

data ConstType = ConstTypeMono Type | ConstTypePoly Par Type
  deriving (ConstType -> ConstType -> Bool
(ConstType -> ConstType -> Bool)
-> (ConstType -> ConstType -> Bool) -> Eq ConstType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConstType -> ConstType -> Bool
$c/= :: ConstType -> ConstType -> Bool
== :: ConstType -> ConstType -> Bool
$c== :: ConstType -> ConstType -> Bool
C.Eq, Eq ConstType
Eq ConstType =>
(ConstType -> ConstType -> Ordering)
-> (ConstType -> ConstType -> Bool)
-> (ConstType -> ConstType -> Bool)
-> (ConstType -> ConstType -> Bool)
-> (ConstType -> ConstType -> Bool)
-> (ConstType -> ConstType -> ConstType)
-> (ConstType -> ConstType -> ConstType)
-> Ord ConstType
ConstType -> ConstType -> Bool
ConstType -> ConstType -> Ordering
ConstType -> ConstType -> ConstType
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 :: ConstType -> ConstType -> ConstType
$cmin :: ConstType -> ConstType -> ConstType
max :: ConstType -> ConstType -> ConstType
$cmax :: ConstType -> ConstType -> ConstType
>= :: ConstType -> ConstType -> Bool
$c>= :: ConstType -> ConstType -> Bool
> :: ConstType -> ConstType -> Bool
$c> :: ConstType -> ConstType -> Bool
<= :: ConstType -> ConstType -> Bool
$c<= :: ConstType -> ConstType -> Bool
< :: ConstType -> ConstType -> Bool
$c< :: ConstType -> ConstType -> Bool
compare :: ConstType -> ConstType -> Ordering
$ccompare :: ConstType -> ConstType -> Ordering
$cp1Ord :: Eq ConstType
C.Ord, Int -> ConstType -> ShowS
[ConstType] -> ShowS
ConstType -> String
(Int -> ConstType -> ShowS)
-> (ConstType -> String)
-> ([ConstType] -> ShowS)
-> Show ConstType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConstType] -> ShowS
$cshowList :: [ConstType] -> ShowS
show :: ConstType -> String
$cshow :: ConstType -> String
showsPrec :: Int -> ConstType -> ShowS
$cshowsPrec :: Int -> ConstType -> ShowS
C.Show, ReadPrec [ConstType]
ReadPrec ConstType
Int -> ReadS ConstType
ReadS [ConstType]
(Int -> ReadS ConstType)
-> ReadS [ConstType]
-> ReadPrec ConstType
-> ReadPrec [ConstType]
-> Read ConstType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConstType]
$creadListPrec :: ReadPrec [ConstType]
readPrec :: ReadPrec ConstType
$creadPrec :: ReadPrec ConstType
readList :: ReadS [ConstType]
$creadList :: ReadS [ConstType]
readsPrec :: Int -> ReadS ConstType
$creadsPrec :: Int -> ReadS ConstType
C.Read)

data InnerFunType = InnerFunType [Type] Type
  deriving (InnerFunType -> InnerFunType -> Bool
(InnerFunType -> InnerFunType -> Bool)
-> (InnerFunType -> InnerFunType -> Bool) -> Eq InnerFunType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InnerFunType -> InnerFunType -> Bool
$c/= :: InnerFunType -> InnerFunType -> Bool
== :: InnerFunType -> InnerFunType -> Bool
$c== :: InnerFunType -> InnerFunType -> Bool
C.Eq, Eq InnerFunType
Eq InnerFunType =>
(InnerFunType -> InnerFunType -> Ordering)
-> (InnerFunType -> InnerFunType -> Bool)
-> (InnerFunType -> InnerFunType -> Bool)
-> (InnerFunType -> InnerFunType -> Bool)
-> (InnerFunType -> InnerFunType -> Bool)
-> (InnerFunType -> InnerFunType -> InnerFunType)
-> (InnerFunType -> InnerFunType -> InnerFunType)
-> Ord InnerFunType
InnerFunType -> InnerFunType -> Bool
InnerFunType -> InnerFunType -> Ordering
InnerFunType -> InnerFunType -> InnerFunType
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 :: InnerFunType -> InnerFunType -> InnerFunType
$cmin :: InnerFunType -> InnerFunType -> InnerFunType
max :: InnerFunType -> InnerFunType -> InnerFunType
$cmax :: InnerFunType -> InnerFunType -> InnerFunType
>= :: InnerFunType -> InnerFunType -> Bool
$c>= :: InnerFunType -> InnerFunType -> Bool
> :: InnerFunType -> InnerFunType -> Bool
$c> :: InnerFunType -> InnerFunType -> Bool
<= :: InnerFunType -> InnerFunType -> Bool
$c<= :: InnerFunType -> InnerFunType -> Bool
< :: InnerFunType -> InnerFunType -> Bool
$c< :: InnerFunType -> InnerFunType -> Bool
compare :: InnerFunType -> InnerFunType -> Ordering
$ccompare :: InnerFunType -> InnerFunType -> Ordering
$cp1Ord :: Eq InnerFunType
C.Ord, Int -> InnerFunType -> ShowS
[InnerFunType] -> ShowS
InnerFunType -> String
(Int -> InnerFunType -> ShowS)
-> (InnerFunType -> String)
-> ([InnerFunType] -> ShowS)
-> Show InnerFunType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InnerFunType] -> ShowS
$cshowList :: [InnerFunType] -> ShowS
show :: InnerFunType -> String
$cshow :: InnerFunType -> String
showsPrec :: Int -> InnerFunType -> ShowS
$cshowsPrec :: Int -> InnerFunType -> ShowS
C.Show, ReadPrec [InnerFunType]
ReadPrec InnerFunType
Int -> ReadS InnerFunType
ReadS [InnerFunType]
(Int -> ReadS InnerFunType)
-> ReadS [InnerFunType]
-> ReadPrec InnerFunType
-> ReadPrec [InnerFunType]
-> Read InnerFunType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InnerFunType]
$creadListPrec :: ReadPrec [InnerFunType]
readPrec :: ReadPrec InnerFunType
$creadPrec :: ReadPrec InnerFunType
readList :: ReadS [InnerFunType]
$creadList :: ReadS [InnerFunType]
readsPrec :: Int -> ReadS InnerFunType
$creadsPrec :: Int -> ReadS InnerFunType
C.Read)

data FunType
    = FunTypeMono InnerFunType | FunTypePoly Par InnerFunType
  deriving (FunType -> FunType -> Bool
(FunType -> FunType -> Bool)
-> (FunType -> FunType -> Bool) -> Eq FunType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FunType -> FunType -> Bool
$c/= :: FunType -> FunType -> Bool
== :: FunType -> FunType -> Bool
$c== :: FunType -> FunType -> Bool
C.Eq, Eq FunType
Eq FunType =>
(FunType -> FunType -> Ordering)
-> (FunType -> FunType -> Bool)
-> (FunType -> FunType -> Bool)
-> (FunType -> FunType -> Bool)
-> (FunType -> FunType -> Bool)
-> (FunType -> FunType -> FunType)
-> (FunType -> FunType -> FunType)
-> Ord FunType
FunType -> FunType -> Bool
FunType -> FunType -> Ordering
FunType -> FunType -> FunType
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 :: FunType -> FunType -> FunType
$cmin :: FunType -> FunType -> FunType
max :: FunType -> FunType -> FunType
$cmax :: FunType -> FunType -> FunType
>= :: FunType -> FunType -> Bool
$c>= :: FunType -> FunType -> Bool
> :: FunType -> FunType -> Bool
$c> :: FunType -> FunType -> Bool
<= :: FunType -> FunType -> Bool
$c<= :: FunType -> FunType -> Bool
< :: FunType -> FunType -> Bool
$c< :: FunType -> FunType -> Bool
compare :: FunType -> FunType -> Ordering
$ccompare :: FunType -> FunType -> Ordering
$cp1Ord :: Eq FunType
C.Ord, Int -> FunType -> ShowS
[FunType] -> ShowS
FunType -> String
(Int -> FunType -> ShowS)
-> (FunType -> String) -> ([FunType] -> ShowS) -> Show FunType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FunType] -> ShowS
$cshowList :: [FunType] -> ShowS
show :: FunType -> String
$cshow :: FunType -> String
showsPrec :: Int -> FunType -> ShowS
$cshowsPrec :: Int -> FunType -> ShowS
C.Show, ReadPrec [FunType]
ReadPrec FunType
Int -> ReadS FunType
ReadS [FunType]
(Int -> ReadS FunType)
-> ReadS [FunType]
-> ReadPrec FunType
-> ReadPrec [FunType]
-> Read FunType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FunType]
$creadListPrec :: ReadPrec [FunType]
readPrec :: ReadPrec FunType
$creadPrec :: ReadPrec FunType
readList :: ReadS [FunType]
$creadList :: ReadS [FunType]
readsPrec :: Int -> ReadS FunType
$creadsPrec :: Int -> ReadS FunType
C.Read)

data InnerFunDec = InnerFunDec [Binding] Type
  deriving (InnerFunDec -> InnerFunDec -> Bool
(InnerFunDec -> InnerFunDec -> Bool)
-> (InnerFunDec -> InnerFunDec -> Bool) -> Eq InnerFunDec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InnerFunDec -> InnerFunDec -> Bool
$c/= :: InnerFunDec -> InnerFunDec -> Bool
== :: InnerFunDec -> InnerFunDec -> Bool
$c== :: InnerFunDec -> InnerFunDec -> Bool
C.Eq, Eq InnerFunDec
Eq InnerFunDec =>
(InnerFunDec -> InnerFunDec -> Ordering)
-> (InnerFunDec -> InnerFunDec -> Bool)
-> (InnerFunDec -> InnerFunDec -> Bool)
-> (InnerFunDec -> InnerFunDec -> Bool)
-> (InnerFunDec -> InnerFunDec -> Bool)
-> (InnerFunDec -> InnerFunDec -> InnerFunDec)
-> (InnerFunDec -> InnerFunDec -> InnerFunDec)
-> Ord InnerFunDec
InnerFunDec -> InnerFunDec -> Bool
InnerFunDec -> InnerFunDec -> Ordering
InnerFunDec -> InnerFunDec -> InnerFunDec
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 :: InnerFunDec -> InnerFunDec -> InnerFunDec
$cmin :: InnerFunDec -> InnerFunDec -> InnerFunDec
max :: InnerFunDec -> InnerFunDec -> InnerFunDec
$cmax :: InnerFunDec -> InnerFunDec -> InnerFunDec
>= :: InnerFunDec -> InnerFunDec -> Bool
$c>= :: InnerFunDec -> InnerFunDec -> Bool
> :: InnerFunDec -> InnerFunDec -> Bool
$c> :: InnerFunDec -> InnerFunDec -> Bool
<= :: InnerFunDec -> InnerFunDec -> Bool
$c<= :: InnerFunDec -> InnerFunDec -> Bool
< :: InnerFunDec -> InnerFunDec -> Bool
$c< :: InnerFunDec -> InnerFunDec -> Bool
compare :: InnerFunDec -> InnerFunDec -> Ordering
$ccompare :: InnerFunDec -> InnerFunDec -> Ordering
$cp1Ord :: Eq InnerFunDec
C.Ord, Int -> InnerFunDec -> ShowS
[InnerFunDec] -> ShowS
InnerFunDec -> String
(Int -> InnerFunDec -> ShowS)
-> (InnerFunDec -> String)
-> ([InnerFunDec] -> ShowS)
-> Show InnerFunDec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InnerFunDec] -> ShowS
$cshowList :: [InnerFunDec] -> ShowS
show :: InnerFunDec -> String
$cshow :: InnerFunDec -> String
showsPrec :: Int -> InnerFunDec -> ShowS
$cshowsPrec :: Int -> InnerFunDec -> ShowS
C.Show, ReadPrec [InnerFunDec]
ReadPrec InnerFunDec
Int -> ReadS InnerFunDec
ReadS [InnerFunDec]
(Int -> ReadS InnerFunDec)
-> ReadS [InnerFunDec]
-> ReadPrec InnerFunDec
-> ReadPrec [InnerFunDec]
-> Read InnerFunDec
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InnerFunDec]
$creadListPrec :: ReadPrec [InnerFunDec]
readPrec :: ReadPrec InnerFunDec
$creadPrec :: ReadPrec InnerFunDec
readList :: ReadS [InnerFunDec]
$creadList :: ReadS [InnerFunDec]
readsPrec :: Int -> ReadS InnerFunDec
$creadsPrec :: Int -> ReadS InnerFunDec
C.Read)

data FunDec
    = FunDecMono AttrSymbol InnerFunDec
    | FunDecPoly AttrSymbol Par InnerFunDec
  deriving (FunDec -> FunDec -> Bool
(FunDec -> FunDec -> Bool)
-> (FunDec -> FunDec -> Bool) -> Eq FunDec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FunDec -> FunDec -> Bool
$c/= :: FunDec -> FunDec -> Bool
== :: FunDec -> FunDec -> Bool
$c== :: FunDec -> FunDec -> Bool
C.Eq, Eq FunDec
Eq FunDec =>
(FunDec -> FunDec -> Ordering)
-> (FunDec -> FunDec -> Bool)
-> (FunDec -> FunDec -> Bool)
-> (FunDec -> FunDec -> Bool)
-> (FunDec -> FunDec -> Bool)
-> (FunDec -> FunDec -> FunDec)
-> (FunDec -> FunDec -> FunDec)
-> Ord FunDec
FunDec -> FunDec -> Bool
FunDec -> FunDec -> Ordering
FunDec -> FunDec -> FunDec
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 :: FunDec -> FunDec -> FunDec
$cmin :: FunDec -> FunDec -> FunDec
max :: FunDec -> FunDec -> FunDec
$cmax :: FunDec -> FunDec -> FunDec
>= :: FunDec -> FunDec -> Bool
$c>= :: FunDec -> FunDec -> Bool
> :: FunDec -> FunDec -> Bool
$c> :: FunDec -> FunDec -> Bool
<= :: FunDec -> FunDec -> Bool
$c<= :: FunDec -> FunDec -> Bool
< :: FunDec -> FunDec -> Bool
$c< :: FunDec -> FunDec -> Bool
compare :: FunDec -> FunDec -> Ordering
$ccompare :: FunDec -> FunDec -> Ordering
$cp1Ord :: Eq FunDec
C.Ord, Int -> FunDec -> ShowS
[FunDec] -> ShowS
FunDec -> String
(Int -> FunDec -> ShowS)
-> (FunDec -> String) -> ([FunDec] -> ShowS) -> Show FunDec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FunDec] -> ShowS
$cshowList :: [FunDec] -> ShowS
show :: FunDec -> String
$cshow :: FunDec -> String
showsPrec :: Int -> FunDec -> ShowS
$cshowsPrec :: Int -> FunDec -> ShowS
C.Show, ReadPrec [FunDec]
ReadPrec FunDec
Int -> ReadS FunDec
ReadS [FunDec]
(Int -> ReadS FunDec)
-> ReadS [FunDec]
-> ReadPrec FunDec
-> ReadPrec [FunDec]
-> Read FunDec
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FunDec]
$creadListPrec :: ReadPrec [FunDec]
readPrec :: ReadPrec FunDec
$creadPrec :: ReadPrec FunDec
readList :: ReadS [FunDec]
$creadList :: ReadS [FunDec]
readsPrec :: Int -> ReadS FunDec
$creadsPrec :: Int -> ReadS FunDec
C.Read)

data BracketedFunDec = BracketedFunDec FunDec
  deriving (BracketedFunDec -> BracketedFunDec -> Bool
(BracketedFunDec -> BracketedFunDec -> Bool)
-> (BracketedFunDec -> BracketedFunDec -> Bool)
-> Eq BracketedFunDec
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BracketedFunDec -> BracketedFunDec -> Bool
$c/= :: BracketedFunDec -> BracketedFunDec -> Bool
== :: BracketedFunDec -> BracketedFunDec -> Bool
$c== :: BracketedFunDec -> BracketedFunDec -> Bool
C.Eq, Eq BracketedFunDec
Eq BracketedFunDec =>
(BracketedFunDec -> BracketedFunDec -> Ordering)
-> (BracketedFunDec -> BracketedFunDec -> Bool)
-> (BracketedFunDec -> BracketedFunDec -> Bool)
-> (BracketedFunDec -> BracketedFunDec -> Bool)
-> (BracketedFunDec -> BracketedFunDec -> Bool)
-> (BracketedFunDec -> BracketedFunDec -> BracketedFunDec)
-> (BracketedFunDec -> BracketedFunDec -> BracketedFunDec)
-> Ord BracketedFunDec
BracketedFunDec -> BracketedFunDec -> Bool
BracketedFunDec -> BracketedFunDec -> Ordering
BracketedFunDec -> BracketedFunDec -> BracketedFunDec
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 :: BracketedFunDec -> BracketedFunDec -> BracketedFunDec
$cmin :: BracketedFunDec -> BracketedFunDec -> BracketedFunDec
max :: BracketedFunDec -> BracketedFunDec -> BracketedFunDec
$cmax :: BracketedFunDec -> BracketedFunDec -> BracketedFunDec
>= :: BracketedFunDec -> BracketedFunDec -> Bool
$c>= :: BracketedFunDec -> BracketedFunDec -> Bool
> :: BracketedFunDec -> BracketedFunDec -> Bool
$c> :: BracketedFunDec -> BracketedFunDec -> Bool
<= :: BracketedFunDec -> BracketedFunDec -> Bool
$c<= :: BracketedFunDec -> BracketedFunDec -> Bool
< :: BracketedFunDec -> BracketedFunDec -> Bool
$c< :: BracketedFunDec -> BracketedFunDec -> Bool
compare :: BracketedFunDec -> BracketedFunDec -> Ordering
$ccompare :: BracketedFunDec -> BracketedFunDec -> Ordering
$cp1Ord :: Eq BracketedFunDec
C.Ord, Int -> BracketedFunDec -> ShowS
[BracketedFunDec] -> ShowS
BracketedFunDec -> String
(Int -> BracketedFunDec -> ShowS)
-> (BracketedFunDec -> String)
-> ([BracketedFunDec] -> ShowS)
-> Show BracketedFunDec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BracketedFunDec] -> ShowS
$cshowList :: [BracketedFunDec] -> ShowS
show :: BracketedFunDec -> String
$cshow :: BracketedFunDec -> String
showsPrec :: Int -> BracketedFunDec -> ShowS
$cshowsPrec :: Int -> BracketedFunDec -> ShowS
C.Show, ReadPrec [BracketedFunDec]
ReadPrec BracketedFunDec
Int -> ReadS BracketedFunDec
ReadS [BracketedFunDec]
(Int -> ReadS BracketedFunDec)
-> ReadS [BracketedFunDec]
-> ReadPrec BracketedFunDec
-> ReadPrec [BracketedFunDec]
-> Read BracketedFunDec
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BracketedFunDec]
$creadListPrec :: ReadPrec [BracketedFunDec]
readPrec :: ReadPrec BracketedFunDec
$creadPrec :: ReadPrec BracketedFunDec
readList :: ReadS [BracketedFunDec]
$creadList :: ReadS [BracketedFunDec]
readsPrec :: Int -> ReadS BracketedFunDec
$creadsPrec :: Int -> ReadS BracketedFunDec
C.Read)

data DatatypeName = DatatypeName AttrSymbol Integer
  deriving (DatatypeName -> DatatypeName -> Bool
(DatatypeName -> DatatypeName -> Bool)
-> (DatatypeName -> DatatypeName -> Bool) -> Eq DatatypeName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DatatypeName -> DatatypeName -> Bool
$c/= :: DatatypeName -> DatatypeName -> Bool
== :: DatatypeName -> DatatypeName -> Bool
$c== :: DatatypeName -> DatatypeName -> Bool
C.Eq, Eq DatatypeName
Eq DatatypeName =>
(DatatypeName -> DatatypeName -> Ordering)
-> (DatatypeName -> DatatypeName -> Bool)
-> (DatatypeName -> DatatypeName -> Bool)
-> (DatatypeName -> DatatypeName -> Bool)
-> (DatatypeName -> DatatypeName -> Bool)
-> (DatatypeName -> DatatypeName -> DatatypeName)
-> (DatatypeName -> DatatypeName -> DatatypeName)
-> Ord DatatypeName
DatatypeName -> DatatypeName -> Bool
DatatypeName -> DatatypeName -> Ordering
DatatypeName -> DatatypeName -> DatatypeName
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 :: DatatypeName -> DatatypeName -> DatatypeName
$cmin :: DatatypeName -> DatatypeName -> DatatypeName
max :: DatatypeName -> DatatypeName -> DatatypeName
$cmax :: DatatypeName -> DatatypeName -> DatatypeName
>= :: DatatypeName -> DatatypeName -> Bool
$c>= :: DatatypeName -> DatatypeName -> Bool
> :: DatatypeName -> DatatypeName -> Bool
$c> :: DatatypeName -> DatatypeName -> Bool
<= :: DatatypeName -> DatatypeName -> Bool
$c<= :: DatatypeName -> DatatypeName -> Bool
< :: DatatypeName -> DatatypeName -> Bool
$c< :: DatatypeName -> DatatypeName -> Bool
compare :: DatatypeName -> DatatypeName -> Ordering
$ccompare :: DatatypeName -> DatatypeName -> Ordering
$cp1Ord :: Eq DatatypeName
C.Ord, Int -> DatatypeName -> ShowS
[DatatypeName] -> ShowS
DatatypeName -> String
(Int -> DatatypeName -> ShowS)
-> (DatatypeName -> String)
-> ([DatatypeName] -> ShowS)
-> Show DatatypeName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DatatypeName] -> ShowS
$cshowList :: [DatatypeName] -> ShowS
show :: DatatypeName -> String
$cshow :: DatatypeName -> String
showsPrec :: Int -> DatatypeName -> ShowS
$cshowsPrec :: Int -> DatatypeName -> ShowS
C.Show, ReadPrec [DatatypeName]
ReadPrec DatatypeName
Int -> ReadS DatatypeName
ReadS [DatatypeName]
(Int -> ReadS DatatypeName)
-> ReadS [DatatypeName]
-> ReadPrec DatatypeName
-> ReadPrec [DatatypeName]
-> Read DatatypeName
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DatatypeName]
$creadListPrec :: ReadPrec [DatatypeName]
readPrec :: ReadPrec DatatypeName
$creadPrec :: ReadPrec DatatypeName
readList :: ReadS [DatatypeName]
$creadList :: ReadS [DatatypeName]
readsPrec :: Int -> ReadS DatatypeName
$creadsPrec :: Int -> ReadS DatatypeName
C.Read)

data InnerDatatype = InnerDatatype [Constructor]
  deriving (InnerDatatype -> InnerDatatype -> Bool
(InnerDatatype -> InnerDatatype -> Bool)
-> (InnerDatatype -> InnerDatatype -> Bool) -> Eq InnerDatatype
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InnerDatatype -> InnerDatatype -> Bool
$c/= :: InnerDatatype -> InnerDatatype -> Bool
== :: InnerDatatype -> InnerDatatype -> Bool
$c== :: InnerDatatype -> InnerDatatype -> Bool
C.Eq, Eq InnerDatatype
Eq InnerDatatype =>
(InnerDatatype -> InnerDatatype -> Ordering)
-> (InnerDatatype -> InnerDatatype -> Bool)
-> (InnerDatatype -> InnerDatatype -> Bool)
-> (InnerDatatype -> InnerDatatype -> Bool)
-> (InnerDatatype -> InnerDatatype -> Bool)
-> (InnerDatatype -> InnerDatatype -> InnerDatatype)
-> (InnerDatatype -> InnerDatatype -> InnerDatatype)
-> Ord InnerDatatype
InnerDatatype -> InnerDatatype -> Bool
InnerDatatype -> InnerDatatype -> Ordering
InnerDatatype -> InnerDatatype -> InnerDatatype
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 :: InnerDatatype -> InnerDatatype -> InnerDatatype
$cmin :: InnerDatatype -> InnerDatatype -> InnerDatatype
max :: InnerDatatype -> InnerDatatype -> InnerDatatype
$cmax :: InnerDatatype -> InnerDatatype -> InnerDatatype
>= :: InnerDatatype -> InnerDatatype -> Bool
$c>= :: InnerDatatype -> InnerDatatype -> Bool
> :: InnerDatatype -> InnerDatatype -> Bool
$c> :: InnerDatatype -> InnerDatatype -> Bool
<= :: InnerDatatype -> InnerDatatype -> Bool
$c<= :: InnerDatatype -> InnerDatatype -> Bool
< :: InnerDatatype -> InnerDatatype -> Bool
$c< :: InnerDatatype -> InnerDatatype -> Bool
compare :: InnerDatatype -> InnerDatatype -> Ordering
$ccompare :: InnerDatatype -> InnerDatatype -> Ordering
$cp1Ord :: Eq InnerDatatype
C.Ord, Int -> InnerDatatype -> ShowS
[InnerDatatype] -> ShowS
InnerDatatype -> String
(Int -> InnerDatatype -> ShowS)
-> (InnerDatatype -> String)
-> ([InnerDatatype] -> ShowS)
-> Show InnerDatatype
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InnerDatatype] -> ShowS
$cshowList :: [InnerDatatype] -> ShowS
show :: InnerDatatype -> String
$cshow :: InnerDatatype -> String
showsPrec :: Int -> InnerDatatype -> ShowS
$cshowsPrec :: Int -> InnerDatatype -> ShowS
C.Show, ReadPrec [InnerDatatype]
ReadPrec InnerDatatype
Int -> ReadS InnerDatatype
ReadS [InnerDatatype]
(Int -> ReadS InnerDatatype)
-> ReadS [InnerDatatype]
-> ReadPrec InnerDatatype
-> ReadPrec [InnerDatatype]
-> Read InnerDatatype
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InnerDatatype]
$creadListPrec :: ReadPrec [InnerDatatype]
readPrec :: ReadPrec InnerDatatype
$creadPrec :: ReadPrec InnerDatatype
readList :: ReadS [InnerDatatype]
$creadList :: ReadS [InnerDatatype]
readsPrec :: Int -> ReadS InnerDatatype
$creadsPrec :: Int -> ReadS InnerDatatype
C.Read)

data Datatype
    = DatatypeMono InnerDatatype | DatatypePoly Par InnerDatatype
  deriving (Datatype -> Datatype -> Bool
(Datatype -> Datatype -> Bool)
-> (Datatype -> Datatype -> Bool) -> Eq Datatype
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Datatype -> Datatype -> Bool
$c/= :: Datatype -> Datatype -> Bool
== :: Datatype -> Datatype -> Bool
$c== :: Datatype -> Datatype -> Bool
C.Eq, Eq Datatype
Eq Datatype =>
(Datatype -> Datatype -> Ordering)
-> (Datatype -> Datatype -> Bool)
-> (Datatype -> Datatype -> Bool)
-> (Datatype -> Datatype -> Bool)
-> (Datatype -> Datatype -> Bool)
-> (Datatype -> Datatype -> Datatype)
-> (Datatype -> Datatype -> Datatype)
-> Ord Datatype
Datatype -> Datatype -> Bool
Datatype -> Datatype -> Ordering
Datatype -> Datatype -> Datatype
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 :: Datatype -> Datatype -> Datatype
$cmin :: Datatype -> Datatype -> Datatype
max :: Datatype -> Datatype -> Datatype
$cmax :: Datatype -> Datatype -> Datatype
>= :: Datatype -> Datatype -> Bool
$c>= :: Datatype -> Datatype -> Bool
> :: Datatype -> Datatype -> Bool
$c> :: Datatype -> Datatype -> Bool
<= :: Datatype -> Datatype -> Bool
$c<= :: Datatype -> Datatype -> Bool
< :: Datatype -> Datatype -> Bool
$c< :: Datatype -> Datatype -> Bool
compare :: Datatype -> Datatype -> Ordering
$ccompare :: Datatype -> Datatype -> Ordering
$cp1Ord :: Eq Datatype
C.Ord, Int -> Datatype -> ShowS
[Datatype] -> ShowS
Datatype -> String
(Int -> Datatype -> ShowS)
-> (Datatype -> String) -> ([Datatype] -> ShowS) -> Show Datatype
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Datatype] -> ShowS
$cshowList :: [Datatype] -> ShowS
show :: Datatype -> String
$cshow :: Datatype -> String
showsPrec :: Int -> Datatype -> ShowS
$cshowsPrec :: Int -> Datatype -> ShowS
C.Show, ReadPrec [Datatype]
ReadPrec Datatype
Int -> ReadS Datatype
ReadS [Datatype]
(Int -> ReadS Datatype)
-> ReadS [Datatype]
-> ReadPrec Datatype
-> ReadPrec [Datatype]
-> Read Datatype
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Datatype]
$creadListPrec :: ReadPrec [Datatype]
readPrec :: ReadPrec Datatype
$creadPrec :: ReadPrec Datatype
readList :: ReadS [Datatype]
$creadList :: ReadS [Datatype]
readsPrec :: Int -> ReadS Datatype
$creadsPrec :: Int -> ReadS Datatype
C.Read)

data Constructor = Constructor AttrSymbol [Binding]
  deriving (Constructor -> Constructor -> Bool
(Constructor -> Constructor -> Bool)
-> (Constructor -> Constructor -> Bool) -> Eq Constructor
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Constructor -> Constructor -> Bool
$c/= :: Constructor -> Constructor -> Bool
== :: Constructor -> Constructor -> Bool
$c== :: Constructor -> Constructor -> Bool
C.Eq, Eq Constructor
Eq Constructor =>
(Constructor -> Constructor -> Ordering)
-> (Constructor -> Constructor -> Bool)
-> (Constructor -> Constructor -> Bool)
-> (Constructor -> Constructor -> Bool)
-> (Constructor -> Constructor -> Bool)
-> (Constructor -> Constructor -> Constructor)
-> (Constructor -> Constructor -> Constructor)
-> Ord Constructor
Constructor -> Constructor -> Bool
Constructor -> Constructor -> Ordering
Constructor -> Constructor -> Constructor
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 :: Constructor -> Constructor -> Constructor
$cmin :: Constructor -> Constructor -> Constructor
max :: Constructor -> Constructor -> Constructor
$cmax :: Constructor -> Constructor -> Constructor
>= :: Constructor -> Constructor -> Bool
$c>= :: Constructor -> Constructor -> Bool
> :: Constructor -> Constructor -> Bool
$c> :: Constructor -> Constructor -> Bool
<= :: Constructor -> Constructor -> Bool
$c<= :: Constructor -> Constructor -> Bool
< :: Constructor -> Constructor -> Bool
$c< :: Constructor -> Constructor -> Bool
compare :: Constructor -> Constructor -> Ordering
$ccompare :: Constructor -> Constructor -> Ordering
$cp1Ord :: Eq Constructor
C.Ord, Int -> Constructor -> ShowS
[Constructor] -> ShowS
Constructor -> String
(Int -> Constructor -> ShowS)
-> (Constructor -> String)
-> ([Constructor] -> ShowS)
-> Show Constructor
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Constructor] -> ShowS
$cshowList :: [Constructor] -> ShowS
show :: Constructor -> String
$cshow :: Constructor -> String
showsPrec :: Int -> Constructor -> ShowS
$cshowsPrec :: Int -> Constructor -> ShowS
C.Show, ReadPrec [Constructor]
ReadPrec Constructor
Int -> ReadS Constructor
ReadS [Constructor]
(Int -> ReadS Constructor)
-> ReadS [Constructor]
-> ReadPrec Constructor
-> ReadPrec [Constructor]
-> Read Constructor
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Constructor]
$creadListPrec :: ReadPrec [Constructor]
readPrec :: ReadPrec Constructor
$creadPrec :: ReadPrec Constructor
readList :: ReadS [Constructor]
$creadList :: ReadS [Constructor]
readsPrec :: Int -> ReadS Constructor
$creadsPrec :: Int -> ReadS Constructor
C.Read)

data Binding = Binding Symbol Type
  deriving (Binding -> Binding -> Bool
(Binding -> Binding -> Bool)
-> (Binding -> Binding -> Bool) -> Eq Binding
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Binding -> Binding -> Bool
$c/= :: Binding -> Binding -> Bool
== :: Binding -> Binding -> Bool
$c== :: Binding -> Binding -> Bool
C.Eq, Eq Binding
Eq Binding =>
(Binding -> Binding -> Ordering)
-> (Binding -> Binding -> Bool)
-> (Binding -> Binding -> Bool)
-> (Binding -> Binding -> Bool)
-> (Binding -> Binding -> Bool)
-> (Binding -> Binding -> Binding)
-> (Binding -> Binding -> Binding)
-> Ord Binding
Binding -> Binding -> Bool
Binding -> Binding -> Ordering
Binding -> Binding -> Binding
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 :: Binding -> Binding -> Binding
$cmin :: Binding -> Binding -> Binding
max :: Binding -> Binding -> Binding
$cmax :: Binding -> Binding -> Binding
>= :: Binding -> Binding -> Bool
$c>= :: Binding -> Binding -> Bool
> :: Binding -> Binding -> Bool
$c> :: Binding -> Binding -> Bool
<= :: Binding -> Binding -> Bool
$c<= :: Binding -> Binding -> Bool
< :: Binding -> Binding -> Bool
$c< :: Binding -> Binding -> Bool
compare :: Binding -> Binding -> Ordering
$ccompare :: Binding -> Binding -> Ordering
$cp1Ord :: Eq Binding
C.Ord, Int -> Binding -> ShowS
[Binding] -> ShowS
Binding -> String
(Int -> Binding -> ShowS)
-> (Binding -> String) -> ([Binding] -> ShowS) -> Show Binding
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Binding] -> ShowS
$cshowList :: [Binding] -> ShowS
show :: Binding -> String
$cshow :: Binding -> String
showsPrec :: Int -> Binding -> ShowS
$cshowsPrec :: Int -> Binding -> ShowS
C.Show, ReadPrec [Binding]
ReadPrec Binding
Int -> ReadS Binding
ReadS [Binding]
(Int -> ReadS Binding)
-> ReadS [Binding]
-> ReadPrec Binding
-> ReadPrec [Binding]
-> Read Binding
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Binding]
$creadListPrec :: ReadPrec [Binding]
readPrec :: ReadPrec Binding
$creadPrec :: ReadPrec Binding
readList :: ReadS [Binding]
$creadList :: ReadS [Binding]
readsPrec :: Int -> ReadS Binding
$creadsPrec :: Int -> ReadS Binding
C.Read)

data LetDecl = LetDecl Symbol Expr
  deriving (LetDecl -> LetDecl -> Bool
(LetDecl -> LetDecl -> Bool)
-> (LetDecl -> LetDecl -> Bool) -> Eq LetDecl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LetDecl -> LetDecl -> Bool
$c/= :: LetDecl -> LetDecl -> Bool
== :: LetDecl -> LetDecl -> Bool
$c== :: LetDecl -> LetDecl -> Bool
C.Eq, Eq LetDecl
Eq LetDecl =>
(LetDecl -> LetDecl -> Ordering)
-> (LetDecl -> LetDecl -> Bool)
-> (LetDecl -> LetDecl -> Bool)
-> (LetDecl -> LetDecl -> Bool)
-> (LetDecl -> LetDecl -> Bool)
-> (LetDecl -> LetDecl -> LetDecl)
-> (LetDecl -> LetDecl -> LetDecl)
-> Ord LetDecl
LetDecl -> LetDecl -> Bool
LetDecl -> LetDecl -> Ordering
LetDecl -> LetDecl -> LetDecl
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 :: LetDecl -> LetDecl -> LetDecl
$cmin :: LetDecl -> LetDecl -> LetDecl
max :: LetDecl -> LetDecl -> LetDecl
$cmax :: LetDecl -> LetDecl -> LetDecl
>= :: LetDecl -> LetDecl -> Bool
$c>= :: LetDecl -> LetDecl -> Bool
> :: LetDecl -> LetDecl -> Bool
$c> :: LetDecl -> LetDecl -> Bool
<= :: LetDecl -> LetDecl -> Bool
$c<= :: LetDecl -> LetDecl -> Bool
< :: LetDecl -> LetDecl -> Bool
$c< :: LetDecl -> LetDecl -> Bool
compare :: LetDecl -> LetDecl -> Ordering
$ccompare :: LetDecl -> LetDecl -> Ordering
$cp1Ord :: Eq LetDecl
C.Ord, Int -> LetDecl -> ShowS
[LetDecl] -> ShowS
LetDecl -> String
(Int -> LetDecl -> ShowS)
-> (LetDecl -> String) -> ([LetDecl] -> ShowS) -> Show LetDecl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LetDecl] -> ShowS
$cshowList :: [LetDecl] -> ShowS
show :: LetDecl -> String
$cshow :: LetDecl -> String
showsPrec :: Int -> LetDecl -> ShowS
$cshowsPrec :: Int -> LetDecl -> ShowS
C.Show, ReadPrec [LetDecl]
ReadPrec LetDecl
Int -> ReadS LetDecl
ReadS [LetDecl]
(Int -> ReadS LetDecl)
-> ReadS [LetDecl]
-> ReadPrec LetDecl
-> ReadPrec [LetDecl]
-> Read LetDecl
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LetDecl]
$creadListPrec :: ReadPrec [LetDecl]
readPrec :: ReadPrec LetDecl
$creadPrec :: ReadPrec LetDecl
readList :: ReadS [LetDecl]
$creadList :: ReadS [LetDecl]
readsPrec :: Int -> ReadS LetDecl
$creadsPrec :: Int -> ReadS LetDecl
C.Read)

data Type
    = TyVar Symbol
    | TyApp Symbol [Type]
    | ArrowTy [Type]
    | IntTy
    | RealTy
    | BoolTy
  deriving (Type -> Type -> Bool
(Type -> Type -> Bool) -> (Type -> Type -> Bool) -> Eq Type
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Type -> Type -> Bool
$c/= :: Type -> Type -> Bool
== :: Type -> Type -> Bool
$c== :: Type -> Type -> Bool
C.Eq, Eq Type
Eq Type =>
(Type -> Type -> Ordering)
-> (Type -> Type -> Bool)
-> (Type -> Type -> Bool)
-> (Type -> Type -> Bool)
-> (Type -> Type -> Bool)
-> (Type -> Type -> Type)
-> (Type -> Type -> Type)
-> Ord Type
Type -> Type -> Bool
Type -> Type -> Ordering
Type -> Type -> Type
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 :: Type -> Type -> Type
$cmin :: Type -> Type -> Type
max :: Type -> Type -> Type
$cmax :: Type -> Type -> Type
>= :: Type -> Type -> Bool
$c>= :: Type -> Type -> Bool
> :: Type -> Type -> Bool
$c> :: Type -> Type -> Bool
<= :: Type -> Type -> Bool
$c<= :: Type -> Type -> Bool
< :: Type -> Type -> Bool
$c< :: Type -> Type -> Bool
compare :: Type -> Type -> Ordering
$ccompare :: Type -> Type -> Ordering
$cp1Ord :: Eq Type
C.Ord, Int -> Type -> ShowS
[Type] -> ShowS
Type -> String
(Int -> Type -> ShowS)
-> (Type -> String) -> ([Type] -> ShowS) -> Show Type
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Type] -> ShowS
$cshowList :: [Type] -> ShowS
show :: Type -> String
$cshow :: Type -> String
showsPrec :: Int -> Type -> ShowS
$cshowsPrec :: Int -> Type -> ShowS
C.Show, ReadPrec [Type]
ReadPrec Type
Int -> ReadS Type
ReadS [Type]
(Int -> ReadS Type)
-> ReadS [Type] -> ReadPrec Type -> ReadPrec [Type] -> Read Type
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Type]
$creadListPrec :: ReadPrec [Type]
readPrec :: ReadPrec Type
$creadPrec :: ReadPrec Type
readList :: ReadS [Type]
$creadList :: ReadS [Type]
readsPrec :: Int -> ReadS Type
$creadsPrec :: Int -> ReadS Type
C.Read)

data Expr
    = Var PolySymbol
    | App Head [Expr]
    | Match Expr [Case]
    | Let [LetDecl] Expr
    | Binder Binder [Binding] Expr
    | Lit Lit
  deriving (Expr -> Expr -> Bool
(Expr -> Expr -> Bool) -> (Expr -> Expr -> Bool) -> Eq Expr
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Expr -> Expr -> Bool
$c/= :: Expr -> Expr -> Bool
== :: Expr -> Expr -> Bool
$c== :: Expr -> Expr -> Bool
C.Eq, Eq Expr
Eq Expr =>
(Expr -> Expr -> Ordering)
-> (Expr -> Expr -> Bool)
-> (Expr -> Expr -> Bool)
-> (Expr -> Expr -> Bool)
-> (Expr -> Expr -> Bool)
-> (Expr -> Expr -> Expr)
-> (Expr -> Expr -> Expr)
-> Ord Expr
Expr -> Expr -> Bool
Expr -> Expr -> Ordering
Expr -> Expr -> Expr
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 :: Expr -> Expr -> Expr
$cmin :: Expr -> Expr -> Expr
max :: Expr -> Expr -> Expr
$cmax :: Expr -> Expr -> Expr
>= :: Expr -> Expr -> Bool
$c>= :: Expr -> Expr -> Bool
> :: Expr -> Expr -> Bool
$c> :: Expr -> Expr -> Bool
<= :: Expr -> Expr -> Bool
$c<= :: Expr -> Expr -> Bool
< :: Expr -> Expr -> Bool
$c< :: Expr -> Expr -> Bool
compare :: Expr -> Expr -> Ordering
$ccompare :: Expr -> Expr -> Ordering
$cp1Ord :: Eq Expr
C.Ord, Int -> Expr -> ShowS
[Expr] -> ShowS
Expr -> String
(Int -> Expr -> ShowS)
-> (Expr -> String) -> ([Expr] -> ShowS) -> Show Expr
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Expr] -> ShowS
$cshowList :: [Expr] -> ShowS
show :: Expr -> String
$cshow :: Expr -> String
showsPrec :: Int -> Expr -> ShowS
$cshowsPrec :: Int -> Expr -> ShowS
C.Show, ReadPrec [Expr]
ReadPrec Expr
Int -> ReadS Expr
ReadS [Expr]
(Int -> ReadS Expr)
-> ReadS [Expr] -> ReadPrec Expr -> ReadPrec [Expr] -> Read Expr
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Expr]
$creadListPrec :: ReadPrec [Expr]
readPrec :: ReadPrec Expr
$creadPrec :: ReadPrec Expr
readList :: ReadS [Expr]
$creadList :: ReadS [Expr]
readsPrec :: Int -> ReadS Expr
$creadsPrec :: Int -> ReadS Expr
C.Read)

data Lit = LitInt Integer | LitNegInt Integer | LitTrue | LitFalse
  deriving (Lit -> Lit -> Bool
(Lit -> Lit -> Bool) -> (Lit -> Lit -> Bool) -> Eq Lit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Lit -> Lit -> Bool
$c/= :: Lit -> Lit -> Bool
== :: Lit -> Lit -> Bool
$c== :: Lit -> Lit -> Bool
C.Eq, Eq Lit
Eq Lit =>
(Lit -> Lit -> Ordering)
-> (Lit -> Lit -> Bool)
-> (Lit -> Lit -> Bool)
-> (Lit -> Lit -> Bool)
-> (Lit -> Lit -> Bool)
-> (Lit -> Lit -> Lit)
-> (Lit -> Lit -> Lit)
-> Ord Lit
Lit -> Lit -> Bool
Lit -> Lit -> Ordering
Lit -> Lit -> Lit
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 :: Lit -> Lit -> Lit
$cmin :: Lit -> Lit -> Lit
max :: Lit -> Lit -> Lit
$cmax :: Lit -> Lit -> Lit
>= :: Lit -> Lit -> Bool
$c>= :: Lit -> Lit -> Bool
> :: Lit -> Lit -> Bool
$c> :: Lit -> Lit -> Bool
<= :: Lit -> Lit -> Bool
$c<= :: Lit -> Lit -> Bool
< :: Lit -> Lit -> Bool
$c< :: Lit -> Lit -> Bool
compare :: Lit -> Lit -> Ordering
$ccompare :: Lit -> Lit -> Ordering
$cp1Ord :: Eq Lit
C.Ord, Int -> Lit -> ShowS
[Lit] -> ShowS
Lit -> String
(Int -> Lit -> ShowS)
-> (Lit -> String) -> ([Lit] -> ShowS) -> Show Lit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Lit] -> ShowS
$cshowList :: [Lit] -> ShowS
show :: Lit -> String
$cshow :: Lit -> String
showsPrec :: Int -> Lit -> ShowS
$cshowsPrec :: Int -> Lit -> ShowS
C.Show, ReadPrec [Lit]
ReadPrec Lit
Int -> ReadS Lit
ReadS [Lit]
(Int -> ReadS Lit)
-> ReadS [Lit] -> ReadPrec Lit -> ReadPrec [Lit] -> Read Lit
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Lit]
$creadListPrec :: ReadPrec [Lit]
readPrec :: ReadPrec Lit
$creadPrec :: ReadPrec Lit
readList :: ReadS [Lit]
$creadList :: ReadS [Lit]
readsPrec :: Int -> ReadS Lit
$creadsPrec :: Int -> ReadS Lit
C.Read)

data Binder = Lambda | Forall | Exists
  deriving (Binder -> Binder -> Bool
(Binder -> Binder -> Bool)
-> (Binder -> Binder -> Bool) -> Eq Binder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Binder -> Binder -> Bool
$c/= :: Binder -> Binder -> Bool
== :: Binder -> Binder -> Bool
$c== :: Binder -> Binder -> Bool
C.Eq, Eq Binder
Eq Binder =>
(Binder -> Binder -> Ordering)
-> (Binder -> Binder -> Bool)
-> (Binder -> Binder -> Bool)
-> (Binder -> Binder -> Bool)
-> (Binder -> Binder -> Bool)
-> (Binder -> Binder -> Binder)
-> (Binder -> Binder -> Binder)
-> Ord Binder
Binder -> Binder -> Bool
Binder -> Binder -> Ordering
Binder -> Binder -> Binder
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 :: Binder -> Binder -> Binder
$cmin :: Binder -> Binder -> Binder
max :: Binder -> Binder -> Binder
$cmax :: Binder -> Binder -> Binder
>= :: Binder -> Binder -> Bool
$c>= :: Binder -> Binder -> Bool
> :: Binder -> Binder -> Bool
$c> :: Binder -> Binder -> Bool
<= :: Binder -> Binder -> Bool
$c<= :: Binder -> Binder -> Bool
< :: Binder -> Binder -> Bool
$c< :: Binder -> Binder -> Bool
compare :: Binder -> Binder -> Ordering
$ccompare :: Binder -> Binder -> Ordering
$cp1Ord :: Eq Binder
C.Ord, Int -> Binder -> ShowS
[Binder] -> ShowS
Binder -> String
(Int -> Binder -> ShowS)
-> (Binder -> String) -> ([Binder] -> ShowS) -> Show Binder
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Binder] -> ShowS
$cshowList :: [Binder] -> ShowS
show :: Binder -> String
$cshow :: Binder -> String
showsPrec :: Int -> Binder -> ShowS
$cshowsPrec :: Int -> Binder -> ShowS
C.Show, ReadPrec [Binder]
ReadPrec Binder
Int -> ReadS Binder
ReadS [Binder]
(Int -> ReadS Binder)
-> ReadS [Binder]
-> ReadPrec Binder
-> ReadPrec [Binder]
-> Read Binder
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Binder]
$creadListPrec :: ReadPrec [Binder]
readPrec :: ReadPrec Binder
$creadPrec :: ReadPrec Binder
readList :: ReadS [Binder]
$creadList :: ReadS [Binder]
readsPrec :: Int -> ReadS Binder
$creadsPrec :: Int -> ReadS Binder
C.Read)

data Case = Case Pattern Expr
  deriving (Case -> Case -> Bool
(Case -> Case -> Bool) -> (Case -> Case -> Bool) -> Eq Case
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Case -> Case -> Bool
$c/= :: Case -> Case -> Bool
== :: Case -> Case -> Bool
$c== :: Case -> Case -> Bool
C.Eq, Eq Case
Eq Case =>
(Case -> Case -> Ordering)
-> (Case -> Case -> Bool)
-> (Case -> Case -> Bool)
-> (Case -> Case -> Bool)
-> (Case -> Case -> Bool)
-> (Case -> Case -> Case)
-> (Case -> Case -> Case)
-> Ord Case
Case -> Case -> Bool
Case -> Case -> Ordering
Case -> Case -> Case
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 :: Case -> Case -> Case
$cmin :: Case -> Case -> Case
max :: Case -> Case -> Case
$cmax :: Case -> Case -> Case
>= :: Case -> Case -> Bool
$c>= :: Case -> Case -> Bool
> :: Case -> Case -> Bool
$c> :: Case -> Case -> Bool
<= :: Case -> Case -> Bool
$c<= :: Case -> Case -> Bool
< :: Case -> Case -> Bool
$c< :: Case -> Case -> Bool
compare :: Case -> Case -> Ordering
$ccompare :: Case -> Case -> Ordering
$cp1Ord :: Eq Case
C.Ord, Int -> Case -> ShowS
[Case] -> ShowS
Case -> String
(Int -> Case -> ShowS)
-> (Case -> String) -> ([Case] -> ShowS) -> Show Case
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Case] -> ShowS
$cshowList :: [Case] -> ShowS
show :: Case -> String
$cshow :: Case -> String
showsPrec :: Int -> Case -> ShowS
$cshowsPrec :: Int -> Case -> ShowS
C.Show, ReadPrec [Case]
ReadPrec Case
Int -> ReadS Case
ReadS [Case]
(Int -> ReadS Case)
-> ReadS [Case] -> ReadPrec Case -> ReadPrec [Case] -> Read Case
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Case]
$creadListPrec :: ReadPrec [Case]
readPrec :: ReadPrec Case
$creadPrec :: ReadPrec Case
readList :: ReadS [Case]
$creadList :: ReadS [Case]
readsPrec :: Int -> ReadS Case
$creadsPrec :: Int -> ReadS Case
C.Read)

data Pattern
    = Default | ConPat Symbol [Symbol] | SimplePat Symbol | LitPat Lit
  deriving (Pattern -> Pattern -> Bool
(Pattern -> Pattern -> Bool)
-> (Pattern -> Pattern -> Bool) -> Eq Pattern
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Pattern -> Pattern -> Bool
$c/= :: Pattern -> Pattern -> Bool
== :: Pattern -> Pattern -> Bool
$c== :: Pattern -> Pattern -> Bool
C.Eq, Eq Pattern
Eq Pattern =>
(Pattern -> Pattern -> Ordering)
-> (Pattern -> Pattern -> Bool)
-> (Pattern -> Pattern -> Bool)
-> (Pattern -> Pattern -> Bool)
-> (Pattern -> Pattern -> Bool)
-> (Pattern -> Pattern -> Pattern)
-> (Pattern -> Pattern -> Pattern)
-> Ord Pattern
Pattern -> Pattern -> Bool
Pattern -> Pattern -> Ordering
Pattern -> Pattern -> Pattern
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 :: Pattern -> Pattern -> Pattern
$cmin :: Pattern -> Pattern -> Pattern
max :: Pattern -> Pattern -> Pattern
$cmax :: Pattern -> Pattern -> Pattern
>= :: Pattern -> Pattern -> Bool
$c>= :: Pattern -> Pattern -> Bool
> :: Pattern -> Pattern -> Bool
$c> :: Pattern -> Pattern -> Bool
<= :: Pattern -> Pattern -> Bool
$c<= :: Pattern -> Pattern -> Bool
< :: Pattern -> Pattern -> Bool
$c< :: Pattern -> Pattern -> Bool
compare :: Pattern -> Pattern -> Ordering
$ccompare :: Pattern -> Pattern -> Ordering
$cp1Ord :: Eq Pattern
C.Ord, Int -> Pattern -> ShowS
[Pattern] -> ShowS
Pattern -> String
(Int -> Pattern -> ShowS)
-> (Pattern -> String) -> ([Pattern] -> ShowS) -> Show Pattern
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Pattern] -> ShowS
$cshowList :: [Pattern] -> ShowS
show :: Pattern -> String
$cshow :: Pattern -> String
showsPrec :: Int -> Pattern -> ShowS
$cshowsPrec :: Int -> Pattern -> ShowS
C.Show, ReadPrec [Pattern]
ReadPrec Pattern
Int -> ReadS Pattern
ReadS [Pattern]
(Int -> ReadS Pattern)
-> ReadS [Pattern]
-> ReadPrec Pattern
-> ReadPrec [Pattern]
-> Read Pattern
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Pattern]
$creadListPrec :: ReadPrec [Pattern]
readPrec :: ReadPrec Pattern
$creadPrec :: ReadPrec Pattern
readList :: ReadS [Pattern]
$creadList :: ReadS [Pattern]
readsPrec :: Int -> ReadS Pattern
$creadsPrec :: Int -> ReadS Pattern
C.Read)

data Head
    = Const PolySymbol
    | At
    | IfThenElse
    | And
    | Or
    | Not
    | Implies
    | Equal
    | Distinct
    | NumAdd
    | NumSub
    | NumMul
    | NumDiv
    | IntDiv
    | IntMod
    | NumGt
    | NumGe
    | NumLt
    | NumLe
    | NumWiden
  deriving (Head -> Head -> Bool
(Head -> Head -> Bool) -> (Head -> Head -> Bool) -> Eq Head
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Head -> Head -> Bool
$c/= :: Head -> Head -> Bool
== :: Head -> Head -> Bool
$c== :: Head -> Head -> Bool
C.Eq, Eq Head
Eq Head =>
(Head -> Head -> Ordering)
-> (Head -> Head -> Bool)
-> (Head -> Head -> Bool)
-> (Head -> Head -> Bool)
-> (Head -> Head -> Bool)
-> (Head -> Head -> Head)
-> (Head -> Head -> Head)
-> Ord Head
Head -> Head -> Bool
Head -> Head -> Ordering
Head -> Head -> Head
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 :: Head -> Head -> Head
$cmin :: Head -> Head -> Head
max :: Head -> Head -> Head
$cmax :: Head -> Head -> Head
>= :: Head -> Head -> Bool
$c>= :: Head -> Head -> Bool
> :: Head -> Head -> Bool
$c> :: Head -> Head -> Bool
<= :: Head -> Head -> Bool
$c<= :: Head -> Head -> Bool
< :: Head -> Head -> Bool
$c< :: Head -> Head -> Bool
compare :: Head -> Head -> Ordering
$ccompare :: Head -> Head -> Ordering
$cp1Ord :: Eq Head
C.Ord, Int -> Head -> ShowS
[Head] -> ShowS
Head -> String
(Int -> Head -> ShowS)
-> (Head -> String) -> ([Head] -> ShowS) -> Show Head
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Head] -> ShowS
$cshowList :: [Head] -> ShowS
show :: Head -> String
$cshow :: Head -> String
showsPrec :: Int -> Head -> ShowS
$cshowsPrec :: Int -> Head -> ShowS
C.Show, ReadPrec [Head]
ReadPrec Head
Int -> ReadS Head
ReadS [Head]
(Int -> ReadS Head)
-> ReadS [Head] -> ReadPrec Head -> ReadPrec [Head] -> Read Head
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Head]
$creadListPrec :: ReadPrec [Head]
readPrec :: ReadPrec Head
$creadPrec :: ReadPrec Head
readList :: ReadS [Head]
$creadList :: ReadS [Head]
readsPrec :: Int -> ReadS Head
$creadsPrec :: Int -> ReadS Head
C.Read)

data PolySymbol = NoAs Symbol | As Symbol [Type]
  deriving (PolySymbol -> PolySymbol -> Bool
(PolySymbol -> PolySymbol -> Bool)
-> (PolySymbol -> PolySymbol -> Bool) -> Eq PolySymbol
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PolySymbol -> PolySymbol -> Bool
$c/= :: PolySymbol -> PolySymbol -> Bool
== :: PolySymbol -> PolySymbol -> Bool
$c== :: PolySymbol -> PolySymbol -> Bool
C.Eq, Eq PolySymbol
Eq PolySymbol =>
(PolySymbol -> PolySymbol -> Ordering)
-> (PolySymbol -> PolySymbol -> Bool)
-> (PolySymbol -> PolySymbol -> Bool)
-> (PolySymbol -> PolySymbol -> Bool)
-> (PolySymbol -> PolySymbol -> Bool)
-> (PolySymbol -> PolySymbol -> PolySymbol)
-> (PolySymbol -> PolySymbol -> PolySymbol)
-> Ord PolySymbol
PolySymbol -> PolySymbol -> Bool
PolySymbol -> PolySymbol -> Ordering
PolySymbol -> PolySymbol -> PolySymbol
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 :: PolySymbol -> PolySymbol -> PolySymbol
$cmin :: PolySymbol -> PolySymbol -> PolySymbol
max :: PolySymbol -> PolySymbol -> PolySymbol
$cmax :: PolySymbol -> PolySymbol -> PolySymbol
>= :: PolySymbol -> PolySymbol -> Bool
$c>= :: PolySymbol -> PolySymbol -> Bool
> :: PolySymbol -> PolySymbol -> Bool
$c> :: PolySymbol -> PolySymbol -> Bool
<= :: PolySymbol -> PolySymbol -> Bool
$c<= :: PolySymbol -> PolySymbol -> Bool
< :: PolySymbol -> PolySymbol -> Bool
$c< :: PolySymbol -> PolySymbol -> Bool
compare :: PolySymbol -> PolySymbol -> Ordering
$ccompare :: PolySymbol -> PolySymbol -> Ordering
$cp1Ord :: Eq PolySymbol
C.Ord, Int -> PolySymbol -> ShowS
[PolySymbol] -> ShowS
PolySymbol -> String
(Int -> PolySymbol -> ShowS)
-> (PolySymbol -> String)
-> ([PolySymbol] -> ShowS)
-> Show PolySymbol
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PolySymbol] -> ShowS
$cshowList :: [PolySymbol] -> ShowS
show :: PolySymbol -> String
$cshow :: PolySymbol -> String
showsPrec :: Int -> PolySymbol -> ShowS
$cshowsPrec :: Int -> PolySymbol -> ShowS
C.Show, ReadPrec [PolySymbol]
ReadPrec PolySymbol
Int -> ReadS PolySymbol
ReadS [PolySymbol]
(Int -> ReadS PolySymbol)
-> ReadS [PolySymbol]
-> ReadPrec PolySymbol
-> ReadPrec [PolySymbol]
-> Read PolySymbol
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PolySymbol]
$creadListPrec :: ReadPrec [PolySymbol]
readPrec :: ReadPrec PolySymbol
$creadPrec :: ReadPrec PolySymbol
readList :: ReadS [PolySymbol]
$creadList :: ReadS [PolySymbol]
readsPrec :: Int -> ReadS PolySymbol
$creadsPrec :: Int -> ReadS PolySymbol
C.Read)

data AttrSymbol = AttrSymbol Symbol [Attr]
  deriving (AttrSymbol -> AttrSymbol -> Bool
(AttrSymbol -> AttrSymbol -> Bool)
-> (AttrSymbol -> AttrSymbol -> Bool) -> Eq AttrSymbol
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AttrSymbol -> AttrSymbol -> Bool
$c/= :: AttrSymbol -> AttrSymbol -> Bool
== :: AttrSymbol -> AttrSymbol -> Bool
$c== :: AttrSymbol -> AttrSymbol -> Bool
C.Eq, Eq AttrSymbol
Eq AttrSymbol =>
(AttrSymbol -> AttrSymbol -> Ordering)
-> (AttrSymbol -> AttrSymbol -> Bool)
-> (AttrSymbol -> AttrSymbol -> Bool)
-> (AttrSymbol -> AttrSymbol -> Bool)
-> (AttrSymbol -> AttrSymbol -> Bool)
-> (AttrSymbol -> AttrSymbol -> AttrSymbol)
-> (AttrSymbol -> AttrSymbol -> AttrSymbol)
-> Ord AttrSymbol
AttrSymbol -> AttrSymbol -> Bool
AttrSymbol -> AttrSymbol -> Ordering
AttrSymbol -> AttrSymbol -> AttrSymbol
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 :: AttrSymbol -> AttrSymbol -> AttrSymbol
$cmin :: AttrSymbol -> AttrSymbol -> AttrSymbol
max :: AttrSymbol -> AttrSymbol -> AttrSymbol
$cmax :: AttrSymbol -> AttrSymbol -> AttrSymbol
>= :: AttrSymbol -> AttrSymbol -> Bool
$c>= :: AttrSymbol -> AttrSymbol -> Bool
> :: AttrSymbol -> AttrSymbol -> Bool
$c> :: AttrSymbol -> AttrSymbol -> Bool
<= :: AttrSymbol -> AttrSymbol -> Bool
$c<= :: AttrSymbol -> AttrSymbol -> Bool
< :: AttrSymbol -> AttrSymbol -> Bool
$c< :: AttrSymbol -> AttrSymbol -> Bool
compare :: AttrSymbol -> AttrSymbol -> Ordering
$ccompare :: AttrSymbol -> AttrSymbol -> Ordering
$cp1Ord :: Eq AttrSymbol
C.Ord, Int -> AttrSymbol -> ShowS
[AttrSymbol] -> ShowS
AttrSymbol -> String
(Int -> AttrSymbol -> ShowS)
-> (AttrSymbol -> String)
-> ([AttrSymbol] -> ShowS)
-> Show AttrSymbol
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AttrSymbol] -> ShowS
$cshowList :: [AttrSymbol] -> ShowS
show :: AttrSymbol -> String
$cshow :: AttrSymbol -> String
showsPrec :: Int -> AttrSymbol -> ShowS
$cshowsPrec :: Int -> AttrSymbol -> ShowS
C.Show, ReadPrec [AttrSymbol]
ReadPrec AttrSymbol
Int -> ReadS AttrSymbol
ReadS [AttrSymbol]
(Int -> ReadS AttrSymbol)
-> ReadS [AttrSymbol]
-> ReadPrec AttrSymbol
-> ReadPrec [AttrSymbol]
-> Read AttrSymbol
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AttrSymbol]
$creadListPrec :: ReadPrec [AttrSymbol]
readPrec :: ReadPrec AttrSymbol
$creadPrec :: ReadPrec AttrSymbol
readList :: ReadS [AttrSymbol]
$creadList :: ReadS [AttrSymbol]
readsPrec :: Int -> ReadS AttrSymbol
$creadsPrec :: Int -> ReadS AttrSymbol
C.Read)

data Attr = NoValue Keyword | Value Keyword Symbol
  deriving (Attr -> Attr -> Bool
(Attr -> Attr -> Bool) -> (Attr -> Attr -> Bool) -> Eq Attr
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Attr -> Attr -> Bool
$c/= :: Attr -> Attr -> Bool
== :: Attr -> Attr -> Bool
$c== :: Attr -> Attr -> Bool
C.Eq, Eq Attr
Eq Attr =>
(Attr -> Attr -> Ordering)
-> (Attr -> Attr -> Bool)
-> (Attr -> Attr -> Bool)
-> (Attr -> Attr -> Bool)
-> (Attr -> Attr -> Bool)
-> (Attr -> Attr -> Attr)
-> (Attr -> Attr -> Attr)
-> Ord Attr
Attr -> Attr -> Bool
Attr -> Attr -> Ordering
Attr -> Attr -> Attr
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 :: Attr -> Attr -> Attr
$cmin :: Attr -> Attr -> Attr
max :: Attr -> Attr -> Attr
$cmax :: Attr -> Attr -> Attr
>= :: Attr -> Attr -> Bool
$c>= :: Attr -> Attr -> Bool
> :: Attr -> Attr -> Bool
$c> :: Attr -> Attr -> Bool
<= :: Attr -> Attr -> Bool
$c<= :: Attr -> Attr -> Bool
< :: Attr -> Attr -> Bool
$c< :: Attr -> Attr -> Bool
compare :: Attr -> Attr -> Ordering
$ccompare :: Attr -> Attr -> Ordering
$cp1Ord :: Eq Attr
C.Ord, Int -> Attr -> ShowS
[Attr] -> ShowS
Attr -> String
(Int -> Attr -> ShowS)
-> (Attr -> String) -> ([Attr] -> ShowS) -> Show Attr
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Attr] -> ShowS
$cshowList :: [Attr] -> ShowS
show :: Attr -> String
$cshow :: Attr -> String
showsPrec :: Int -> Attr -> ShowS
$cshowsPrec :: Int -> Attr -> ShowS
C.Show, ReadPrec [Attr]
ReadPrec Attr
Int -> ReadS Attr
ReadS [Attr]
(Int -> ReadS Attr)
-> ReadS [Attr] -> ReadPrec Attr -> ReadPrec [Attr] -> Read Attr
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Attr]
$creadListPrec :: ReadPrec [Attr]
readPrec :: ReadPrec Attr
$creadPrec :: ReadPrec Attr
readList :: ReadS [Attr]
$creadList :: ReadS [Attr]
readsPrec :: Int -> ReadS Attr
$creadsPrec :: Int -> ReadS Attr
C.Read)

data Symbol = Unquoted UnquotedSymbol | Quoted QuotedSymbol
  deriving (Symbol -> Symbol -> Bool
(Symbol -> Symbol -> Bool)
-> (Symbol -> Symbol -> Bool) -> Eq Symbol
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Symbol -> Symbol -> Bool
$c/= :: Symbol -> Symbol -> Bool
== :: Symbol -> Symbol -> Bool
$c== :: Symbol -> Symbol -> Bool
C.Eq, Eq Symbol
Eq Symbol =>
(Symbol -> Symbol -> Ordering)
-> (Symbol -> Symbol -> Bool)
-> (Symbol -> Symbol -> Bool)
-> (Symbol -> Symbol -> Bool)
-> (Symbol -> Symbol -> Bool)
-> (Symbol -> Symbol -> Symbol)
-> (Symbol -> Symbol -> Symbol)
-> Ord Symbol
Symbol -> Symbol -> Bool
Symbol -> Symbol -> Ordering
Symbol -> Symbol -> Symbol
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 :: Symbol -> Symbol -> Symbol
$cmin :: Symbol -> Symbol -> Symbol
max :: Symbol -> Symbol -> Symbol
$cmax :: Symbol -> Symbol -> Symbol
>= :: Symbol -> Symbol -> Bool
$c>= :: Symbol -> Symbol -> Bool
> :: Symbol -> Symbol -> Bool
$c> :: Symbol -> Symbol -> Bool
<= :: Symbol -> Symbol -> Bool
$c<= :: Symbol -> Symbol -> Bool
< :: Symbol -> Symbol -> Bool
$c< :: Symbol -> Symbol -> Bool
compare :: Symbol -> Symbol -> Ordering
$ccompare :: Symbol -> Symbol -> Ordering
$cp1Ord :: Eq Symbol
C.Ord, Int -> Symbol -> ShowS
[Symbol] -> ShowS
Symbol -> String
(Int -> Symbol -> ShowS)
-> (Symbol -> String) -> ([Symbol] -> ShowS) -> Show Symbol
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Symbol] -> ShowS
$cshowList :: [Symbol] -> ShowS
show :: Symbol -> String
$cshow :: Symbol -> String
showsPrec :: Int -> Symbol -> ShowS
$cshowsPrec :: Int -> Symbol -> ShowS
C.Show, ReadPrec [Symbol]
ReadPrec Symbol
Int -> ReadS Symbol
ReadS [Symbol]
(Int -> ReadS Symbol)
-> ReadS [Symbol]
-> ReadPrec Symbol
-> ReadPrec [Symbol]
-> Read Symbol
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Symbol]
$creadListPrec :: ReadPrec [Symbol]
readPrec :: ReadPrec Symbol
$creadPrec :: ReadPrec Symbol
readList :: ReadS [Symbol]
$creadList :: ReadS [Symbol]
readsPrec :: Int -> ReadS Symbol
$creadsPrec :: Int -> ReadS Symbol
C.Read)

newtype UnquotedSymbol = UnquotedSymbol ((C.Int, C.Int), String)
  deriving (UnquotedSymbol -> UnquotedSymbol -> Bool
(UnquotedSymbol -> UnquotedSymbol -> Bool)
-> (UnquotedSymbol -> UnquotedSymbol -> Bool) -> Eq UnquotedSymbol
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnquotedSymbol -> UnquotedSymbol -> Bool
$c/= :: UnquotedSymbol -> UnquotedSymbol -> Bool
== :: UnquotedSymbol -> UnquotedSymbol -> Bool
$c== :: UnquotedSymbol -> UnquotedSymbol -> Bool
C.Eq, Eq UnquotedSymbol
Eq UnquotedSymbol =>
(UnquotedSymbol -> UnquotedSymbol -> Ordering)
-> (UnquotedSymbol -> UnquotedSymbol -> Bool)
-> (UnquotedSymbol -> UnquotedSymbol -> Bool)
-> (UnquotedSymbol -> UnquotedSymbol -> Bool)
-> (UnquotedSymbol -> UnquotedSymbol -> Bool)
-> (UnquotedSymbol -> UnquotedSymbol -> UnquotedSymbol)
-> (UnquotedSymbol -> UnquotedSymbol -> UnquotedSymbol)
-> Ord UnquotedSymbol
UnquotedSymbol -> UnquotedSymbol -> Bool
UnquotedSymbol -> UnquotedSymbol -> Ordering
UnquotedSymbol -> UnquotedSymbol -> UnquotedSymbol
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 :: UnquotedSymbol -> UnquotedSymbol -> UnquotedSymbol
$cmin :: UnquotedSymbol -> UnquotedSymbol -> UnquotedSymbol
max :: UnquotedSymbol -> UnquotedSymbol -> UnquotedSymbol
$cmax :: UnquotedSymbol -> UnquotedSymbol -> UnquotedSymbol
>= :: UnquotedSymbol -> UnquotedSymbol -> Bool
$c>= :: UnquotedSymbol -> UnquotedSymbol -> Bool
> :: UnquotedSymbol -> UnquotedSymbol -> Bool
$c> :: UnquotedSymbol -> UnquotedSymbol -> Bool
<= :: UnquotedSymbol -> UnquotedSymbol -> Bool
$c<= :: UnquotedSymbol -> UnquotedSymbol -> Bool
< :: UnquotedSymbol -> UnquotedSymbol -> Bool
$c< :: UnquotedSymbol -> UnquotedSymbol -> Bool
compare :: UnquotedSymbol -> UnquotedSymbol -> Ordering
$ccompare :: UnquotedSymbol -> UnquotedSymbol -> Ordering
$cp1Ord :: Eq UnquotedSymbol
C.Ord, Int -> UnquotedSymbol -> ShowS
[UnquotedSymbol] -> ShowS
UnquotedSymbol -> String
(Int -> UnquotedSymbol -> ShowS)
-> (UnquotedSymbol -> String)
-> ([UnquotedSymbol] -> ShowS)
-> Show UnquotedSymbol
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UnquotedSymbol] -> ShowS
$cshowList :: [UnquotedSymbol] -> ShowS
show :: UnquotedSymbol -> String
$cshow :: UnquotedSymbol -> String
showsPrec :: Int -> UnquotedSymbol -> ShowS
$cshowsPrec :: Int -> UnquotedSymbol -> ShowS
C.Show, ReadPrec [UnquotedSymbol]
ReadPrec UnquotedSymbol
Int -> ReadS UnquotedSymbol
ReadS [UnquotedSymbol]
(Int -> ReadS UnquotedSymbol)
-> ReadS [UnquotedSymbol]
-> ReadPrec UnquotedSymbol
-> ReadPrec [UnquotedSymbol]
-> Read UnquotedSymbol
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UnquotedSymbol]
$creadListPrec :: ReadPrec [UnquotedSymbol]
readPrec :: ReadPrec UnquotedSymbol
$creadPrec :: ReadPrec UnquotedSymbol
readList :: ReadS [UnquotedSymbol]
$creadList :: ReadS [UnquotedSymbol]
readsPrec :: Int -> ReadS UnquotedSymbol
$creadsPrec :: Int -> ReadS UnquotedSymbol
C.Read)

newtype QuotedSymbol = QuotedSymbol ((C.Int, C.Int), String)
  deriving (QuotedSymbol -> QuotedSymbol -> Bool
(QuotedSymbol -> QuotedSymbol -> Bool)
-> (QuotedSymbol -> QuotedSymbol -> Bool) -> Eq QuotedSymbol
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: QuotedSymbol -> QuotedSymbol -> Bool
$c/= :: QuotedSymbol -> QuotedSymbol -> Bool
== :: QuotedSymbol -> QuotedSymbol -> Bool
$c== :: QuotedSymbol -> QuotedSymbol -> Bool
C.Eq, Eq QuotedSymbol
Eq QuotedSymbol =>
(QuotedSymbol -> QuotedSymbol -> Ordering)
-> (QuotedSymbol -> QuotedSymbol -> Bool)
-> (QuotedSymbol -> QuotedSymbol -> Bool)
-> (QuotedSymbol -> QuotedSymbol -> Bool)
-> (QuotedSymbol -> QuotedSymbol -> Bool)
-> (QuotedSymbol -> QuotedSymbol -> QuotedSymbol)
-> (QuotedSymbol -> QuotedSymbol -> QuotedSymbol)
-> Ord QuotedSymbol
QuotedSymbol -> QuotedSymbol -> Bool
QuotedSymbol -> QuotedSymbol -> Ordering
QuotedSymbol -> QuotedSymbol -> QuotedSymbol
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 :: QuotedSymbol -> QuotedSymbol -> QuotedSymbol
$cmin :: QuotedSymbol -> QuotedSymbol -> QuotedSymbol
max :: QuotedSymbol -> QuotedSymbol -> QuotedSymbol
$cmax :: QuotedSymbol -> QuotedSymbol -> QuotedSymbol
>= :: QuotedSymbol -> QuotedSymbol -> Bool
$c>= :: QuotedSymbol -> QuotedSymbol -> Bool
> :: QuotedSymbol -> QuotedSymbol -> Bool
$c> :: QuotedSymbol -> QuotedSymbol -> Bool
<= :: QuotedSymbol -> QuotedSymbol -> Bool
$c<= :: QuotedSymbol -> QuotedSymbol -> Bool
< :: QuotedSymbol -> QuotedSymbol -> Bool
$c< :: QuotedSymbol -> QuotedSymbol -> Bool
compare :: QuotedSymbol -> QuotedSymbol -> Ordering
$ccompare :: QuotedSymbol -> QuotedSymbol -> Ordering
$cp1Ord :: Eq QuotedSymbol
C.Ord, Int -> QuotedSymbol -> ShowS
[QuotedSymbol] -> ShowS
QuotedSymbol -> String
(Int -> QuotedSymbol -> ShowS)
-> (QuotedSymbol -> String)
-> ([QuotedSymbol] -> ShowS)
-> Show QuotedSymbol
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [QuotedSymbol] -> ShowS
$cshowList :: [QuotedSymbol] -> ShowS
show :: QuotedSymbol -> String
$cshow :: QuotedSymbol -> String
showsPrec :: Int -> QuotedSymbol -> ShowS
$cshowsPrec :: Int -> QuotedSymbol -> ShowS
C.Show, ReadPrec [QuotedSymbol]
ReadPrec QuotedSymbol
Int -> ReadS QuotedSymbol
ReadS [QuotedSymbol]
(Int -> ReadS QuotedSymbol)
-> ReadS [QuotedSymbol]
-> ReadPrec QuotedSymbol
-> ReadPrec [QuotedSymbol]
-> Read QuotedSymbol
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [QuotedSymbol]
$creadListPrec :: ReadPrec [QuotedSymbol]
readPrec :: ReadPrec QuotedSymbol
$creadPrec :: ReadPrec QuotedSymbol
readList :: ReadS [QuotedSymbol]
$creadList :: ReadS [QuotedSymbol]
readsPrec :: Int -> ReadS QuotedSymbol
$creadsPrec :: Int -> ReadS QuotedSymbol
C.Read)

newtype Keyword = Keyword String
  deriving (Keyword -> Keyword -> Bool
(Keyword -> Keyword -> Bool)
-> (Keyword -> Keyword -> Bool) -> Eq Keyword
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Keyword -> Keyword -> Bool
$c/= :: Keyword -> Keyword -> Bool
== :: Keyword -> Keyword -> Bool
$c== :: Keyword -> Keyword -> Bool
C.Eq, Eq Keyword
Eq Keyword =>
(Keyword -> Keyword -> Ordering)
-> (Keyword -> Keyword -> Bool)
-> (Keyword -> Keyword -> Bool)
-> (Keyword -> Keyword -> Bool)
-> (Keyword -> Keyword -> Bool)
-> (Keyword -> Keyword -> Keyword)
-> (Keyword -> Keyword -> Keyword)
-> Ord Keyword
Keyword -> Keyword -> Bool
Keyword -> Keyword -> Ordering
Keyword -> Keyword -> Keyword
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 :: Keyword -> Keyword -> Keyword
$cmin :: Keyword -> Keyword -> Keyword
max :: Keyword -> Keyword -> Keyword
$cmax :: Keyword -> Keyword -> Keyword
>= :: Keyword -> Keyword -> Bool
$c>= :: Keyword -> Keyword -> Bool
> :: Keyword -> Keyword -> Bool
$c> :: Keyword -> Keyword -> Bool
<= :: Keyword -> Keyword -> Bool
$c<= :: Keyword -> Keyword -> Bool
< :: Keyword -> Keyword -> Bool
$c< :: Keyword -> Keyword -> Bool
compare :: Keyword -> Keyword -> Ordering
$ccompare :: Keyword -> Keyword -> Ordering
$cp1Ord :: Eq Keyword
C.Ord, Int -> Keyword -> ShowS
[Keyword] -> ShowS
Keyword -> String
(Int -> Keyword -> ShowS)
-> (Keyword -> String) -> ([Keyword] -> ShowS) -> Show Keyword
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Keyword] -> ShowS
$cshowList :: [Keyword] -> ShowS
show :: Keyword -> String
$cshow :: Keyword -> String
showsPrec :: Int -> Keyword -> ShowS
$cshowsPrec :: Int -> Keyword -> ShowS
C.Show, ReadPrec [Keyword]
ReadPrec Keyword
Int -> ReadS Keyword
ReadS [Keyword]
(Int -> ReadS Keyword)
-> ReadS [Keyword]
-> ReadPrec Keyword
-> ReadPrec [Keyword]
-> Read Keyword
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Keyword]
$creadListPrec :: ReadPrec [Keyword]
readPrec :: ReadPrec Keyword
$creadPrec :: ReadPrec Keyword
readList :: ReadS [Keyword]
$creadList :: ReadS [Keyword]
readsPrec :: Int -> ReadS Keyword
$creadsPrec :: Int -> ReadS Keyword
C.Read, String -> Keyword
(String -> Keyword) -> IsString Keyword
forall a. (String -> a) -> IsString a
fromString :: String -> Keyword
$cfromString :: String -> Keyword
Data.String.IsString)

-- | Start position (line, column) of something.

type BNFC'Position = C.Maybe (C.Int, C.Int)

pattern BNFC'NoPosition :: BNFC'Position
pattern $bBNFC'NoPosition :: BNFC'Position
$mBNFC'NoPosition :: forall r. BNFC'Position -> (Void# -> r) -> (Void# -> r) -> r
BNFC'NoPosition = C.Nothing

pattern BNFC'Position :: C.Int -> C.Int -> BNFC'Position
pattern $bBNFC'Position :: Int -> Int -> BNFC'Position
$mBNFC'Position :: forall r. BNFC'Position -> (Int -> Int -> r) -> (Void# -> r) -> r
BNFC'Position line col = C.Just (line, col)

-- | Get the start position of something.

class HasPosition a where
  hasPosition :: a -> BNFC'Position

instance HasPosition UnquotedSymbol where
  hasPosition :: UnquotedSymbol -> BNFC'Position
hasPosition (UnquotedSymbol (p :: (Int, Int)
p, _)) = (Int, Int) -> BNFC'Position
forall a. a -> Maybe a
C.Just (Int, Int)
p

instance HasPosition QuotedSymbol where
  hasPosition :: QuotedSymbol -> BNFC'Position
hasPosition (QuotedSymbol (p :: (Int, Int)
p, _)) = (Int, Int) -> BNFC'Position
forall a. a -> Maybe a
C.Just (Int, Int)
p