{-# LANGUAGE DeriveDataTypeable #-}
{- |
Module      :  ./HasCASL/As.hs
Description :  abstract syntax for HasCASL
Copyright   :  (c) Christian Maeder and Uni Bremen 2003-2005
License     :  GPLv2 or higher, see LICENSE.txt

Maintainer  :  Christian.Maeder@dfki.de
Stability   :  experimental
Portability :  portable

abstract syntax for HasCASL,
   more liberal than Concrete-Syntax.txt,
   annotations are almost as for CASL
-}

module HasCASL.As where

import Common.Id
import Common.Keywords
import Common.AS_Annotation

import Data.Data
import qualified Data.Set as Set

import Common.Doc
import Common.DocUtils

-- * abstract syntax entities with small utility functions

-- | annotated basic items
data BasicSpec = BasicSpec [Annoted BasicItem] deriving (Int -> BasicSpec -> ShowS
[BasicSpec] -> ShowS
BasicSpec -> String
(Int -> BasicSpec -> ShowS)
-> (BasicSpec -> String)
-> ([BasicSpec] -> ShowS)
-> Show BasicSpec
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BasicSpec] -> ShowS
$cshowList :: [BasicSpec] -> ShowS
show :: BasicSpec -> String
$cshow :: BasicSpec -> String
showsPrec :: Int -> BasicSpec -> ShowS
$cshowsPrec :: Int -> BasicSpec -> ShowS
Show, Typeable, Typeable BasicSpec
Constr
DataType
Typeable BasicSpec =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> BasicSpec -> c BasicSpec)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c BasicSpec)
-> (BasicSpec -> Constr)
-> (BasicSpec -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c BasicSpec))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BasicSpec))
-> ((forall b. Data b => b -> b) -> BasicSpec -> BasicSpec)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> BasicSpec -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> BasicSpec -> r)
-> (forall u. (forall d. Data d => d -> u) -> BasicSpec -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> BasicSpec -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> BasicSpec -> m BasicSpec)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BasicSpec -> m BasicSpec)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BasicSpec -> m BasicSpec)
-> Data BasicSpec
BasicSpec -> Constr
BasicSpec -> DataType
(forall b. Data b => b -> b) -> BasicSpec -> BasicSpec
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BasicSpec -> c BasicSpec
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BasicSpec
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> BasicSpec -> u
forall u. (forall d. Data d => d -> u) -> BasicSpec -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BasicSpec -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BasicSpec -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BasicSpec -> m BasicSpec
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BasicSpec -> m BasicSpec
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BasicSpec
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BasicSpec -> c BasicSpec
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BasicSpec)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BasicSpec)
$cBasicSpec :: Constr
$tBasicSpec :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> BasicSpec -> m BasicSpec
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BasicSpec -> m BasicSpec
gmapMp :: (forall d. Data d => d -> m d) -> BasicSpec -> m BasicSpec
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BasicSpec -> m BasicSpec
gmapM :: (forall d. Data d => d -> m d) -> BasicSpec -> m BasicSpec
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BasicSpec -> m BasicSpec
gmapQi :: Int -> (forall d. Data d => d -> u) -> BasicSpec -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> BasicSpec -> u
gmapQ :: (forall d. Data d => d -> u) -> BasicSpec -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> BasicSpec -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BasicSpec -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BasicSpec -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BasicSpec -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BasicSpec -> r
gmapT :: (forall b. Data b => b -> b) -> BasicSpec -> BasicSpec
$cgmapT :: (forall b. Data b => b -> b) -> BasicSpec -> BasicSpec
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BasicSpec)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BasicSpec)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c BasicSpec)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BasicSpec)
dataTypeOf :: BasicSpec -> DataType
$cdataTypeOf :: BasicSpec -> DataType
toConstr :: BasicSpec -> Constr
$ctoConstr :: BasicSpec -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BasicSpec
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BasicSpec
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BasicSpec -> c BasicSpec
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BasicSpec -> c BasicSpec
$cp1Data :: Typeable BasicSpec
Data)

-- | the possible items
data BasicItem =
    SigItems SigItems
  | ProgItems [Annoted ProgEq] Range
  -- pos "program", dots
  | ClassItems Instance [Annoted ClassItem] Range
  -- pos "class", ";"s
  | GenVarItems [GenVarDecl] Range
  -- pos "var", ";"s
  | FreeDatatype [Annoted DatatypeDecl] Range
  -- pos "free", "type", ";"s
  | GenItems [Annoted SigItems] Range
  {- pos "generated" "{", ";"s, "}"
  or "generated" "type" ";"s -}
  | AxiomItems [GenVarDecl] [Annoted Term] Range
  -- pos "forall" (if GenVarDecl not empty), dots
  | Internal [Annoted BasicItem] Range
    -- pos "internal" "{", ";"s, "}"
    deriving (Int -> BasicItem -> ShowS
[BasicItem] -> ShowS
BasicItem -> String
(Int -> BasicItem -> ShowS)
-> (BasicItem -> String)
-> ([BasicItem] -> ShowS)
-> Show BasicItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BasicItem] -> ShowS
$cshowList :: [BasicItem] -> ShowS
show :: BasicItem -> String
$cshow :: BasicItem -> String
showsPrec :: Int -> BasicItem -> ShowS
$cshowsPrec :: Int -> BasicItem -> ShowS
Show, Typeable, Typeable BasicItem
Constr
DataType
Typeable BasicItem =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> BasicItem -> c BasicItem)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c BasicItem)
-> (BasicItem -> Constr)
-> (BasicItem -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c BasicItem))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BasicItem))
-> ((forall b. Data b => b -> b) -> BasicItem -> BasicItem)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> BasicItem -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> BasicItem -> r)
-> (forall u. (forall d. Data d => d -> u) -> BasicItem -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> BasicItem -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> BasicItem -> m BasicItem)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BasicItem -> m BasicItem)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BasicItem -> m BasicItem)
-> Data BasicItem
BasicItem -> Constr
BasicItem -> DataType
(forall b. Data b => b -> b) -> BasicItem -> BasicItem
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BasicItem -> c BasicItem
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BasicItem
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> BasicItem -> u
forall u. (forall d. Data d => d -> u) -> BasicItem -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BasicItem -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BasicItem -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BasicItem -> m BasicItem
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BasicItem -> m BasicItem
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BasicItem
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BasicItem -> c BasicItem
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BasicItem)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BasicItem)
$cInternal :: Constr
$cAxiomItems :: Constr
$cGenItems :: Constr
$cFreeDatatype :: Constr
$cGenVarItems :: Constr
$cClassItems :: Constr
$cProgItems :: Constr
$cSigItems :: Constr
$tBasicItem :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> BasicItem -> m BasicItem
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BasicItem -> m BasicItem
gmapMp :: (forall d. Data d => d -> m d) -> BasicItem -> m BasicItem
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BasicItem -> m BasicItem
gmapM :: (forall d. Data d => d -> m d) -> BasicItem -> m BasicItem
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BasicItem -> m BasicItem
gmapQi :: Int -> (forall d. Data d => d -> u) -> BasicItem -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> BasicItem -> u
gmapQ :: (forall d. Data d => d -> u) -> BasicItem -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> BasicItem -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BasicItem -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BasicItem -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BasicItem -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BasicItem -> r
gmapT :: (forall b. Data b => b -> b) -> BasicItem -> BasicItem
$cgmapT :: (forall b. Data b => b -> b) -> BasicItem -> BasicItem
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BasicItem)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BasicItem)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c BasicItem)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BasicItem)
dataTypeOf :: BasicItem -> DataType
$cdataTypeOf :: BasicItem -> DataType
toConstr :: BasicItem -> Constr
$ctoConstr :: BasicItem -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BasicItem
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BasicItem
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BasicItem -> c BasicItem
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BasicItem -> c BasicItem
$cp1Data :: Typeable BasicItem
Data)

-- | signature items are types or functions
data SigItems =
    TypeItems Instance [Annoted TypeItem] Range {- including sort
    pos "type", ";"s -}
  | OpItems OpBrand [Annoted OpItem] Range
    -- pos "op", ";"s
    deriving (Int -> SigItems -> ShowS
[SigItems] -> ShowS
SigItems -> String
(Int -> SigItems -> ShowS)
-> (SigItems -> String) -> ([SigItems] -> ShowS) -> Show SigItems
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SigItems] -> ShowS
$cshowList :: [SigItems] -> ShowS
show :: SigItems -> String
$cshow :: SigItems -> String
showsPrec :: Int -> SigItems -> ShowS
$cshowsPrec :: Int -> SigItems -> ShowS
Show, Typeable, Typeable SigItems
Constr
DataType
Typeable SigItems =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> SigItems -> c SigItems)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c SigItems)
-> (SigItems -> Constr)
-> (SigItems -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c SigItems))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SigItems))
-> ((forall b. Data b => b -> b) -> SigItems -> SigItems)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SigItems -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SigItems -> r)
-> (forall u. (forall d. Data d => d -> u) -> SigItems -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> SigItems -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> SigItems -> m SigItems)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SigItems -> m SigItems)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SigItems -> m SigItems)
-> Data SigItems
SigItems -> Constr
SigItems -> DataType
(forall b. Data b => b -> b) -> SigItems -> SigItems
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SigItems -> c SigItems
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigItems
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> SigItems -> u
forall u. (forall d. Data d => d -> u) -> SigItems -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigItems -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SigItems -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SigItems -> m SigItems
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SigItems -> m SigItems
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigItems
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SigItems -> c SigItems
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SigItems)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SigItems)
$cOpItems :: Constr
$cTypeItems :: Constr
$tSigItems :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> SigItems -> m SigItems
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SigItems -> m SigItems
gmapMp :: (forall d. Data d => d -> m d) -> SigItems -> m SigItems
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SigItems -> m SigItems
gmapM :: (forall d. Data d => d -> m d) -> SigItems -> m SigItems
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SigItems -> m SigItems
gmapQi :: Int -> (forall d. Data d => d -> u) -> SigItems -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SigItems -> u
gmapQ :: (forall d. Data d => d -> u) -> SigItems -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SigItems -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SigItems -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SigItems -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigItems -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SigItems -> r
gmapT :: (forall b. Data b => b -> b) -> SigItems -> SigItems
$cgmapT :: (forall b. Data b => b -> b) -> SigItems -> SigItems
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SigItems)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SigItems)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c SigItems)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SigItems)
dataTypeOf :: SigItems -> DataType
$cdataTypeOf :: SigItems -> DataType
toConstr :: SigItems -> Constr
$ctoConstr :: SigItems -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigItems
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SigItems
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SigItems -> c SigItems
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SigItems -> c SigItems
$cp1Data :: Typeable SigItems
Data)

-- | indicator for predicate, operation or function
data OpBrand = Pred | Op | Fun deriving (OpBrand -> OpBrand -> Bool
(OpBrand -> OpBrand -> Bool)
-> (OpBrand -> OpBrand -> Bool) -> Eq OpBrand
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OpBrand -> OpBrand -> Bool
$c/= :: OpBrand -> OpBrand -> Bool
== :: OpBrand -> OpBrand -> Bool
$c== :: OpBrand -> OpBrand -> Bool
Eq, Eq OpBrand
Eq OpBrand =>
(OpBrand -> OpBrand -> Ordering)
-> (OpBrand -> OpBrand -> Bool)
-> (OpBrand -> OpBrand -> Bool)
-> (OpBrand -> OpBrand -> Bool)
-> (OpBrand -> OpBrand -> Bool)
-> (OpBrand -> OpBrand -> OpBrand)
-> (OpBrand -> OpBrand -> OpBrand)
-> Ord OpBrand
OpBrand -> OpBrand -> Bool
OpBrand -> OpBrand -> Ordering
OpBrand -> OpBrand -> OpBrand
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 :: OpBrand -> OpBrand -> OpBrand
$cmin :: OpBrand -> OpBrand -> OpBrand
max :: OpBrand -> OpBrand -> OpBrand
$cmax :: OpBrand -> OpBrand -> OpBrand
>= :: OpBrand -> OpBrand -> Bool
$c>= :: OpBrand -> OpBrand -> Bool
> :: OpBrand -> OpBrand -> Bool
$c> :: OpBrand -> OpBrand -> Bool
<= :: OpBrand -> OpBrand -> Bool
$c<= :: OpBrand -> OpBrand -> Bool
< :: OpBrand -> OpBrand -> Bool
$c< :: OpBrand -> OpBrand -> Bool
compare :: OpBrand -> OpBrand -> Ordering
$ccompare :: OpBrand -> OpBrand -> Ordering
$cp1Ord :: Eq OpBrand
Ord, Typeable, Typeable OpBrand
Constr
DataType
Typeable OpBrand =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> OpBrand -> c OpBrand)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c OpBrand)
-> (OpBrand -> Constr)
-> (OpBrand -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c OpBrand))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OpBrand))
-> ((forall b. Data b => b -> b) -> OpBrand -> OpBrand)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> OpBrand -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> OpBrand -> r)
-> (forall u. (forall d. Data d => d -> u) -> OpBrand -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> OpBrand -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> OpBrand -> m OpBrand)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> OpBrand -> m OpBrand)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> OpBrand -> m OpBrand)
-> Data OpBrand
OpBrand -> Constr
OpBrand -> DataType
(forall b. Data b => b -> b) -> OpBrand -> OpBrand
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OpBrand -> c OpBrand
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OpBrand
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> OpBrand -> u
forall u. (forall d. Data d => d -> u) -> OpBrand -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OpBrand -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OpBrand -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> OpBrand -> m OpBrand
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OpBrand -> m OpBrand
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OpBrand
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OpBrand -> c OpBrand
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OpBrand)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OpBrand)
$cFun :: Constr
$cOp :: Constr
$cPred :: Constr
$tOpBrand :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> OpBrand -> m OpBrand
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OpBrand -> m OpBrand
gmapMp :: (forall d. Data d => d -> m d) -> OpBrand -> m OpBrand
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OpBrand -> m OpBrand
gmapM :: (forall d. Data d => d -> m d) -> OpBrand -> m OpBrand
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> OpBrand -> m OpBrand
gmapQi :: Int -> (forall d. Data d => d -> u) -> OpBrand -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> OpBrand -> u
gmapQ :: (forall d. Data d => d -> u) -> OpBrand -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> OpBrand -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OpBrand -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> OpBrand -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OpBrand -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> OpBrand -> r
gmapT :: (forall b. Data b => b -> b) -> OpBrand -> OpBrand
$cgmapT :: (forall b. Data b => b -> b) -> OpBrand -> OpBrand
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OpBrand)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OpBrand)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c OpBrand)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OpBrand)
dataTypeOf :: OpBrand -> DataType
$cdataTypeOf :: OpBrand -> DataType
toConstr :: OpBrand -> Constr
$ctoConstr :: OpBrand -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OpBrand
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OpBrand
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OpBrand -> c OpBrand
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OpBrand -> c OpBrand
$cp1Data :: Typeable OpBrand
Data)

-- | test if the function was declared as predicate
isPred :: OpBrand -> Bool
isPred :: OpBrand -> Bool
isPred b :: OpBrand
b = case OpBrand
b of
    Pred -> Bool
True
    _ -> Bool
False

instance Show OpBrand where
    show :: OpBrand -> String
show b :: OpBrand
b = case OpBrand
b of
        Pred -> String
predS
        Op -> String
opS
        Fun -> String
functS

-- | indicator in 'ClassItems' and 'TypeItems'
data Instance = Instance | Plain deriving (Instance -> Instance -> Bool
(Instance -> Instance -> Bool)
-> (Instance -> Instance -> Bool) -> Eq Instance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Instance -> Instance -> Bool
$c/= :: Instance -> Instance -> Bool
== :: Instance -> Instance -> Bool
$c== :: Instance -> Instance -> Bool
Eq, Eq Instance
Eq Instance =>
(Instance -> Instance -> Ordering)
-> (Instance -> Instance -> Bool)
-> (Instance -> Instance -> Bool)
-> (Instance -> Instance -> Bool)
-> (Instance -> Instance -> Bool)
-> (Instance -> Instance -> Instance)
-> (Instance -> Instance -> Instance)
-> Ord Instance
Instance -> Instance -> Bool
Instance -> Instance -> Ordering
Instance -> Instance -> Instance
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 :: Instance -> Instance -> Instance
$cmin :: Instance -> Instance -> Instance
max :: Instance -> Instance -> Instance
$cmax :: Instance -> Instance -> Instance
>= :: Instance -> Instance -> Bool
$c>= :: Instance -> Instance -> Bool
> :: Instance -> Instance -> Bool
$c> :: Instance -> Instance -> Bool
<= :: Instance -> Instance -> Bool
$c<= :: Instance -> Instance -> Bool
< :: Instance -> Instance -> Bool
$c< :: Instance -> Instance -> Bool
compare :: Instance -> Instance -> Ordering
$ccompare :: Instance -> Instance -> Ordering
$cp1Ord :: Eq Instance
Ord, Typeable, Typeable Instance
Constr
DataType
Typeable Instance =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Instance -> c Instance)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Instance)
-> (Instance -> Constr)
-> (Instance -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Instance))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Instance))
-> ((forall b. Data b => b -> b) -> Instance -> Instance)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Instance -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Instance -> r)
-> (forall u. (forall d. Data d => d -> u) -> Instance -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Instance -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Instance -> m Instance)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Instance -> m Instance)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Instance -> m Instance)
-> Data Instance
Instance -> Constr
Instance -> DataType
(forall b. Data b => b -> b) -> Instance -> Instance
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Instance -> c Instance
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Instance
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Instance -> u
forall u. (forall d. Data d => d -> u) -> Instance -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Instance -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Instance -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Instance -> m Instance
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Instance -> m Instance
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Instance
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Instance -> c Instance
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Instance)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Instance)
$cPlain :: Constr
$cInstance :: Constr
$tInstance :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Instance -> m Instance
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Instance -> m Instance
gmapMp :: (forall d. Data d => d -> m d) -> Instance -> m Instance
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Instance -> m Instance
gmapM :: (forall d. Data d => d -> m d) -> Instance -> m Instance
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Instance -> m Instance
gmapQi :: Int -> (forall d. Data d => d -> u) -> Instance -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Instance -> u
gmapQ :: (forall d. Data d => d -> u) -> Instance -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Instance -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Instance -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Instance -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Instance -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Instance -> r
gmapT :: (forall b. Data b => b -> b) -> Instance -> Instance
$cgmapT :: (forall b. Data b => b -> b) -> Instance -> Instance
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Instance)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Instance)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Instance)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Instance)
dataTypeOf :: Instance -> DataType
$cdataTypeOf :: Instance -> DataType
toConstr :: Instance -> Constr
$ctoConstr :: Instance -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Instance
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Instance
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Instance -> c Instance
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Instance -> c Instance
$cp1Data :: Typeable Instance
Data)

instance Show Instance where
    show :: Instance -> String
show i :: Instance
i = case Instance
i of
        Instance -> String
instanceS
        Plain -> ""

-- | a class item
data ClassItem = ClassItem ClassDecl [Annoted BasicItem] Range
  deriving (Int -> ClassItem -> ShowS
[ClassItem] -> ShowS
ClassItem -> String
(Int -> ClassItem -> ShowS)
-> (ClassItem -> String)
-> ([ClassItem] -> ShowS)
-> Show ClassItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClassItem] -> ShowS
$cshowList :: [ClassItem] -> ShowS
show :: ClassItem -> String
$cshow :: ClassItem -> String
showsPrec :: Int -> ClassItem -> ShowS
$cshowsPrec :: Int -> ClassItem -> ShowS
Show, Typeable, Typeable ClassItem
Constr
DataType
Typeable ClassItem =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> ClassItem -> c ClassItem)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ClassItem)
-> (ClassItem -> Constr)
-> (ClassItem -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ClassItem))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ClassItem))
-> ((forall b. Data b => b -> b) -> ClassItem -> ClassItem)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ClassItem -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ClassItem -> r)
-> (forall u. (forall d. Data d => d -> u) -> ClassItem -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> ClassItem -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> ClassItem -> m ClassItem)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ClassItem -> m ClassItem)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ClassItem -> m ClassItem)
-> Data ClassItem
ClassItem -> Constr
ClassItem -> DataType
(forall b. Data b => b -> b) -> ClassItem -> ClassItem
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ClassItem -> c ClassItem
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ClassItem
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ClassItem -> u
forall u. (forall d. Data d => d -> u) -> ClassItem -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ClassItem -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ClassItem -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ClassItem -> m ClassItem
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ClassItem -> m ClassItem
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ClassItem
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ClassItem -> c ClassItem
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ClassItem)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ClassItem)
$cClassItem :: Constr
$tClassItem :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> ClassItem -> m ClassItem
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ClassItem -> m ClassItem
gmapMp :: (forall d. Data d => d -> m d) -> ClassItem -> m ClassItem
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ClassItem -> m ClassItem
gmapM :: (forall d. Data d => d -> m d) -> ClassItem -> m ClassItem
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ClassItem -> m ClassItem
gmapQi :: Int -> (forall d. Data d => d -> u) -> ClassItem -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ClassItem -> u
gmapQ :: (forall d. Data d => d -> u) -> ClassItem -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ClassItem -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ClassItem -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ClassItem -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ClassItem -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ClassItem -> r
gmapT :: (forall b. Data b => b -> b) -> ClassItem -> ClassItem
$cgmapT :: (forall b. Data b => b -> b) -> ClassItem -> ClassItem
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ClassItem)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ClassItem)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c ClassItem)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ClassItem)
dataTypeOf :: ClassItem -> DataType
$cdataTypeOf :: ClassItem -> DataType
toConstr :: ClassItem -> Constr
$ctoConstr :: ClassItem -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ClassItem
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ClassItem
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ClassItem -> c ClassItem
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ClassItem -> c ClassItem
$cp1Data :: Typeable ClassItem
Data)
                 -- pos "{", ";"s "}"

-- | declaring class identifiers
data ClassDecl = ClassDecl [Id] Kind Range deriving (Int -> ClassDecl -> ShowS
[ClassDecl] -> ShowS
ClassDecl -> String
(Int -> ClassDecl -> ShowS)
-> (ClassDecl -> String)
-> ([ClassDecl] -> ShowS)
-> Show ClassDecl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClassDecl] -> ShowS
$cshowList :: [ClassDecl] -> ShowS
show :: ClassDecl -> String
$cshow :: ClassDecl -> String
showsPrec :: Int -> ClassDecl -> ShowS
$cshowsPrec :: Int -> ClassDecl -> ShowS
Show, Typeable, Typeable ClassDecl
Constr
DataType
Typeable ClassDecl =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> ClassDecl -> c ClassDecl)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ClassDecl)
-> (ClassDecl -> Constr)
-> (ClassDecl -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ClassDecl))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ClassDecl))
-> ((forall b. Data b => b -> b) -> ClassDecl -> ClassDecl)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ClassDecl -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ClassDecl -> r)
-> (forall u. (forall d. Data d => d -> u) -> ClassDecl -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> ClassDecl -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> ClassDecl -> m ClassDecl)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ClassDecl -> m ClassDecl)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ClassDecl -> m ClassDecl)
-> Data ClassDecl
ClassDecl -> Constr
ClassDecl -> DataType
(forall b. Data b => b -> b) -> ClassDecl -> ClassDecl
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ClassDecl -> c ClassDecl
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ClassDecl
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ClassDecl -> u
forall u. (forall d. Data d => d -> u) -> ClassDecl -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ClassDecl -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ClassDecl -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ClassDecl -> m ClassDecl
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ClassDecl -> m ClassDecl
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ClassDecl
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ClassDecl -> c ClassDecl
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ClassDecl)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ClassDecl)
$cClassDecl :: Constr
$tClassDecl :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> ClassDecl -> m ClassDecl
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ClassDecl -> m ClassDecl
gmapMp :: (forall d. Data d => d -> m d) -> ClassDecl -> m ClassDecl
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ClassDecl -> m ClassDecl
gmapM :: (forall d. Data d => d -> m d) -> ClassDecl -> m ClassDecl
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ClassDecl -> m ClassDecl
gmapQi :: Int -> (forall d. Data d => d -> u) -> ClassDecl -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ClassDecl -> u
gmapQ :: (forall d. Data d => d -> u) -> ClassDecl -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ClassDecl -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ClassDecl -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ClassDecl -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ClassDecl -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ClassDecl -> r
gmapT :: (forall b. Data b => b -> b) -> ClassDecl -> ClassDecl
$cgmapT :: (forall b. Data b => b -> b) -> ClassDecl -> ClassDecl
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ClassDecl)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ClassDecl)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c ClassDecl)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ClassDecl)
dataTypeOf :: ClassDecl -> DataType
$cdataTypeOf :: ClassDecl -> DataType
toConstr :: ClassDecl -> Constr
$ctoConstr :: ClassDecl -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ClassDecl
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ClassDecl
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ClassDecl -> c ClassDecl
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ClassDecl -> c ClassDecl
$cp1Data :: Typeable ClassDecl
Data)
               -- pos ","s

-- | co- or contra- variance indicator
data Variance = InVar | CoVar | ContraVar | NonVar
  deriving (Variance -> Variance -> Bool
(Variance -> Variance -> Bool)
-> (Variance -> Variance -> Bool) -> Eq Variance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Variance -> Variance -> Bool
$c/= :: Variance -> Variance -> Bool
== :: Variance -> Variance -> Bool
$c== :: Variance -> Variance -> Bool
Eq, Eq Variance
Eq Variance =>
(Variance -> Variance -> Ordering)
-> (Variance -> Variance -> Bool)
-> (Variance -> Variance -> Bool)
-> (Variance -> Variance -> Bool)
-> (Variance -> Variance -> Bool)
-> (Variance -> Variance -> Variance)
-> (Variance -> Variance -> Variance)
-> Ord Variance
Variance -> Variance -> Bool
Variance -> Variance -> Ordering
Variance -> Variance -> Variance
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 :: Variance -> Variance -> Variance
$cmin :: Variance -> Variance -> Variance
max :: Variance -> Variance -> Variance
$cmax :: Variance -> Variance -> Variance
>= :: Variance -> Variance -> Bool
$c>= :: Variance -> Variance -> Bool
> :: Variance -> Variance -> Bool
$c> :: Variance -> Variance -> Bool
<= :: Variance -> Variance -> Bool
$c<= :: Variance -> Variance -> Bool
< :: Variance -> Variance -> Bool
$c< :: Variance -> Variance -> Bool
compare :: Variance -> Variance -> Ordering
$ccompare :: Variance -> Variance -> Ordering
$cp1Ord :: Eq Variance
Ord, Typeable, Typeable Variance
Constr
DataType
Typeable Variance =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Variance -> c Variance)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Variance)
-> (Variance -> Constr)
-> (Variance -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Variance))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Variance))
-> ((forall b. Data b => b -> b) -> Variance -> Variance)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Variance -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Variance -> r)
-> (forall u. (forall d. Data d => d -> u) -> Variance -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Variance -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Variance -> m Variance)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Variance -> m Variance)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Variance -> m Variance)
-> Data Variance
Variance -> Constr
Variance -> DataType
(forall b. Data b => b -> b) -> Variance -> Variance
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Variance -> c Variance
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Variance
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Variance -> u
forall u. (forall d. Data d => d -> u) -> Variance -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Variance -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Variance -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Variance -> m Variance
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Variance -> m Variance
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Variance
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Variance -> c Variance
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Variance)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Variance)
$cNonVar :: Constr
$cContraVar :: Constr
$cCoVar :: Constr
$cInVar :: Constr
$tVariance :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Variance -> m Variance
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Variance -> m Variance
gmapMp :: (forall d. Data d => d -> m d) -> Variance -> m Variance
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Variance -> m Variance
gmapM :: (forall d. Data d => d -> m d) -> Variance -> m Variance
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Variance -> m Variance
gmapQi :: Int -> (forall d. Data d => d -> u) -> Variance -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Variance -> u
gmapQ :: (forall d. Data d => d -> u) -> Variance -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Variance -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Variance -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Variance -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Variance -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Variance -> r
gmapT :: (forall b. Data b => b -> b) -> Variance -> Variance
$cgmapT :: (forall b. Data b => b -> b) -> Variance -> Variance
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Variance)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Variance)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Variance)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Variance)
dataTypeOf :: Variance -> DataType
$cdataTypeOf :: Variance -> DataType
toConstr :: Variance -> Constr
$ctoConstr :: Variance -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Variance
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Variance
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Variance -> c Variance
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Variance -> c Variance
$cp1Data :: Typeable Variance
Data)

instance Show Variance where
    show :: Variance -> String
show v :: Variance
v = case Variance
v of
        InVar -> String
plusS String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
minusS
        CoVar -> String
plusS
        ContraVar -> String
minusS
        NonVar -> ""

-- | (higher) kinds
data AnyKind a =
    ClassKind a
  | FunKind Variance (AnyKind a) (AnyKind a) Range
    -- pos "+" or "-"
    deriving (Int -> AnyKind a -> ShowS
[AnyKind a] -> ShowS
AnyKind a -> String
(Int -> AnyKind a -> ShowS)
-> (AnyKind a -> String)
-> ([AnyKind a] -> ShowS)
-> Show (AnyKind a)
forall a. Show a => Int -> AnyKind a -> ShowS
forall a. Show a => [AnyKind a] -> ShowS
forall a. Show a => AnyKind a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AnyKind a] -> ShowS
$cshowList :: forall a. Show a => [AnyKind a] -> ShowS
show :: AnyKind a -> String
$cshow :: forall a. Show a => AnyKind a -> String
showsPrec :: Int -> AnyKind a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> AnyKind a -> ShowS
Show, Typeable, Typeable (AnyKind a)
Constr
DataType
Typeable (AnyKind a) =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> AnyKind a -> c (AnyKind a))
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (AnyKind a))
-> (AnyKind a -> Constr)
-> (AnyKind a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (AnyKind a)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (AnyKind a)))
-> ((forall b. Data b => b -> b) -> AnyKind a -> AnyKind a)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> AnyKind a -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> AnyKind a -> r)
-> (forall u. (forall d. Data d => d -> u) -> AnyKind a -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> AnyKind a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> AnyKind a -> m (AnyKind a))
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> AnyKind a -> m (AnyKind a))
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> AnyKind a -> m (AnyKind a))
-> Data (AnyKind a)
AnyKind a -> Constr
AnyKind a -> DataType
(forall d. Data d => c (t d)) -> Maybe (c (AnyKind a))
(forall b. Data b => b -> b) -> AnyKind a -> AnyKind a
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> AnyKind a -> c (AnyKind a)
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (AnyKind a)
forall a. Data a => Typeable (AnyKind a)
forall a. Data a => AnyKind a -> Constr
forall a. Data a => AnyKind a -> DataType
forall a.
Data a =>
(forall b. Data b => b -> b) -> AnyKind a -> AnyKind a
forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> AnyKind a -> u
forall a u.
Data a =>
(forall d. Data d => d -> u) -> AnyKind a -> [u]
forall a r r'.
Data a =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> AnyKind a -> r
forall a r r'.
Data a =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> AnyKind a -> r
forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d) -> AnyKind a -> m (AnyKind a)
forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> AnyKind a -> m (AnyKind a)
forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (AnyKind a)
forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> AnyKind a -> c (AnyKind a)
forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (AnyKind a))
forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (AnyKind a))
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> AnyKind a -> u
forall u. (forall d. Data d => d -> u) -> AnyKind a -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> AnyKind a -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> AnyKind a -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> AnyKind a -> m (AnyKind a)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> AnyKind a -> m (AnyKind a)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (AnyKind a)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> AnyKind a -> c (AnyKind a)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (AnyKind a))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (AnyKind a))
$cFunKind :: Constr
$cClassKind :: Constr
$tAnyKind :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> AnyKind a -> m (AnyKind a)
$cgmapMo :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> AnyKind a -> m (AnyKind a)
gmapMp :: (forall d. Data d => d -> m d) -> AnyKind a -> m (AnyKind a)
$cgmapMp :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> AnyKind a -> m (AnyKind a)
gmapM :: (forall d. Data d => d -> m d) -> AnyKind a -> m (AnyKind a)
$cgmapM :: forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d) -> AnyKind a -> m (AnyKind a)
gmapQi :: Int -> (forall d. Data d => d -> u) -> AnyKind a -> u
$cgmapQi :: forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> AnyKind a -> u
gmapQ :: (forall d. Data d => d -> u) -> AnyKind a -> [u]
$cgmapQ :: forall a u.
Data a =>
(forall d. Data d => d -> u) -> AnyKind a -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> AnyKind a -> r
$cgmapQr :: forall a r r'.
Data a =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> AnyKind a -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> AnyKind a -> r
$cgmapQl :: forall a r r'.
Data a =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> AnyKind a -> r
gmapT :: (forall b. Data b => b -> b) -> AnyKind a -> AnyKind a
$cgmapT :: forall a.
Data a =>
(forall b. Data b => b -> b) -> AnyKind a -> AnyKind a
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (AnyKind a))
$cdataCast2 :: forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (AnyKind a))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (AnyKind a))
$cdataCast1 :: forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (AnyKind a))
dataTypeOf :: AnyKind a -> DataType
$cdataTypeOf :: forall a. Data a => AnyKind a -> DataType
toConstr :: AnyKind a -> Constr
$ctoConstr :: forall a. Data a => AnyKind a -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (AnyKind a)
$cgunfold :: forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (AnyKind a)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> AnyKind a -> c (AnyKind a)
$cgfoldl :: forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> AnyKind a -> c (AnyKind a)
$cp1Data :: forall a. Data a => Typeable (AnyKind a)
Data)

instance Ord a => Eq (AnyKind a) where
   k1 :: AnyKind a
k1 == :: AnyKind a -> AnyKind a -> Bool
== k2 :: AnyKind a
k2 = AnyKind a -> AnyKind a -> Ordering
forall a. Ord a => a -> a -> Ordering
compare AnyKind a
k1 AnyKind a
k2 Ordering -> Ordering -> Bool
forall a. Eq a => a -> a -> Bool
== Ordering
EQ

instance Ord a => Ord (AnyKind a) where
   compare :: AnyKind a -> AnyKind a -> Ordering
compare k1 :: AnyKind a
k1 k2 :: AnyKind a
k2 = case (AnyKind a
k1, AnyKind a
k2) of
       (ClassKind c1 :: a
c1, ClassKind c2 :: a
c2) -> a -> a -> Ordering
forall a. Ord a => a -> a -> Ordering
compare a
c1 a
c2
       (ClassKind _, _) -> Ordering
LT
       (FunKind v1 :: Variance
v1 k3 :: AnyKind a
k3 k4 :: AnyKind a
k4 _, FunKind v2 :: Variance
v2 k5 :: AnyKind a
k5 k6 :: AnyKind a
k6 _) ->
           (Variance, AnyKind a, AnyKind a)
-> (Variance, AnyKind a, AnyKind a) -> Ordering
forall a. Ord a => a -> a -> Ordering
compare (Variance
v1, AnyKind a
k3, AnyKind a
k4) (Variance
v2, AnyKind a
k5, AnyKind a
k6)
       _ -> Ordering
GT

type Kind = AnyKind Id
type RawKind = AnyKind ()

-- | the possible type items
data TypeItem =
    TypeDecl [TypePattern] Kind Range
    -- pos ","s
  | SubtypeDecl [TypePattern] Type Range
  -- pos ","s, "<"
  | IsoDecl [TypePattern] Range
  -- pos "="s
  | SubtypeDefn TypePattern Vars Type (Annoted Term) Range
  -- pos "=", "{", ":", dot, "}"
  | AliasType TypePattern (Maybe Kind) TypeScheme Range
  -- pos ":="
  | Datatype DatatypeDecl
    deriving (Int -> TypeItem -> ShowS
[TypeItem] -> ShowS
TypeItem -> String
(Int -> TypeItem -> ShowS)
-> (TypeItem -> String) -> ([TypeItem] -> ShowS) -> Show TypeItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TypeItem] -> ShowS
$cshowList :: [TypeItem] -> ShowS
show :: TypeItem -> String
$cshow :: TypeItem -> String
showsPrec :: Int -> TypeItem -> ShowS
$cshowsPrec :: Int -> TypeItem -> ShowS
Show, Typeable, Typeable TypeItem
Constr
DataType
Typeable TypeItem =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> TypeItem -> c TypeItem)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c TypeItem)
-> (TypeItem -> Constr)
-> (TypeItem -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c TypeItem))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeItem))
-> ((forall b. Data b => b -> b) -> TypeItem -> TypeItem)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> TypeItem -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> TypeItem -> r)
-> (forall u. (forall d. Data d => d -> u) -> TypeItem -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> TypeItem -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> TypeItem -> m TypeItem)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> TypeItem -> m TypeItem)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> TypeItem -> m TypeItem)
-> Data TypeItem
TypeItem -> Constr
TypeItem -> DataType
(forall b. Data b => b -> b) -> TypeItem -> TypeItem
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TypeItem -> c TypeItem
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TypeItem
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> TypeItem -> u
forall u. (forall d. Data d => d -> u) -> TypeItem -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TypeItem -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TypeItem -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TypeItem -> m TypeItem
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TypeItem -> m TypeItem
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TypeItem
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TypeItem -> c TypeItem
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TypeItem)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeItem)
$cDatatype :: Constr
$cAliasType :: Constr
$cSubtypeDefn :: Constr
$cIsoDecl :: Constr
$cSubtypeDecl :: Constr
$cTypeDecl :: Constr
$tTypeItem :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> TypeItem -> m TypeItem
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TypeItem -> m TypeItem
gmapMp :: (forall d. Data d => d -> m d) -> TypeItem -> m TypeItem
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TypeItem -> m TypeItem
gmapM :: (forall d. Data d => d -> m d) -> TypeItem -> m TypeItem
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TypeItem -> m TypeItem
gmapQi :: Int -> (forall d. Data d => d -> u) -> TypeItem -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TypeItem -> u
gmapQ :: (forall d. Data d => d -> u) -> TypeItem -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> TypeItem -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TypeItem -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TypeItem -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TypeItem -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TypeItem -> r
gmapT :: (forall b. Data b => b -> b) -> TypeItem -> TypeItem
$cgmapT :: (forall b. Data b => b -> b) -> TypeItem -> TypeItem
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeItem)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeItem)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c TypeItem)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TypeItem)
dataTypeOf :: TypeItem -> DataType
$cdataTypeOf :: TypeItem -> DataType
toConstr :: TypeItem -> Constr
$ctoConstr :: TypeItem -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TypeItem
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TypeItem
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TypeItem -> c TypeItem
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TypeItem -> c TypeItem
$cp1Data :: Typeable TypeItem
Data)

-- | a tuple pattern for 'SubtypeDefn'
data Vars = Var Id | VarTuple [Vars] Range
  deriving (Int -> Vars -> ShowS
[Vars] -> ShowS
Vars -> String
(Int -> Vars -> ShowS)
-> (Vars -> String) -> ([Vars] -> ShowS) -> Show Vars
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Vars] -> ShowS
$cshowList :: [Vars] -> ShowS
show :: Vars -> String
$cshow :: Vars -> String
showsPrec :: Int -> Vars -> ShowS
$cshowsPrec :: Int -> Vars -> ShowS
Show, Vars -> Vars -> Bool
(Vars -> Vars -> Bool) -> (Vars -> Vars -> Bool) -> Eq Vars
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Vars -> Vars -> Bool
$c/= :: Vars -> Vars -> Bool
== :: Vars -> Vars -> Bool
$c== :: Vars -> Vars -> Bool
Eq, Eq Vars
Eq Vars =>
(Vars -> Vars -> Ordering)
-> (Vars -> Vars -> Bool)
-> (Vars -> Vars -> Bool)
-> (Vars -> Vars -> Bool)
-> (Vars -> Vars -> Bool)
-> (Vars -> Vars -> Vars)
-> (Vars -> Vars -> Vars)
-> Ord Vars
Vars -> Vars -> Bool
Vars -> Vars -> Ordering
Vars -> Vars -> Vars
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 :: Vars -> Vars -> Vars
$cmin :: Vars -> Vars -> Vars
max :: Vars -> Vars -> Vars
$cmax :: Vars -> Vars -> Vars
>= :: Vars -> Vars -> Bool
$c>= :: Vars -> Vars -> Bool
> :: Vars -> Vars -> Bool
$c> :: Vars -> Vars -> Bool
<= :: Vars -> Vars -> Bool
$c<= :: Vars -> Vars -> Bool
< :: Vars -> Vars -> Bool
$c< :: Vars -> Vars -> Bool
compare :: Vars -> Vars -> Ordering
$ccompare :: Vars -> Vars -> Ordering
$cp1Ord :: Eq Vars
Ord, Typeable, Typeable Vars
Constr
DataType
Typeable Vars =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Vars -> c Vars)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Vars)
-> (Vars -> Constr)
-> (Vars -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Vars))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Vars))
-> ((forall b. Data b => b -> b) -> Vars -> Vars)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Vars -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Vars -> r)
-> (forall u. (forall d. Data d => d -> u) -> Vars -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Vars -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Vars -> m Vars)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Vars -> m Vars)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Vars -> m Vars)
-> Data Vars
Vars -> Constr
Vars -> DataType
(forall b. Data b => b -> b) -> Vars -> Vars
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Vars -> c Vars
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Vars
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Vars -> u
forall u. (forall d. Data d => d -> u) -> Vars -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Vars -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Vars -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Vars -> m Vars
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Vars -> m Vars
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Vars
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Vars -> c Vars
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Vars)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Vars)
$cVarTuple :: Constr
$cVar :: Constr
$tVars :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Vars -> m Vars
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Vars -> m Vars
gmapMp :: (forall d. Data d => d -> m d) -> Vars -> m Vars
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Vars -> m Vars
gmapM :: (forall d. Data d => d -> m d) -> Vars -> m Vars
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Vars -> m Vars
gmapQi :: Int -> (forall d. Data d => d -> u) -> Vars -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Vars -> u
gmapQ :: (forall d. Data d => d -> u) -> Vars -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Vars -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Vars -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Vars -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Vars -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Vars -> r
gmapT :: (forall b. Data b => b -> b) -> Vars -> Vars
$cgmapT :: (forall b. Data b => b -> b) -> Vars -> Vars
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Vars)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Vars)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Vars)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Vars)
dataTypeOf :: Vars -> DataType
$cdataTypeOf :: Vars -> DataType
toConstr :: Vars -> Constr
$ctoConstr :: Vars -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Vars
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Vars
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Vars -> c Vars
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Vars -> c Vars
$cp1Data :: Typeable Vars
Data)

-- | the lhs of most type items
data TypePattern =
    TypePattern Id [TypeArg] Range
    -- pos "("s, ")"s
  | TypePatternToken Token
  | MixfixTypePattern [TypePattern]
  | BracketTypePattern BracketKind [TypePattern] Range
  -- pos brackets (no parenthesis)
  | TypePatternArg TypeArg Range
    -- pos "(", ")"
    deriving (Int -> TypePattern -> ShowS
[TypePattern] -> ShowS
TypePattern -> String
(Int -> TypePattern -> ShowS)
-> (TypePattern -> String)
-> ([TypePattern] -> ShowS)
-> Show TypePattern
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TypePattern] -> ShowS
$cshowList :: [TypePattern] -> ShowS
show :: TypePattern -> String
$cshow :: TypePattern -> String
showsPrec :: Int -> TypePattern -> ShowS
$cshowsPrec :: Int -> TypePattern -> ShowS
Show, Typeable, Typeable TypePattern
Constr
DataType
Typeable TypePattern =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> TypePattern -> c TypePattern)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c TypePattern)
-> (TypePattern -> Constr)
-> (TypePattern -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c TypePattern))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c TypePattern))
-> ((forall b. Data b => b -> b) -> TypePattern -> TypePattern)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> TypePattern -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> TypePattern -> r)
-> (forall u. (forall d. Data d => d -> u) -> TypePattern -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> TypePattern -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> TypePattern -> m TypePattern)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> TypePattern -> m TypePattern)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> TypePattern -> m TypePattern)
-> Data TypePattern
TypePattern -> Constr
TypePattern -> DataType
(forall b. Data b => b -> b) -> TypePattern -> TypePattern
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TypePattern -> c TypePattern
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TypePattern
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> TypePattern -> u
forall u. (forall d. Data d => d -> u) -> TypePattern -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TypePattern -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TypePattern -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TypePattern -> m TypePattern
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TypePattern -> m TypePattern
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TypePattern
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TypePattern -> c TypePattern
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TypePattern)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TypePattern)
$cTypePatternArg :: Constr
$cBracketTypePattern :: Constr
$cMixfixTypePattern :: Constr
$cTypePatternToken :: Constr
$cTypePattern :: Constr
$tTypePattern :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> TypePattern -> m TypePattern
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TypePattern -> m TypePattern
gmapMp :: (forall d. Data d => d -> m d) -> TypePattern -> m TypePattern
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TypePattern -> m TypePattern
gmapM :: (forall d. Data d => d -> m d) -> TypePattern -> m TypePattern
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TypePattern -> m TypePattern
gmapQi :: Int -> (forall d. Data d => d -> u) -> TypePattern -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TypePattern -> u
gmapQ :: (forall d. Data d => d -> u) -> TypePattern -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> TypePattern -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TypePattern -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TypePattern -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TypePattern -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TypePattern -> r
gmapT :: (forall b. Data b => b -> b) -> TypePattern -> TypePattern
$cgmapT :: (forall b. Data b => b -> b) -> TypePattern -> TypePattern
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TypePattern)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TypePattern)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c TypePattern)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TypePattern)
dataTypeOf :: TypePattern -> DataType
$cdataTypeOf :: TypePattern -> DataType
toConstr :: TypePattern -> Constr
$ctoConstr :: TypePattern -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TypePattern
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TypePattern
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TypePattern -> c TypePattern
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TypePattern -> c TypePattern
$cp1Data :: Typeable TypePattern
Data)

-- | types based on variable or constructor names and applications
data Type =
    TypeName Id RawKind Int
    -- Int == 0 means constructor, negative are bound variables
  | TypeAppl Type Type
  | ExpandedType Type Type    {- an alias type with its expansion
  only the following variants are parsed -}
  | TypeAbs TypeArg Type Range
  | KindedType Type (Set.Set Kind) Range
  -- pos ":"
  | TypeToken Token
  | BracketType BracketKind [Type] Range
  -- pos "," (between type arguments)
  | MixfixType [Type]
    deriving (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
Show, Typeable, Typeable Type
Constr
DataType
Typeable Type =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Type -> c Type)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Type)
-> (Type -> Constr)
-> (Type -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Type))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Type))
-> ((forall b. Data b => b -> b) -> Type -> Type)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r)
-> (forall u. (forall d. Data d => d -> u) -> Type -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Type -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Type -> m Type)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Type -> m Type)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Type -> m Type)
-> Data Type
Type -> Constr
Type -> DataType
(forall b. Data b => b -> b) -> Type -> Type
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Type -> c Type
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Type
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Type -> u
forall u. (forall d. Data d => d -> u) -> Type -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Type -> m Type
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Type -> m Type
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Type
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Type -> c Type
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Type)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Type)
$cMixfixType :: Constr
$cBracketType :: Constr
$cTypeToken :: Constr
$cKindedType :: Constr
$cTypeAbs :: Constr
$cExpandedType :: Constr
$cTypeAppl :: Constr
$cTypeName :: Constr
$tType :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Type -> m Type
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Type -> m Type
gmapMp :: (forall d. Data d => d -> m d) -> Type -> m Type
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Type -> m Type
gmapM :: (forall d. Data d => d -> m d) -> Type -> m Type
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Type -> m Type
gmapQi :: Int -> (forall d. Data d => d -> u) -> Type -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Type -> u
gmapQ :: (forall d. Data d => d -> u) -> Type -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Type -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r
gmapT :: (forall b. Data b => b -> b) -> Type -> Type
$cgmapT :: (forall b. Data b => b -> b) -> Type -> Type
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Type)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Type)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Type)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Type)
dataTypeOf :: Type -> DataType
$cdataTypeOf :: Type -> DataType
toConstr :: Type -> Constr
$ctoConstr :: Type -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Type
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Type
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Type -> c Type
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Type -> c Type
$cp1Data :: Typeable Type
Data)

-- | change the type within a scheme
mapTypeOfScheme :: (Type -> Type) -> TypeScheme -> TypeScheme
mapTypeOfScheme :: (Type -> Type) -> TypeScheme -> TypeScheme
mapTypeOfScheme f :: Type -> Type
f (TypeScheme args :: [TypeArg]
args t :: Type
t ps :: Range
ps) = [TypeArg] -> Type -> Range -> TypeScheme
TypeScheme [TypeArg]
args (Type -> Type
f Type
t) Range
ps

{- | a type with bound type variables. The bound variables within the
scheme should have negative numbers in the order given by the type
argument list. The type arguments store proper kinds (including
downsets) whereas the kind within the type names are only raw
kinds. -}
data TypeScheme = TypeScheme [TypeArg] Type Range
  deriving (Int -> TypeScheme -> ShowS
[TypeScheme] -> ShowS
TypeScheme -> String
(Int -> TypeScheme -> ShowS)
-> (TypeScheme -> String)
-> ([TypeScheme] -> ShowS)
-> Show TypeScheme
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TypeScheme] -> ShowS
$cshowList :: [TypeScheme] -> ShowS
show :: TypeScheme -> String
$cshow :: TypeScheme -> String
showsPrec :: Int -> TypeScheme -> ShowS
$cshowsPrec :: Int -> TypeScheme -> ShowS
Show, TypeScheme -> TypeScheme -> Bool
(TypeScheme -> TypeScheme -> Bool)
-> (TypeScheme -> TypeScheme -> Bool) -> Eq TypeScheme
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TypeScheme -> TypeScheme -> Bool
$c/= :: TypeScheme -> TypeScheme -> Bool
== :: TypeScheme -> TypeScheme -> Bool
$c== :: TypeScheme -> TypeScheme -> Bool
Eq, Eq TypeScheme
Eq TypeScheme =>
(TypeScheme -> TypeScheme -> Ordering)
-> (TypeScheme -> TypeScheme -> Bool)
-> (TypeScheme -> TypeScheme -> Bool)
-> (TypeScheme -> TypeScheme -> Bool)
-> (TypeScheme -> TypeScheme -> Bool)
-> (TypeScheme -> TypeScheme -> TypeScheme)
-> (TypeScheme -> TypeScheme -> TypeScheme)
-> Ord TypeScheme
TypeScheme -> TypeScheme -> Bool
TypeScheme -> TypeScheme -> Ordering
TypeScheme -> TypeScheme -> TypeScheme
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 :: TypeScheme -> TypeScheme -> TypeScheme
$cmin :: TypeScheme -> TypeScheme -> TypeScheme
max :: TypeScheme -> TypeScheme -> TypeScheme
$cmax :: TypeScheme -> TypeScheme -> TypeScheme
>= :: TypeScheme -> TypeScheme -> Bool
$c>= :: TypeScheme -> TypeScheme -> Bool
> :: TypeScheme -> TypeScheme -> Bool
$c> :: TypeScheme -> TypeScheme -> Bool
<= :: TypeScheme -> TypeScheme -> Bool
$c<= :: TypeScheme -> TypeScheme -> Bool
< :: TypeScheme -> TypeScheme -> Bool
$c< :: TypeScheme -> TypeScheme -> Bool
compare :: TypeScheme -> TypeScheme -> Ordering
$ccompare :: TypeScheme -> TypeScheme -> Ordering
$cp1Ord :: Eq TypeScheme
Ord, Typeable, Typeable TypeScheme
Constr
DataType
Typeable TypeScheme =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> TypeScheme -> c TypeScheme)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c TypeScheme)
-> (TypeScheme -> Constr)
-> (TypeScheme -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c TypeScheme))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c TypeScheme))
-> ((forall b. Data b => b -> b) -> TypeScheme -> TypeScheme)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> TypeScheme -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> TypeScheme -> r)
-> (forall u. (forall d. Data d => d -> u) -> TypeScheme -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> TypeScheme -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> TypeScheme -> m TypeScheme)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> TypeScheme -> m TypeScheme)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> TypeScheme -> m TypeScheme)
-> Data TypeScheme
TypeScheme -> Constr
TypeScheme -> DataType
(forall b. Data b => b -> b) -> TypeScheme -> TypeScheme
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TypeScheme -> c TypeScheme
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TypeScheme
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> TypeScheme -> u
forall u. (forall d. Data d => d -> u) -> TypeScheme -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TypeScheme -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TypeScheme -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TypeScheme -> m TypeScheme
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TypeScheme -> m TypeScheme
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TypeScheme
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TypeScheme -> c TypeScheme
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TypeScheme)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeScheme)
$cTypeScheme :: Constr
$tTypeScheme :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> TypeScheme -> m TypeScheme
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TypeScheme -> m TypeScheme
gmapMp :: (forall d. Data d => d -> m d) -> TypeScheme -> m TypeScheme
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TypeScheme -> m TypeScheme
gmapM :: (forall d. Data d => d -> m d) -> TypeScheme -> m TypeScheme
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TypeScheme -> m TypeScheme
gmapQi :: Int -> (forall d. Data d => d -> u) -> TypeScheme -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TypeScheme -> u
gmapQ :: (forall d. Data d => d -> u) -> TypeScheme -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> TypeScheme -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TypeScheme -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TypeScheme -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TypeScheme -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TypeScheme -> r
gmapT :: (forall b. Data b => b -> b) -> TypeScheme -> TypeScheme
$cgmapT :: (forall b. Data b => b -> b) -> TypeScheme -> TypeScheme
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeScheme)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeScheme)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c TypeScheme)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TypeScheme)
dataTypeOf :: TypeScheme -> DataType
$cdataTypeOf :: TypeScheme -> DataType
toConstr :: TypeScheme -> Constr
$ctoConstr :: TypeScheme -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TypeScheme
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TypeScheme
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TypeScheme -> c TypeScheme
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TypeScheme -> c TypeScheme
$cp1Data :: Typeable TypeScheme
Data)
    {- pos "forall", ";"s,  dot (singleton list)
    pos "\" "("s, ")"s, dot for type aliases -}

-- | indicator for partial or total functions
data Partiality = Partial | Total deriving (Partiality -> Partiality -> Bool
(Partiality -> Partiality -> Bool)
-> (Partiality -> Partiality -> Bool) -> Eq Partiality
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Partiality -> Partiality -> Bool
$c/= :: Partiality -> Partiality -> Bool
== :: Partiality -> Partiality -> Bool
$c== :: Partiality -> Partiality -> Bool
Eq, Eq Partiality
Eq Partiality =>
(Partiality -> Partiality -> Ordering)
-> (Partiality -> Partiality -> Bool)
-> (Partiality -> Partiality -> Bool)
-> (Partiality -> Partiality -> Bool)
-> (Partiality -> Partiality -> Bool)
-> (Partiality -> Partiality -> Partiality)
-> (Partiality -> Partiality -> Partiality)
-> Ord Partiality
Partiality -> Partiality -> Bool
Partiality -> Partiality -> Ordering
Partiality -> Partiality -> Partiality
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 :: Partiality -> Partiality -> Partiality
$cmin :: Partiality -> Partiality -> Partiality
max :: Partiality -> Partiality -> Partiality
$cmax :: Partiality -> Partiality -> Partiality
>= :: Partiality -> Partiality -> Bool
$c>= :: Partiality -> Partiality -> Bool
> :: Partiality -> Partiality -> Bool
$c> :: Partiality -> Partiality -> Bool
<= :: Partiality -> Partiality -> Bool
$c<= :: Partiality -> Partiality -> Bool
< :: Partiality -> Partiality -> Bool
$c< :: Partiality -> Partiality -> Bool
compare :: Partiality -> Partiality -> Ordering
$ccompare :: Partiality -> Partiality -> Ordering
$cp1Ord :: Eq Partiality
Ord, Typeable, Typeable Partiality
Constr
DataType
Typeable Partiality =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Partiality -> c Partiality)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Partiality)
-> (Partiality -> Constr)
-> (Partiality -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Partiality))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c Partiality))
-> ((forall b. Data b => b -> b) -> Partiality -> Partiality)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Partiality -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Partiality -> r)
-> (forall u. (forall d. Data d => d -> u) -> Partiality -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Partiality -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Partiality -> m Partiality)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Partiality -> m Partiality)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Partiality -> m Partiality)
-> Data Partiality
Partiality -> Constr
Partiality -> DataType
(forall b. Data b => b -> b) -> Partiality -> Partiality
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Partiality -> c Partiality
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Partiality
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Partiality -> u
forall u. (forall d. Data d => d -> u) -> Partiality -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Partiality -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Partiality -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Partiality -> m Partiality
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Partiality -> m Partiality
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Partiality
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Partiality -> c Partiality
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Partiality)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Partiality)
$cTotal :: Constr
$cPartial :: Constr
$tPartiality :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Partiality -> m Partiality
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Partiality -> m Partiality
gmapMp :: (forall d. Data d => d -> m d) -> Partiality -> m Partiality
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Partiality -> m Partiality
gmapM :: (forall d. Data d => d -> m d) -> Partiality -> m Partiality
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Partiality -> m Partiality
gmapQi :: Int -> (forall d. Data d => d -> u) -> Partiality -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Partiality -> u
gmapQ :: (forall d. Data d => d -> u) -> Partiality -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Partiality -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Partiality -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Partiality -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Partiality -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Partiality -> r
gmapT :: (forall b. Data b => b -> b) -> Partiality -> Partiality
$cgmapT :: (forall b. Data b => b -> b) -> Partiality -> Partiality
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Partiality)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Partiality)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Partiality)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Partiality)
dataTypeOf :: Partiality -> DataType
$cdataTypeOf :: Partiality -> DataType
toConstr :: Partiality -> Constr
$ctoConstr :: Partiality -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Partiality
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Partiality
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Partiality -> c Partiality
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Partiality -> c Partiality
$cp1Data :: Typeable Partiality
Data)

instance Show Partiality where
    show :: Partiality -> String
show p :: Partiality
p = case Partiality
p of
        Partial -> String
quMark
        Total -> String
exMark

-- | function declarations or definitions
data OpItem =
    OpDecl [PolyId] TypeScheme [OpAttr] Range
    -- pos ","s, ":", ","s, "assoc", "comm", "idem", "unit"
  | OpDefn PolyId [[VarDecl]] TypeScheme Term Range
    -- pos "("s, ";"s, ")"s, ":" and "="
    deriving (Int -> OpItem -> ShowS
[OpItem] -> ShowS
OpItem -> String
(Int -> OpItem -> ShowS)
-> (OpItem -> String) -> ([OpItem] -> ShowS) -> Show OpItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OpItem] -> ShowS
$cshowList :: [OpItem] -> ShowS
show :: OpItem -> String
$cshow :: OpItem -> String
showsPrec :: Int -> OpItem -> ShowS
$cshowsPrec :: Int -> OpItem -> ShowS
Show, Typeable, Typeable OpItem
Constr
DataType
Typeable OpItem =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> OpItem -> c OpItem)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c OpItem)
-> (OpItem -> Constr)
-> (OpItem -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c OpItem))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OpItem))
-> ((forall b. Data b => b -> b) -> OpItem -> OpItem)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> OpItem -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> OpItem -> r)
-> (forall u. (forall d. Data d => d -> u) -> OpItem -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> OpItem -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> OpItem -> m OpItem)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> OpItem -> m OpItem)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> OpItem -> m OpItem)
-> Data OpItem
OpItem -> Constr
OpItem -> DataType
(forall b. Data b => b -> b) -> OpItem -> OpItem
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OpItem -> c OpItem
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OpItem
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> OpItem -> u
forall u. (forall d. Data d => d -> u) -> OpItem -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OpItem -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OpItem -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> OpItem -> m OpItem
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OpItem -> m OpItem
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OpItem
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OpItem -> c OpItem
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OpItem)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OpItem)
$cOpDefn :: Constr
$cOpDecl :: Constr
$tOpItem :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> OpItem -> m OpItem
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OpItem -> m OpItem
gmapMp :: (forall d. Data d => d -> m d) -> OpItem -> m OpItem
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OpItem -> m OpItem
gmapM :: (forall d. Data d => d -> m d) -> OpItem -> m OpItem
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> OpItem -> m OpItem
gmapQi :: Int -> (forall d. Data d => d -> u) -> OpItem -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> OpItem -> u
gmapQ :: (forall d. Data d => d -> u) -> OpItem -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> OpItem -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OpItem -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OpItem -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OpItem -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OpItem -> r
gmapT :: (forall b. Data b => b -> b) -> OpItem -> OpItem
$cgmapT :: (forall b. Data b => b -> b) -> OpItem -> OpItem
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OpItem)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OpItem)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c OpItem)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OpItem)
dataTypeOf :: OpItem -> DataType
$cdataTypeOf :: OpItem -> DataType
toConstr :: OpItem -> Constr
$ctoConstr :: OpItem -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OpItem
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OpItem
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OpItem -> c OpItem
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OpItem -> c OpItem
$cp1Data :: Typeable OpItem
Data)

-- | attributes without arguments for binary functions
data BinOpAttr = Assoc | Comm | Idem deriving (BinOpAttr -> BinOpAttr -> Bool
(BinOpAttr -> BinOpAttr -> Bool)
-> (BinOpAttr -> BinOpAttr -> Bool) -> Eq BinOpAttr
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BinOpAttr -> BinOpAttr -> Bool
$c/= :: BinOpAttr -> BinOpAttr -> Bool
== :: BinOpAttr -> BinOpAttr -> Bool
$c== :: BinOpAttr -> BinOpAttr -> Bool
Eq, Eq BinOpAttr
Eq BinOpAttr =>
(BinOpAttr -> BinOpAttr -> Ordering)
-> (BinOpAttr -> BinOpAttr -> Bool)
-> (BinOpAttr -> BinOpAttr -> Bool)
-> (BinOpAttr -> BinOpAttr -> Bool)
-> (BinOpAttr -> BinOpAttr -> Bool)
-> (BinOpAttr -> BinOpAttr -> BinOpAttr)
-> (BinOpAttr -> BinOpAttr -> BinOpAttr)
-> Ord BinOpAttr
BinOpAttr -> BinOpAttr -> Bool
BinOpAttr -> BinOpAttr -> Ordering
BinOpAttr -> BinOpAttr -> BinOpAttr
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 :: BinOpAttr -> BinOpAttr -> BinOpAttr
$cmin :: BinOpAttr -> BinOpAttr -> BinOpAttr
max :: BinOpAttr -> BinOpAttr -> BinOpAttr
$cmax :: BinOpAttr -> BinOpAttr -> BinOpAttr
>= :: BinOpAttr -> BinOpAttr -> Bool
$c>= :: BinOpAttr -> BinOpAttr -> Bool
> :: BinOpAttr -> BinOpAttr -> Bool
$c> :: BinOpAttr -> BinOpAttr -> Bool
<= :: BinOpAttr -> BinOpAttr -> Bool
$c<= :: BinOpAttr -> BinOpAttr -> Bool
< :: BinOpAttr -> BinOpAttr -> Bool
$c< :: BinOpAttr -> BinOpAttr -> Bool
compare :: BinOpAttr -> BinOpAttr -> Ordering
$ccompare :: BinOpAttr -> BinOpAttr -> Ordering
$cp1Ord :: Eq BinOpAttr
Ord, Typeable, Typeable BinOpAttr
Constr
DataType
Typeable BinOpAttr =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> BinOpAttr -> c BinOpAttr)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c BinOpAttr)
-> (BinOpAttr -> Constr)
-> (BinOpAttr -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c BinOpAttr))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BinOpAttr))
-> ((forall b. Data b => b -> b) -> BinOpAttr -> BinOpAttr)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> BinOpAttr -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> BinOpAttr -> r)
-> (forall u. (forall d. Data d => d -> u) -> BinOpAttr -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> BinOpAttr -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> BinOpAttr -> m BinOpAttr)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BinOpAttr -> m BinOpAttr)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BinOpAttr -> m BinOpAttr)
-> Data BinOpAttr
BinOpAttr -> Constr
BinOpAttr -> DataType
(forall b. Data b => b -> b) -> BinOpAttr -> BinOpAttr
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BinOpAttr -> c BinOpAttr
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BinOpAttr
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> BinOpAttr -> u
forall u. (forall d. Data d => d -> u) -> BinOpAttr -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BinOpAttr -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BinOpAttr -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BinOpAttr -> m BinOpAttr
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BinOpAttr -> m BinOpAttr
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BinOpAttr
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BinOpAttr -> c BinOpAttr
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BinOpAttr)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BinOpAttr)
$cIdem :: Constr
$cComm :: Constr
$cAssoc :: Constr
$tBinOpAttr :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> BinOpAttr -> m BinOpAttr
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BinOpAttr -> m BinOpAttr
gmapMp :: (forall d. Data d => d -> m d) -> BinOpAttr -> m BinOpAttr
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BinOpAttr -> m BinOpAttr
gmapM :: (forall d. Data d => d -> m d) -> BinOpAttr -> m BinOpAttr
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BinOpAttr -> m BinOpAttr
gmapQi :: Int -> (forall d. Data d => d -> u) -> BinOpAttr -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> BinOpAttr -> u
gmapQ :: (forall d. Data d => d -> u) -> BinOpAttr -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> BinOpAttr -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BinOpAttr -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BinOpAttr -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BinOpAttr -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BinOpAttr -> r
gmapT :: (forall b. Data b => b -> b) -> BinOpAttr -> BinOpAttr
$cgmapT :: (forall b. Data b => b -> b) -> BinOpAttr -> BinOpAttr
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BinOpAttr)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BinOpAttr)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c BinOpAttr)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BinOpAttr)
dataTypeOf :: BinOpAttr -> DataType
$cdataTypeOf :: BinOpAttr -> DataType
toConstr :: BinOpAttr -> Constr
$ctoConstr :: BinOpAttr -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BinOpAttr
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BinOpAttr
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BinOpAttr -> c BinOpAttr
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BinOpAttr -> c BinOpAttr
$cp1Data :: Typeable BinOpAttr
Data)

instance Show BinOpAttr where
    show :: BinOpAttr -> String
show a :: BinOpAttr
a = case BinOpAttr
a of
        Assoc -> String
assocS
        Comm -> String
commS
        Idem -> String
idemS

-- | possible function attributes (including a term as a unit element)
data OpAttr =
    BinOpAttr BinOpAttr Range
  | UnitOpAttr Term Range deriving (Int -> OpAttr -> ShowS
[OpAttr] -> ShowS
OpAttr -> String
(Int -> OpAttr -> ShowS)
-> (OpAttr -> String) -> ([OpAttr] -> ShowS) -> Show OpAttr
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OpAttr] -> ShowS
$cshowList :: [OpAttr] -> ShowS
show :: OpAttr -> String
$cshow :: OpAttr -> String
showsPrec :: Int -> OpAttr -> ShowS
$cshowsPrec :: Int -> OpAttr -> ShowS
Show, Typeable, Typeable OpAttr
Constr
DataType
Typeable OpAttr =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> OpAttr -> c OpAttr)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c OpAttr)
-> (OpAttr -> Constr)
-> (OpAttr -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c OpAttr))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OpAttr))
-> ((forall b. Data b => b -> b) -> OpAttr -> OpAttr)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> OpAttr -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> OpAttr -> r)
-> (forall u. (forall d. Data d => d -> u) -> OpAttr -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> OpAttr -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> OpAttr -> m OpAttr)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> OpAttr -> m OpAttr)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> OpAttr -> m OpAttr)
-> Data OpAttr
OpAttr -> Constr
OpAttr -> DataType
(forall b. Data b => b -> b) -> OpAttr -> OpAttr
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OpAttr -> c OpAttr
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OpAttr
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> OpAttr -> u
forall u. (forall d. Data d => d -> u) -> OpAttr -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OpAttr -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OpAttr -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> OpAttr -> m OpAttr
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OpAttr -> m OpAttr
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OpAttr
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OpAttr -> c OpAttr
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OpAttr)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OpAttr)
$cUnitOpAttr :: Constr
$cBinOpAttr :: Constr
$tOpAttr :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> OpAttr -> m OpAttr
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OpAttr -> m OpAttr
gmapMp :: (forall d. Data d => d -> m d) -> OpAttr -> m OpAttr
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> OpAttr -> m OpAttr
gmapM :: (forall d. Data d => d -> m d) -> OpAttr -> m OpAttr
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> OpAttr -> m OpAttr
gmapQi :: Int -> (forall d. Data d => d -> u) -> OpAttr -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> OpAttr -> u
gmapQ :: (forall d. Data d => d -> u) -> OpAttr -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> OpAttr -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OpAttr -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OpAttr -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OpAttr -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OpAttr -> r
gmapT :: (forall b. Data b => b -> b) -> OpAttr -> OpAttr
$cgmapT :: (forall b. Data b => b -> b) -> OpAttr -> OpAttr
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OpAttr)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OpAttr)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c OpAttr)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c OpAttr)
dataTypeOf :: OpAttr -> DataType
$cdataTypeOf :: OpAttr -> DataType
toConstr :: OpAttr -> Constr
$ctoConstr :: OpAttr -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OpAttr
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c OpAttr
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OpAttr -> c OpAttr
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> OpAttr -> c OpAttr
$cp1Data :: Typeable OpAttr
Data)

instance Eq OpAttr where
    o1 :: OpAttr
o1 == :: OpAttr -> OpAttr -> Bool
== o2 :: OpAttr
o2 = OpAttr -> OpAttr -> Ordering
forall a. Ord a => a -> a -> Ordering
compare OpAttr
o1 OpAttr
o2 Ordering -> Ordering -> Bool
forall a. Eq a => a -> a -> Bool
== Ordering
EQ

instance Ord OpAttr where
    compare :: OpAttr -> OpAttr -> Ordering
compare o1 :: OpAttr
o1 o2 :: OpAttr
o2 = case (OpAttr
o1, OpAttr
o2) of
        (BinOpAttr b1 :: BinOpAttr
b1 _, BinOpAttr b2 :: BinOpAttr
b2 _) -> BinOpAttr -> BinOpAttr -> Ordering
forall a. Ord a => a -> a -> Ordering
compare BinOpAttr
b1 BinOpAttr
b2
        (BinOpAttr _ _, _) -> Ordering
LT
        (UnitOpAttr t1 :: Term
t1 _, UnitOpAttr t2 :: Term
t2 _) -> Term -> Term -> Ordering
forall a. Ord a => a -> a -> Ordering
compare Term
t1 Term
t2
        _ -> Ordering
GT

-- | a polymorphic data type declaration with a deriving clause
data DatatypeDecl =
    DatatypeDecl TypePattern Kind [Annoted Alternative] [Id] Range
    -- pos "::=", "|"s, "deriving"
    deriving (Int -> DatatypeDecl -> ShowS
[DatatypeDecl] -> ShowS
DatatypeDecl -> String
(Int -> DatatypeDecl -> ShowS)
-> (DatatypeDecl -> String)
-> ([DatatypeDecl] -> ShowS)
-> Show DatatypeDecl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DatatypeDecl] -> ShowS
$cshowList :: [DatatypeDecl] -> ShowS
show :: DatatypeDecl -> String
$cshow :: DatatypeDecl -> String
showsPrec :: Int -> DatatypeDecl -> ShowS
$cshowsPrec :: Int -> DatatypeDecl -> ShowS
Show, Typeable, Typeable DatatypeDecl
Constr
DataType
Typeable DatatypeDecl =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> DatatypeDecl -> c DatatypeDecl)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c DatatypeDecl)
-> (DatatypeDecl -> Constr)
-> (DatatypeDecl -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c DatatypeDecl))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c DatatypeDecl))
-> ((forall b. Data b => b -> b) -> DatatypeDecl -> DatatypeDecl)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> DatatypeDecl -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> DatatypeDecl -> r)
-> (forall u. (forall d. Data d => d -> u) -> DatatypeDecl -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> DatatypeDecl -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> DatatypeDecl -> m DatatypeDecl)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> DatatypeDecl -> m DatatypeDecl)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> DatatypeDecl -> m DatatypeDecl)
-> Data DatatypeDecl
DatatypeDecl -> Constr
DatatypeDecl -> DataType
(forall b. Data b => b -> b) -> DatatypeDecl -> DatatypeDecl
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DatatypeDecl -> c DatatypeDecl
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DatatypeDecl
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> DatatypeDecl -> u
forall u. (forall d. Data d => d -> u) -> DatatypeDecl -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DatatypeDecl -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DatatypeDecl -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DatatypeDecl -> m DatatypeDecl
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DatatypeDecl -> m DatatypeDecl
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DatatypeDecl
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DatatypeDecl -> c DatatypeDecl
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DatatypeDecl)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DatatypeDecl)
$cDatatypeDecl :: Constr
$tDatatypeDecl :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> DatatypeDecl -> m DatatypeDecl
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DatatypeDecl -> m DatatypeDecl
gmapMp :: (forall d. Data d => d -> m d) -> DatatypeDecl -> m DatatypeDecl
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DatatypeDecl -> m DatatypeDecl
gmapM :: (forall d. Data d => d -> m d) -> DatatypeDecl -> m DatatypeDecl
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DatatypeDecl -> m DatatypeDecl
gmapQi :: Int -> (forall d. Data d => d -> u) -> DatatypeDecl -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> DatatypeDecl -> u
gmapQ :: (forall d. Data d => d -> u) -> DatatypeDecl -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> DatatypeDecl -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DatatypeDecl -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DatatypeDecl -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DatatypeDecl -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DatatypeDecl -> r
gmapT :: (forall b. Data b => b -> b) -> DatatypeDecl -> DatatypeDecl
$cgmapT :: (forall b. Data b => b -> b) -> DatatypeDecl -> DatatypeDecl
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DatatypeDecl)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DatatypeDecl)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c DatatypeDecl)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DatatypeDecl)
dataTypeOf :: DatatypeDecl -> DataType
$cdataTypeOf :: DatatypeDecl -> DataType
toConstr :: DatatypeDecl -> Constr
$ctoConstr :: DatatypeDecl -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DatatypeDecl
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DatatypeDecl
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DatatypeDecl -> c DatatypeDecl
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DatatypeDecl -> c DatatypeDecl
$cp1Data :: Typeable DatatypeDecl
Data)

{- | Alternatives are subtypes or a constructor with a list of
(curried) tuples as arguments. Only the components of the first tuple
can be addressed by the places of the mixfix constructor. -}
data Alternative =
    Constructor Id [[Component]] Partiality Range
    -- pos: "("s, ";"s, ")"s, "?"
  | Subtype [Type] Range
    -- pos: "type", ","s
    deriving (Int -> Alternative -> ShowS
[Alternative] -> ShowS
Alternative -> String
(Int -> Alternative -> ShowS)
-> (Alternative -> String)
-> ([Alternative] -> ShowS)
-> Show Alternative
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Alternative] -> ShowS
$cshowList :: [Alternative] -> ShowS
show :: Alternative -> String
$cshow :: Alternative -> String
showsPrec :: Int -> Alternative -> ShowS
$cshowsPrec :: Int -> Alternative -> ShowS
Show, Typeable, Typeable Alternative
Constr
DataType
Typeable Alternative =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Alternative -> c Alternative)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Alternative)
-> (Alternative -> Constr)
-> (Alternative -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Alternative))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c Alternative))
-> ((forall b. Data b => b -> b) -> Alternative -> Alternative)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Alternative -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Alternative -> r)
-> (forall u. (forall d. Data d => d -> u) -> Alternative -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Alternative -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Alternative -> m Alternative)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Alternative -> m Alternative)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Alternative -> m Alternative)
-> Data Alternative
Alternative -> Constr
Alternative -> DataType
(forall b. Data b => b -> b) -> Alternative -> Alternative
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Alternative -> c Alternative
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Alternative
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Alternative -> u
forall u. (forall d. Data d => d -> u) -> Alternative -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Alternative -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Alternative -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Alternative -> m Alternative
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Alternative -> m Alternative
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Alternative
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Alternative -> c Alternative
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Alternative)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Alternative)
$cSubtype :: Constr
$cConstructor :: Constr
$tAlternative :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Alternative -> m Alternative
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Alternative -> m Alternative
gmapMp :: (forall d. Data d => d -> m d) -> Alternative -> m Alternative
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Alternative -> m Alternative
gmapM :: (forall d. Data d => d -> m d) -> Alternative -> m Alternative
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Alternative -> m Alternative
gmapQi :: Int -> (forall d. Data d => d -> u) -> Alternative -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Alternative -> u
gmapQ :: (forall d. Data d => d -> u) -> Alternative -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Alternative -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Alternative -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Alternative -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Alternative -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Alternative -> r
gmapT :: (forall b. Data b => b -> b) -> Alternative -> Alternative
$cgmapT :: (forall b. Data b => b -> b) -> Alternative -> Alternative
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Alternative)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c Alternative)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Alternative)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Alternative)
dataTypeOf :: Alternative -> DataType
$cdataTypeOf :: Alternative -> DataType
toConstr :: Alternative -> Constr
$ctoConstr :: Alternative -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Alternative
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Alternative
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Alternative -> c Alternative
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Alternative -> c Alternative
$cp1Data :: Typeable Alternative
Data)

{- | A component is a type with on optional (only pre- or postfix)
   selector function. -}
data Component =
    Selector Id Partiality Type SeparatorKind Range
    -- pos ",", ":" or ":?"
  | NoSelector Type
    deriving (Int -> Component -> ShowS
[Component] -> ShowS
Component -> String
(Int -> Component -> ShowS)
-> (Component -> String)
-> ([Component] -> ShowS)
-> Show Component
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Component] -> ShowS
$cshowList :: [Component] -> ShowS
show :: Component -> String
$cshow :: Component -> String
showsPrec :: Int -> Component -> ShowS
$cshowsPrec :: Int -> Component -> ShowS
Show, Component -> Component -> Bool
(Component -> Component -> Bool)
-> (Component -> Component -> Bool) -> Eq Component
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Component -> Component -> Bool
$c/= :: Component -> Component -> Bool
== :: Component -> Component -> Bool
$c== :: Component -> Component -> Bool
Eq, Eq Component
Eq Component =>
(Component -> Component -> Ordering)
-> (Component -> Component -> Bool)
-> (Component -> Component -> Bool)
-> (Component -> Component -> Bool)
-> (Component -> Component -> Bool)
-> (Component -> Component -> Component)
-> (Component -> Component -> Component)
-> Ord Component
Component -> Component -> Bool
Component -> Component -> Ordering
Component -> Component -> Component
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 :: Component -> Component -> Component
$cmin :: Component -> Component -> Component
max :: Component -> Component -> Component
$cmax :: Component -> Component -> Component
>= :: Component -> Component -> Bool
$c>= :: Component -> Component -> Bool
> :: Component -> Component -> Bool
$c> :: Component -> Component -> Bool
<= :: Component -> Component -> Bool
$c<= :: Component -> Component -> Bool
< :: Component -> Component -> Bool
$c< :: Component -> Component -> Bool
compare :: Component -> Component -> Ordering
$ccompare :: Component -> Component -> Ordering
$cp1Ord :: Eq Component
Ord, Typeable, Typeable Component
Constr
DataType
Typeable Component =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Component -> c Component)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Component)
-> (Component -> Constr)
-> (Component -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Component))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Component))
-> ((forall b. Data b => b -> b) -> Component -> Component)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Component -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Component -> r)
-> (forall u. (forall d. Data d => d -> u) -> Component -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Component -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Component -> m Component)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Component -> m Component)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Component -> m Component)
-> Data Component
Component -> Constr
Component -> DataType
(forall b. Data b => b -> b) -> Component -> Component
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Component -> c Component
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Component
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Component -> u
forall u. (forall d. Data d => d -> u) -> Component -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Component -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Component -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Component -> m Component
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Component -> m Component
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Component
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Component -> c Component
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Component)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Component)
$cNoSelector :: Constr
$cSelector :: Constr
$tComponent :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Component -> m Component
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Component -> m Component
gmapMp :: (forall d. Data d => d -> m d) -> Component -> m Component
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Component -> m Component
gmapM :: (forall d. Data d => d -> m d) -> Component -> m Component
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Component -> m Component
gmapQi :: Int -> (forall d. Data d => d -> u) -> Component -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Component -> u
gmapQ :: (forall d. Data d => d -> u) -> Component -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Component -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Component -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Component -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Component -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Component -> r
gmapT :: (forall b. Data b => b -> b) -> Component -> Component
$cgmapT :: (forall b. Data b => b -> b) -> Component -> Component
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Component)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Component)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Component)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Component)
dataTypeOf :: Component -> DataType
$cdataTypeOf :: Component -> DataType
toConstr :: Component -> Constr
$ctoConstr :: Component -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Component
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Component
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Component -> c Component
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Component -> c Component
$cp1Data :: Typeable Component
Data)

-- | the possible quantifiers
data Quantifier = Universal | Existential | Unique
  deriving (Int -> Quantifier -> ShowS
[Quantifier] -> ShowS
Quantifier -> String
(Int -> Quantifier -> ShowS)
-> (Quantifier -> String)
-> ([Quantifier] -> ShowS)
-> Show Quantifier
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Quantifier] -> ShowS
$cshowList :: [Quantifier] -> ShowS
show :: Quantifier -> String
$cshow :: Quantifier -> String
showsPrec :: Int -> Quantifier -> ShowS
$cshowsPrec :: Int -> Quantifier -> ShowS
Show, Quantifier -> Quantifier -> Bool
(Quantifier -> Quantifier -> Bool)
-> (Quantifier -> Quantifier -> Bool) -> Eq Quantifier
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Quantifier -> Quantifier -> Bool
$c/= :: Quantifier -> Quantifier -> Bool
== :: Quantifier -> Quantifier -> Bool
$c== :: Quantifier -> Quantifier -> Bool
Eq, Eq Quantifier
Eq Quantifier =>
(Quantifier -> Quantifier -> Ordering)
-> (Quantifier -> Quantifier -> Bool)
-> (Quantifier -> Quantifier -> Bool)
-> (Quantifier -> Quantifier -> Bool)
-> (Quantifier -> Quantifier -> Bool)
-> (Quantifier -> Quantifier -> Quantifier)
-> (Quantifier -> Quantifier -> Quantifier)
-> Ord Quantifier
Quantifier -> Quantifier -> Bool
Quantifier -> Quantifier -> Ordering
Quantifier -> Quantifier -> Quantifier
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 :: Quantifier -> Quantifier -> Quantifier
$cmin :: Quantifier -> Quantifier -> Quantifier
max :: Quantifier -> Quantifier -> Quantifier
$cmax :: Quantifier -> Quantifier -> Quantifier
>= :: Quantifier -> Quantifier -> Bool
$c>= :: Quantifier -> Quantifier -> Bool
> :: Quantifier -> Quantifier -> Bool
$c> :: Quantifier -> Quantifier -> Bool
<= :: Quantifier -> Quantifier -> Bool
$c<= :: Quantifier -> Quantifier -> Bool
< :: Quantifier -> Quantifier -> Bool
$c< :: Quantifier -> Quantifier -> Bool
compare :: Quantifier -> Quantifier -> Ordering
$ccompare :: Quantifier -> Quantifier -> Ordering
$cp1Ord :: Eq Quantifier
Ord, Typeable, Typeable Quantifier
Constr
DataType
Typeable Quantifier =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Quantifier -> c Quantifier)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Quantifier)
-> (Quantifier -> Constr)
-> (Quantifier -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Quantifier))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c Quantifier))
-> ((forall b. Data b => b -> b) -> Quantifier -> Quantifier)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Quantifier -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Quantifier -> r)
-> (forall u. (forall d. Data d => d -> u) -> Quantifier -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Quantifier -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Quantifier -> m Quantifier)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Quantifier -> m Quantifier)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Quantifier -> m Quantifier)
-> Data Quantifier
Quantifier -> Constr
Quantifier -> DataType
(forall b. Data b => b -> b) -> Quantifier -> Quantifier
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Quantifier -> c Quantifier
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Quantifier
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Quantifier -> u
forall u. (forall d. Data d => d -> u) -> Quantifier -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Quantifier -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Quantifier -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Quantifier -> m Quantifier
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Quantifier -> m Quantifier
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Quantifier
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Quantifier -> c Quantifier
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Quantifier)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Quantifier)
$cUnique :: Constr
$cExistential :: Constr
$cUniversal :: Constr
$tQuantifier :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Quantifier -> m Quantifier
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Quantifier -> m Quantifier
gmapMp :: (forall d. Data d => d -> m d) -> Quantifier -> m Quantifier
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Quantifier -> m Quantifier
gmapM :: (forall d. Data d => d -> m d) -> Quantifier -> m Quantifier
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Quantifier -> m Quantifier
gmapQi :: Int -> (forall d. Data d => d -> u) -> Quantifier -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Quantifier -> u
gmapQ :: (forall d. Data d => d -> u) -> Quantifier -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Quantifier -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Quantifier -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Quantifier -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Quantifier -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Quantifier -> r
gmapT :: (forall b. Data b => b -> b) -> Quantifier -> Quantifier
$cgmapT :: (forall b. Data b => b -> b) -> Quantifier -> Quantifier
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Quantifier)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Quantifier)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Quantifier)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Quantifier)
dataTypeOf :: Quantifier -> DataType
$cdataTypeOf :: Quantifier -> DataType
toConstr :: Quantifier -> Constr
$ctoConstr :: Quantifier -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Quantifier
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Quantifier
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Quantifier -> c Quantifier
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Quantifier -> c Quantifier
$cp1Data :: Typeable Quantifier
Data)

-- | the possibly type annotations of terms
data TypeQual = OfType | AsType | InType | Inferred
  deriving (Int -> TypeQual -> ShowS
[TypeQual] -> ShowS
TypeQual -> String
(Int -> TypeQual -> ShowS)
-> (TypeQual -> String) -> ([TypeQual] -> ShowS) -> Show TypeQual
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TypeQual] -> ShowS
$cshowList :: [TypeQual] -> ShowS
show :: TypeQual -> String
$cshow :: TypeQual -> String
showsPrec :: Int -> TypeQual -> ShowS
$cshowsPrec :: Int -> TypeQual -> ShowS
Show, TypeQual -> TypeQual -> Bool
(TypeQual -> TypeQual -> Bool)
-> (TypeQual -> TypeQual -> Bool) -> Eq TypeQual
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TypeQual -> TypeQual -> Bool
$c/= :: TypeQual -> TypeQual -> Bool
== :: TypeQual -> TypeQual -> Bool
$c== :: TypeQual -> TypeQual -> Bool
Eq, Eq TypeQual
Eq TypeQual =>
(TypeQual -> TypeQual -> Ordering)
-> (TypeQual -> TypeQual -> Bool)
-> (TypeQual -> TypeQual -> Bool)
-> (TypeQual -> TypeQual -> Bool)
-> (TypeQual -> TypeQual -> Bool)
-> (TypeQual -> TypeQual -> TypeQual)
-> (TypeQual -> TypeQual -> TypeQual)
-> Ord TypeQual
TypeQual -> TypeQual -> Bool
TypeQual -> TypeQual -> Ordering
TypeQual -> TypeQual -> TypeQual
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 :: TypeQual -> TypeQual -> TypeQual
$cmin :: TypeQual -> TypeQual -> TypeQual
max :: TypeQual -> TypeQual -> TypeQual
$cmax :: TypeQual -> TypeQual -> TypeQual
>= :: TypeQual -> TypeQual -> Bool
$c>= :: TypeQual -> TypeQual -> Bool
> :: TypeQual -> TypeQual -> Bool
$c> :: TypeQual -> TypeQual -> Bool
<= :: TypeQual -> TypeQual -> Bool
$c<= :: TypeQual -> TypeQual -> Bool
< :: TypeQual -> TypeQual -> Bool
$c< :: TypeQual -> TypeQual -> Bool
compare :: TypeQual -> TypeQual -> Ordering
$ccompare :: TypeQual -> TypeQual -> Ordering
$cp1Ord :: Eq TypeQual
Ord, Typeable, Typeable TypeQual
Constr
DataType
Typeable TypeQual =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> TypeQual -> c TypeQual)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c TypeQual)
-> (TypeQual -> Constr)
-> (TypeQual -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c TypeQual))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeQual))
-> ((forall b. Data b => b -> b) -> TypeQual -> TypeQual)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> TypeQual -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> TypeQual -> r)
-> (forall u. (forall d. Data d => d -> u) -> TypeQual -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> TypeQual -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> TypeQual -> m TypeQual)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> TypeQual -> m TypeQual)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> TypeQual -> m TypeQual)
-> Data TypeQual
TypeQual -> Constr
TypeQual -> DataType
(forall b. Data b => b -> b) -> TypeQual -> TypeQual
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TypeQual -> c TypeQual
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TypeQual
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> TypeQual -> u
forall u. (forall d. Data d => d -> u) -> TypeQual -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TypeQual -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TypeQual -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TypeQual -> m TypeQual
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TypeQual -> m TypeQual
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TypeQual
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TypeQual -> c TypeQual
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TypeQual)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeQual)
$cInferred :: Constr
$cInType :: Constr
$cAsType :: Constr
$cOfType :: Constr
$tTypeQual :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> TypeQual -> m TypeQual
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TypeQual -> m TypeQual
gmapMp :: (forall d. Data d => d -> m d) -> TypeQual -> m TypeQual
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TypeQual -> m TypeQual
gmapM :: (forall d. Data d => d -> m d) -> TypeQual -> m TypeQual
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TypeQual -> m TypeQual
gmapQi :: Int -> (forall d. Data d => d -> u) -> TypeQual -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TypeQual -> u
gmapQ :: (forall d. Data d => d -> u) -> TypeQual -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> TypeQual -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TypeQual -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TypeQual -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TypeQual -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TypeQual -> r
gmapT :: (forall b. Data b => b -> b) -> TypeQual -> TypeQual
$cgmapT :: (forall b. Data b => b -> b) -> TypeQual -> TypeQual
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeQual)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeQual)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c TypeQual)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TypeQual)
dataTypeOf :: TypeQual -> DataType
$cdataTypeOf :: TypeQual -> DataType
toConstr :: TypeQual -> Constr
$ctoConstr :: TypeQual -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TypeQual
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TypeQual
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TypeQual -> c TypeQual
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TypeQual -> c TypeQual
$cp1Data :: Typeable TypeQual
Data)

-- | an indicator of (otherwise equivalent) let or where equations
data LetBrand = Let | Where | Program deriving (Int -> LetBrand -> ShowS
[LetBrand] -> ShowS
LetBrand -> String
(Int -> LetBrand -> ShowS)
-> (LetBrand -> String) -> ([LetBrand] -> ShowS) -> Show LetBrand
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LetBrand] -> ShowS
$cshowList :: [LetBrand] -> ShowS
show :: LetBrand -> String
$cshow :: LetBrand -> String
showsPrec :: Int -> LetBrand -> ShowS
$cshowsPrec :: Int -> LetBrand -> ShowS
Show, LetBrand -> LetBrand -> Bool
(LetBrand -> LetBrand -> Bool)
-> (LetBrand -> LetBrand -> Bool) -> Eq LetBrand
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LetBrand -> LetBrand -> Bool
$c/= :: LetBrand -> LetBrand -> Bool
== :: LetBrand -> LetBrand -> Bool
$c== :: LetBrand -> LetBrand -> Bool
Eq, Eq LetBrand
Eq LetBrand =>
(LetBrand -> LetBrand -> Ordering)
-> (LetBrand -> LetBrand -> Bool)
-> (LetBrand -> LetBrand -> Bool)
-> (LetBrand -> LetBrand -> Bool)
-> (LetBrand -> LetBrand -> Bool)
-> (LetBrand -> LetBrand -> LetBrand)
-> (LetBrand -> LetBrand -> LetBrand)
-> Ord LetBrand
LetBrand -> LetBrand -> Bool
LetBrand -> LetBrand -> Ordering
LetBrand -> LetBrand -> LetBrand
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 :: LetBrand -> LetBrand -> LetBrand
$cmin :: LetBrand -> LetBrand -> LetBrand
max :: LetBrand -> LetBrand -> LetBrand
$cmax :: LetBrand -> LetBrand -> LetBrand
>= :: LetBrand -> LetBrand -> Bool
$c>= :: LetBrand -> LetBrand -> Bool
> :: LetBrand -> LetBrand -> Bool
$c> :: LetBrand -> LetBrand -> Bool
<= :: LetBrand -> LetBrand -> Bool
$c<= :: LetBrand -> LetBrand -> Bool
< :: LetBrand -> LetBrand -> Bool
$c< :: LetBrand -> LetBrand -> Bool
compare :: LetBrand -> LetBrand -> Ordering
$ccompare :: LetBrand -> LetBrand -> Ordering
$cp1Ord :: Eq LetBrand
Ord, Typeable, Typeable LetBrand
Constr
DataType
Typeable LetBrand =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> LetBrand -> c LetBrand)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c LetBrand)
-> (LetBrand -> Constr)
-> (LetBrand -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c LetBrand))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LetBrand))
-> ((forall b. Data b => b -> b) -> LetBrand -> LetBrand)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> LetBrand -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> LetBrand -> r)
-> (forall u. (forall d. Data d => d -> u) -> LetBrand -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> LetBrand -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> LetBrand -> m LetBrand)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> LetBrand -> m LetBrand)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> LetBrand -> m LetBrand)
-> Data LetBrand
LetBrand -> Constr
LetBrand -> DataType
(forall b. Data b => b -> b) -> LetBrand -> LetBrand
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LetBrand -> c LetBrand
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LetBrand
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> LetBrand -> u
forall u. (forall d. Data d => d -> u) -> LetBrand -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LetBrand -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LetBrand -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> LetBrand -> m LetBrand
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LetBrand -> m LetBrand
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LetBrand
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LetBrand -> c LetBrand
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LetBrand)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LetBrand)
$cProgram :: Constr
$cWhere :: Constr
$cLet :: Constr
$tLetBrand :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> LetBrand -> m LetBrand
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LetBrand -> m LetBrand
gmapMp :: (forall d. Data d => d -> m d) -> LetBrand -> m LetBrand
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LetBrand -> m LetBrand
gmapM :: (forall d. Data d => d -> m d) -> LetBrand -> m LetBrand
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> LetBrand -> m LetBrand
gmapQi :: Int -> (forall d. Data d => d -> u) -> LetBrand -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> LetBrand -> u
gmapQ :: (forall d. Data d => d -> u) -> LetBrand -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> LetBrand -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LetBrand -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LetBrand -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LetBrand -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LetBrand -> r
gmapT :: (forall b. Data b => b -> b) -> LetBrand -> LetBrand
$cgmapT :: (forall b. Data b => b -> b) -> LetBrand -> LetBrand
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LetBrand)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LetBrand)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c LetBrand)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LetBrand)
dataTypeOf :: LetBrand -> DataType
$cdataTypeOf :: LetBrand -> DataType
toConstr :: LetBrand -> Constr
$ctoConstr :: LetBrand -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LetBrand
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LetBrand
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LetBrand -> c LetBrand
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LetBrand -> c LetBrand
$cp1Data :: Typeable LetBrand
Data)

-- | the possible kinds of brackets (that should match when parsed)
data BracketKind = Parens | Squares | Braces | NoBrackets
  deriving (Int -> BracketKind -> ShowS
[BracketKind] -> ShowS
BracketKind -> String
(Int -> BracketKind -> ShowS)
-> (BracketKind -> String)
-> ([BracketKind] -> ShowS)
-> Show BracketKind
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BracketKind] -> ShowS
$cshowList :: [BracketKind] -> ShowS
show :: BracketKind -> String
$cshow :: BracketKind -> String
showsPrec :: Int -> BracketKind -> ShowS
$cshowsPrec :: Int -> BracketKind -> ShowS
Show, BracketKind -> BracketKind -> Bool
(BracketKind -> BracketKind -> Bool)
-> (BracketKind -> BracketKind -> Bool) -> Eq BracketKind
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BracketKind -> BracketKind -> Bool
$c/= :: BracketKind -> BracketKind -> Bool
== :: BracketKind -> BracketKind -> Bool
$c== :: BracketKind -> BracketKind -> Bool
Eq, Eq BracketKind
Eq BracketKind =>
(BracketKind -> BracketKind -> Ordering)
-> (BracketKind -> BracketKind -> Bool)
-> (BracketKind -> BracketKind -> Bool)
-> (BracketKind -> BracketKind -> Bool)
-> (BracketKind -> BracketKind -> Bool)
-> (BracketKind -> BracketKind -> BracketKind)
-> (BracketKind -> BracketKind -> BracketKind)
-> Ord BracketKind
BracketKind -> BracketKind -> Bool
BracketKind -> BracketKind -> Ordering
BracketKind -> BracketKind -> BracketKind
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 :: BracketKind -> BracketKind -> BracketKind
$cmin :: BracketKind -> BracketKind -> BracketKind
max :: BracketKind -> BracketKind -> BracketKind
$cmax :: BracketKind -> BracketKind -> BracketKind
>= :: BracketKind -> BracketKind -> Bool
$c>= :: BracketKind -> BracketKind -> Bool
> :: BracketKind -> BracketKind -> Bool
$c> :: BracketKind -> BracketKind -> Bool
<= :: BracketKind -> BracketKind -> Bool
$c<= :: BracketKind -> BracketKind -> Bool
< :: BracketKind -> BracketKind -> Bool
$c< :: BracketKind -> BracketKind -> Bool
compare :: BracketKind -> BracketKind -> Ordering
$ccompare :: BracketKind -> BracketKind -> Ordering
$cp1Ord :: Eq BracketKind
Ord, Typeable, Typeable BracketKind
Constr
DataType
Typeable BracketKind =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> BracketKind -> c BracketKind)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c BracketKind)
-> (BracketKind -> Constr)
-> (BracketKind -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c BracketKind))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c BracketKind))
-> ((forall b. Data b => b -> b) -> BracketKind -> BracketKind)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> BracketKind -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> BracketKind -> r)
-> (forall u. (forall d. Data d => d -> u) -> BracketKind -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> BracketKind -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> BracketKind -> m BracketKind)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BracketKind -> m BracketKind)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BracketKind -> m BracketKind)
-> Data BracketKind
BracketKind -> Constr
BracketKind -> DataType
(forall b. Data b => b -> b) -> BracketKind -> BracketKind
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BracketKind -> c BracketKind
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BracketKind
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> BracketKind -> u
forall u. (forall d. Data d => d -> u) -> BracketKind -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BracketKind -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BracketKind -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BracketKind -> m BracketKind
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BracketKind -> m BracketKind
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BracketKind
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BracketKind -> c BracketKind
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BracketKind)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c BracketKind)
$cNoBrackets :: Constr
$cBraces :: Constr
$cSquares :: Constr
$cParens :: Constr
$tBracketKind :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> BracketKind -> m BracketKind
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BracketKind -> m BracketKind
gmapMp :: (forall d. Data d => d -> m d) -> BracketKind -> m BracketKind
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BracketKind -> m BracketKind
gmapM :: (forall d. Data d => d -> m d) -> BracketKind -> m BracketKind
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BracketKind -> m BracketKind
gmapQi :: Int -> (forall d. Data d => d -> u) -> BracketKind -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> BracketKind -> u
gmapQ :: (forall d. Data d => d -> u) -> BracketKind -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> BracketKind -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BracketKind -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BracketKind -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BracketKind -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BracketKind -> r
gmapT :: (forall b. Data b => b -> b) -> BracketKind -> BracketKind
$cgmapT :: (forall b. Data b => b -> b) -> BracketKind -> BracketKind
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c BracketKind)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c BracketKind)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c BracketKind)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BracketKind)
dataTypeOf :: BracketKind -> DataType
$cdataTypeOf :: BracketKind -> DataType
toConstr :: BracketKind -> Constr
$ctoConstr :: BracketKind -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BracketKind
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BracketKind
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BracketKind -> c BracketKind
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BracketKind -> c BracketKind
$cp1Data :: Typeable BracketKind
Data)

-- | the brackets as strings for printing
getBrackets :: BracketKind -> (String, String)
getBrackets :: BracketKind -> (String, String)
getBrackets b :: BracketKind
b = case BracketKind
b of
    Parens -> ("(", ")")
    Squares -> ("[", "]")
    Braces -> ("{", "}")
    NoBrackets -> ("", "") -- for printing only

data InstKind = UserGiven | Infer deriving (Int -> InstKind -> ShowS
[InstKind] -> ShowS
InstKind -> String
(Int -> InstKind -> ShowS)
-> (InstKind -> String) -> ([InstKind] -> ShowS) -> Show InstKind
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstKind] -> ShowS
$cshowList :: [InstKind] -> ShowS
show :: InstKind -> String
$cshow :: InstKind -> String
showsPrec :: Int -> InstKind -> ShowS
$cshowsPrec :: Int -> InstKind -> ShowS
Show, InstKind -> InstKind -> Bool
(InstKind -> InstKind -> Bool)
-> (InstKind -> InstKind -> Bool) -> Eq InstKind
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstKind -> InstKind -> Bool
$c/= :: InstKind -> InstKind -> Bool
== :: InstKind -> InstKind -> Bool
$c== :: InstKind -> InstKind -> Bool
Eq, Eq InstKind
Eq InstKind =>
(InstKind -> InstKind -> Ordering)
-> (InstKind -> InstKind -> Bool)
-> (InstKind -> InstKind -> Bool)
-> (InstKind -> InstKind -> Bool)
-> (InstKind -> InstKind -> Bool)
-> (InstKind -> InstKind -> InstKind)
-> (InstKind -> InstKind -> InstKind)
-> Ord InstKind
InstKind -> InstKind -> Bool
InstKind -> InstKind -> Ordering
InstKind -> InstKind -> InstKind
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 :: InstKind -> InstKind -> InstKind
$cmin :: InstKind -> InstKind -> InstKind
max :: InstKind -> InstKind -> InstKind
$cmax :: InstKind -> InstKind -> InstKind
>= :: InstKind -> InstKind -> Bool
$c>= :: InstKind -> InstKind -> Bool
> :: InstKind -> InstKind -> Bool
$c> :: InstKind -> InstKind -> Bool
<= :: InstKind -> InstKind -> Bool
$c<= :: InstKind -> InstKind -> Bool
< :: InstKind -> InstKind -> Bool
$c< :: InstKind -> InstKind -> Bool
compare :: InstKind -> InstKind -> Ordering
$ccompare :: InstKind -> InstKind -> Ordering
$cp1Ord :: Eq InstKind
Ord, Typeable, Typeable InstKind
Constr
DataType
Typeable InstKind =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> InstKind -> c InstKind)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c InstKind)
-> (InstKind -> Constr)
-> (InstKind -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c InstKind))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InstKind))
-> ((forall b. Data b => b -> b) -> InstKind -> InstKind)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> InstKind -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> InstKind -> r)
-> (forall u. (forall d. Data d => d -> u) -> InstKind -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> InstKind -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> InstKind -> m InstKind)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> InstKind -> m InstKind)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> InstKind -> m InstKind)
-> Data InstKind
InstKind -> Constr
InstKind -> DataType
(forall b. Data b => b -> b) -> InstKind -> InstKind
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> InstKind -> c InstKind
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c InstKind
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> InstKind -> u
forall u. (forall d. Data d => d -> u) -> InstKind -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> InstKind -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> InstKind -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> InstKind -> m InstKind
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> InstKind -> m InstKind
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c InstKind
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> InstKind -> c InstKind
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c InstKind)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InstKind)
$cInfer :: Constr
$cUserGiven :: Constr
$tInstKind :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> InstKind -> m InstKind
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> InstKind -> m InstKind
gmapMp :: (forall d. Data d => d -> m d) -> InstKind -> m InstKind
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> InstKind -> m InstKind
gmapM :: (forall d. Data d => d -> m d) -> InstKind -> m InstKind
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> InstKind -> m InstKind
gmapQi :: Int -> (forall d. Data d => d -> u) -> InstKind -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> InstKind -> u
gmapQ :: (forall d. Data d => d -> u) -> InstKind -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> InstKind -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> InstKind -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> InstKind -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> InstKind -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> InstKind -> r
gmapT :: (forall b. Data b => b -> b) -> InstKind -> InstKind
$cgmapT :: (forall b. Data b => b -> b) -> InstKind -> InstKind
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InstKind)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InstKind)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c InstKind)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c InstKind)
dataTypeOf :: InstKind -> DataType
$cdataTypeOf :: InstKind -> DataType
toConstr :: InstKind -> Constr
$ctoConstr :: InstKind -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c InstKind
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c InstKind
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> InstKind -> c InstKind
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> InstKind -> c InstKind
$cp1Data :: Typeable InstKind
Data)

{- | The possible terms and patterns. Formulas are also kept as
terms. Local variables and constants are kept separatetly. The variant
'ResolvedMixTerm' is an intermediate representation for type checking
only. -}
data Term =
    QualVar VarDecl
    -- pos "(", "var", ":", ")"
  | QualOp OpBrand PolyId TypeScheme [Type] InstKind Range
  -- pos "(", "op", ":", ")"
  | ApplTerm Term Term Range  {- analysed
  pos? -}
  | TupleTerm [Term] Range    {- special application
  pos "(", ","s, ")" -}
  | TypedTerm Term TypeQual Type Range
  -- pos ":", "as" or "in"
  | AsPattern VarDecl Term Range
  {- pos "@"
  patterns are terms constructed by the first six variants -}
  | QuantifiedTerm Quantifier [GenVarDecl] Term Range
  {- pos quantifier, ";"s, dot
  only "forall" may have a TypeVarDecl -}
  | LambdaTerm [Term] Partiality Term Range
  -- pos "\", dot (plus "!")
  | CaseTerm Term [ProgEq] Range
  -- pos "case", "of", "|"s
  | LetTerm LetBrand [ProgEq] Term Range
  -- pos "where", ";"s
  | ResolvedMixTerm Id [Type] [Term] Range
  | TermToken Token
  | MixTypeTerm TypeQual Type Range
  | MixfixTerm [Term]
  | BracketTerm BracketKind [Term] Range
    -- pos brackets, ","s
    deriving (Int -> Term -> ShowS
[Term] -> ShowS
Term -> String
(Int -> Term -> ShowS)
-> (Term -> String) -> ([Term] -> ShowS) -> Show Term
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Term] -> ShowS
$cshowList :: [Term] -> ShowS
show :: Term -> String
$cshow :: Term -> String
showsPrec :: Int -> Term -> ShowS
$cshowsPrec :: Int -> Term -> ShowS
Show, Term -> Term -> Bool
(Term -> Term -> Bool) -> (Term -> Term -> Bool) -> Eq Term
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Term -> Term -> Bool
$c/= :: Term -> Term -> Bool
== :: Term -> Term -> Bool
$c== :: Term -> Term -> Bool
Eq, Eq Term
Eq Term =>
(Term -> Term -> Ordering)
-> (Term -> Term -> Bool)
-> (Term -> Term -> Bool)
-> (Term -> Term -> Bool)
-> (Term -> Term -> Bool)
-> (Term -> Term -> Term)
-> (Term -> Term -> Term)
-> Ord Term
Term -> Term -> Bool
Term -> Term -> Ordering
Term -> Term -> Term
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 :: Term -> Term -> Term
$cmin :: Term -> Term -> Term
max :: Term -> Term -> Term
$cmax :: Term -> Term -> Term
>= :: Term -> Term -> Bool
$c>= :: Term -> Term -> Bool
> :: Term -> Term -> Bool
$c> :: Term -> Term -> Bool
<= :: Term -> Term -> Bool
$c<= :: Term -> Term -> Bool
< :: Term -> Term -> Bool
$c< :: Term -> Term -> Bool
compare :: Term -> Term -> Ordering
$ccompare :: Term -> Term -> Ordering
$cp1Ord :: Eq Term
Ord, Typeable, Typeable Term
Constr
DataType
Typeable Term =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Term -> c Term)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Term)
-> (Term -> Constr)
-> (Term -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Term))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Term))
-> ((forall b. Data b => b -> b) -> Term -> Term)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Term -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Term -> r)
-> (forall u. (forall d. Data d => d -> u) -> Term -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Term -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Term -> m Term)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Term -> m Term)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Term -> m Term)
-> Data Term
Term -> Constr
Term -> DataType
(forall b. Data b => b -> b) -> Term -> Term
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Term -> c Term
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Term
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Term -> u
forall u. (forall d. Data d => d -> u) -> Term -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Term -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Term -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Term -> m Term
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Term -> m Term
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Term
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Term -> c Term
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Term)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Term)
$cBracketTerm :: Constr
$cMixfixTerm :: Constr
$cMixTypeTerm :: Constr
$cTermToken :: Constr
$cResolvedMixTerm :: Constr
$cLetTerm :: Constr
$cCaseTerm :: Constr
$cLambdaTerm :: Constr
$cQuantifiedTerm :: Constr
$cAsPattern :: Constr
$cTypedTerm :: Constr
$cTupleTerm :: Constr
$cApplTerm :: Constr
$cQualOp :: Constr
$cQualVar :: Constr
$tTerm :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Term -> m Term
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Term -> m Term
gmapMp :: (forall d. Data d => d -> m d) -> Term -> m Term
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Term -> m Term
gmapM :: (forall d. Data d => d -> m d) -> Term -> m Term
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Term -> m Term
gmapQi :: Int -> (forall d. Data d => d -> u) -> Term -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Term -> u
gmapQ :: (forall d. Data d => d -> u) -> Term -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Term -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Term -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Term -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Term -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Term -> r
gmapT :: (forall b. Data b => b -> b) -> Term -> Term
$cgmapT :: (forall b. Data b => b -> b) -> Term -> Term
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Term)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Term)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Term)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Term)
dataTypeOf :: Term -> DataType
$cdataTypeOf :: Term -> DataType
toConstr :: Term -> Constr
$ctoConstr :: Term -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Term
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Term
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Term -> c Term
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Term -> c Term
$cp1Data :: Typeable Term
Data)

-- | an equation or a case as pair of a pattern and a term
data ProgEq = ProgEq Term Term Range deriving (Int -> ProgEq -> ShowS
[ProgEq] -> ShowS
ProgEq -> String
(Int -> ProgEq -> ShowS)
-> (ProgEq -> String) -> ([ProgEq] -> ShowS) -> Show ProgEq
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProgEq] -> ShowS
$cshowList :: [ProgEq] -> ShowS
show :: ProgEq -> String
$cshow :: ProgEq -> String
showsPrec :: Int -> ProgEq -> ShowS
$cshowsPrec :: Int -> ProgEq -> ShowS
Show, ProgEq -> ProgEq -> Bool
(ProgEq -> ProgEq -> Bool)
-> (ProgEq -> ProgEq -> Bool) -> Eq ProgEq
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProgEq -> ProgEq -> Bool
$c/= :: ProgEq -> ProgEq -> Bool
== :: ProgEq -> ProgEq -> Bool
$c== :: ProgEq -> ProgEq -> Bool
Eq, Eq ProgEq
Eq ProgEq =>
(ProgEq -> ProgEq -> Ordering)
-> (ProgEq -> ProgEq -> Bool)
-> (ProgEq -> ProgEq -> Bool)
-> (ProgEq -> ProgEq -> Bool)
-> (ProgEq -> ProgEq -> Bool)
-> (ProgEq -> ProgEq -> ProgEq)
-> (ProgEq -> ProgEq -> ProgEq)
-> Ord ProgEq
ProgEq -> ProgEq -> Bool
ProgEq -> ProgEq -> Ordering
ProgEq -> ProgEq -> ProgEq
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 :: ProgEq -> ProgEq -> ProgEq
$cmin :: ProgEq -> ProgEq -> ProgEq
max :: ProgEq -> ProgEq -> ProgEq
$cmax :: ProgEq -> ProgEq -> ProgEq
>= :: ProgEq -> ProgEq -> Bool
$c>= :: ProgEq -> ProgEq -> Bool
> :: ProgEq -> ProgEq -> Bool
$c> :: ProgEq -> ProgEq -> Bool
<= :: ProgEq -> ProgEq -> Bool
$c<= :: ProgEq -> ProgEq -> Bool
< :: ProgEq -> ProgEq -> Bool
$c< :: ProgEq -> ProgEq -> Bool
compare :: ProgEq -> ProgEq -> Ordering
$ccompare :: ProgEq -> ProgEq -> Ordering
$cp1Ord :: Eq ProgEq
Ord, Typeable, Typeable ProgEq
Constr
DataType
Typeable ProgEq =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> ProgEq -> c ProgEq)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ProgEq)
-> (ProgEq -> Constr)
-> (ProgEq -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ProgEq))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ProgEq))
-> ((forall b. Data b => b -> b) -> ProgEq -> ProgEq)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ProgEq -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ProgEq -> r)
-> (forall u. (forall d. Data d => d -> u) -> ProgEq -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> ProgEq -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> ProgEq -> m ProgEq)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ProgEq -> m ProgEq)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ProgEq -> m ProgEq)
-> Data ProgEq
ProgEq -> Constr
ProgEq -> DataType
(forall b. Data b => b -> b) -> ProgEq -> ProgEq
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProgEq -> c ProgEq
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProgEq
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ProgEq -> u
forall u. (forall d. Data d => d -> u) -> ProgEq -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ProgEq -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ProgEq -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ProgEq -> m ProgEq
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ProgEq -> m ProgEq
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProgEq
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProgEq -> c ProgEq
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProgEq)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ProgEq)
$cProgEq :: Constr
$tProgEq :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> ProgEq -> m ProgEq
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ProgEq -> m ProgEq
gmapMp :: (forall d. Data d => d -> m d) -> ProgEq -> m ProgEq
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ProgEq -> m ProgEq
gmapM :: (forall d. Data d => d -> m d) -> ProgEq -> m ProgEq
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ProgEq -> m ProgEq
gmapQi :: Int -> (forall d. Data d => d -> u) -> ProgEq -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ProgEq -> u
gmapQ :: (forall d. Data d => d -> u) -> ProgEq -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ProgEq -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ProgEq -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ProgEq -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ProgEq -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ProgEq -> r
gmapT :: (forall b. Data b => b -> b) -> ProgEq -> ProgEq
$cgmapT :: (forall b. Data b => b -> b) -> ProgEq -> ProgEq
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ProgEq)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ProgEq)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c ProgEq)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ProgEq)
dataTypeOf :: ProgEq -> DataType
$cdataTypeOf :: ProgEq -> DataType
toConstr :: ProgEq -> Constr
$ctoConstr :: ProgEq -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProgEq
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ProgEq
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProgEq -> c ProgEq
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ProgEq -> c ProgEq
$cp1Data :: Typeable ProgEq
Data)
            -- pos "=" (or "->" following case-of)

-- | an identifier with an optional list of type declarations
data PolyId = PolyId Id [TypeArg] Range deriving (Int -> PolyId -> ShowS
[PolyId] -> ShowS
PolyId -> String
(Int -> PolyId -> ShowS)
-> (PolyId -> String) -> ([PolyId] -> ShowS) -> Show PolyId
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PolyId] -> ShowS
$cshowList :: [PolyId] -> ShowS
show :: PolyId -> String
$cshow :: PolyId -> String
showsPrec :: Int -> PolyId -> ShowS
$cshowsPrec :: Int -> PolyId -> ShowS
Show, PolyId -> PolyId -> Bool
(PolyId -> PolyId -> Bool)
-> (PolyId -> PolyId -> Bool) -> Eq PolyId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PolyId -> PolyId -> Bool
$c/= :: PolyId -> PolyId -> Bool
== :: PolyId -> PolyId -> Bool
$c== :: PolyId -> PolyId -> Bool
Eq, Eq PolyId
Eq PolyId =>
(PolyId -> PolyId -> Ordering)
-> (PolyId -> PolyId -> Bool)
-> (PolyId -> PolyId -> Bool)
-> (PolyId -> PolyId -> Bool)
-> (PolyId -> PolyId -> Bool)
-> (PolyId -> PolyId -> PolyId)
-> (PolyId -> PolyId -> PolyId)
-> Ord PolyId
PolyId -> PolyId -> Bool
PolyId -> PolyId -> Ordering
PolyId -> PolyId -> PolyId
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 :: PolyId -> PolyId -> PolyId
$cmin :: PolyId -> PolyId -> PolyId
max :: PolyId -> PolyId -> PolyId
$cmax :: PolyId -> PolyId -> PolyId
>= :: PolyId -> PolyId -> Bool
$c>= :: PolyId -> PolyId -> Bool
> :: PolyId -> PolyId -> Bool
$c> :: PolyId -> PolyId -> Bool
<= :: PolyId -> PolyId -> Bool
$c<= :: PolyId -> PolyId -> Bool
< :: PolyId -> PolyId -> Bool
$c< :: PolyId -> PolyId -> Bool
compare :: PolyId -> PolyId -> Ordering
$ccompare :: PolyId -> PolyId -> Ordering
$cp1Ord :: Eq PolyId
Ord, Typeable, Typeable PolyId
Constr
DataType
Typeable PolyId =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> PolyId -> c PolyId)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c PolyId)
-> (PolyId -> Constr)
-> (PolyId -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c PolyId))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PolyId))
-> ((forall b. Data b => b -> b) -> PolyId -> PolyId)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> PolyId -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> PolyId -> r)
-> (forall u. (forall d. Data d => d -> u) -> PolyId -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> PolyId -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> PolyId -> m PolyId)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> PolyId -> m PolyId)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> PolyId -> m PolyId)
-> Data PolyId
PolyId -> Constr
PolyId -> DataType
(forall b. Data b => b -> b) -> PolyId -> PolyId
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PolyId -> c PolyId
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PolyId
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> PolyId -> u
forall u. (forall d. Data d => d -> u) -> PolyId -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PolyId -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PolyId -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> PolyId -> m PolyId
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PolyId -> m PolyId
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PolyId
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PolyId -> c PolyId
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PolyId)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PolyId)
$cPolyId :: Constr
$tPolyId :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> PolyId -> m PolyId
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PolyId -> m PolyId
gmapMp :: (forall d. Data d => d -> m d) -> PolyId -> m PolyId
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PolyId -> m PolyId
gmapM :: (forall d. Data d => d -> m d) -> PolyId -> m PolyId
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> PolyId -> m PolyId
gmapQi :: Int -> (forall d. Data d => d -> u) -> PolyId -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> PolyId -> u
gmapQ :: (forall d. Data d => d -> u) -> PolyId -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> PolyId -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PolyId -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PolyId -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PolyId -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PolyId -> r
gmapT :: (forall b. Data b => b -> b) -> PolyId -> PolyId
$cgmapT :: (forall b. Data b => b -> b) -> PolyId -> PolyId
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PolyId)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PolyId)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c PolyId)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PolyId)
dataTypeOf :: PolyId -> DataType
$cdataTypeOf :: PolyId -> DataType
toConstr :: PolyId -> Constr
$ctoConstr :: PolyId -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PolyId
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PolyId
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PolyId -> c PolyId
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PolyId -> c PolyId
$cp1Data :: Typeable PolyId
Data)
              -- pos "[", ",", "]"

{- | an indicator if variables were separated by commas or by separate
declarations -}
data SeparatorKind = Comma | Other deriving (Int -> SeparatorKind -> ShowS
[SeparatorKind] -> ShowS
SeparatorKind -> String
(Int -> SeparatorKind -> ShowS)
-> (SeparatorKind -> String)
-> ([SeparatorKind] -> ShowS)
-> Show SeparatorKind
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SeparatorKind] -> ShowS
$cshowList :: [SeparatorKind] -> ShowS
show :: SeparatorKind -> String
$cshow :: SeparatorKind -> String
showsPrec :: Int -> SeparatorKind -> ShowS
$cshowsPrec :: Int -> SeparatorKind -> ShowS
Show, Typeable, Typeable SeparatorKind
Constr
DataType
Typeable SeparatorKind =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> SeparatorKind -> c SeparatorKind)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c SeparatorKind)
-> (SeparatorKind -> Constr)
-> (SeparatorKind -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c SeparatorKind))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c SeparatorKind))
-> ((forall b. Data b => b -> b) -> SeparatorKind -> SeparatorKind)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SeparatorKind -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SeparatorKind -> r)
-> (forall u. (forall d. Data d => d -> u) -> SeparatorKind -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> SeparatorKind -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> SeparatorKind -> m SeparatorKind)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SeparatorKind -> m SeparatorKind)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SeparatorKind -> m SeparatorKind)
-> Data SeparatorKind
SeparatorKind -> Constr
SeparatorKind -> DataType
(forall b. Data b => b -> b) -> SeparatorKind -> SeparatorKind
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SeparatorKind -> c SeparatorKind
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SeparatorKind
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> SeparatorKind -> u
forall u. (forall d. Data d => d -> u) -> SeparatorKind -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SeparatorKind -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SeparatorKind -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SeparatorKind -> m SeparatorKind
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SeparatorKind -> m SeparatorKind
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SeparatorKind
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SeparatorKind -> c SeparatorKind
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SeparatorKind)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SeparatorKind)
$cOther :: Constr
$cComma :: Constr
$tSeparatorKind :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> SeparatorKind -> m SeparatorKind
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SeparatorKind -> m SeparatorKind
gmapMp :: (forall d. Data d => d -> m d) -> SeparatorKind -> m SeparatorKind
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SeparatorKind -> m SeparatorKind
gmapM :: (forall d. Data d => d -> m d) -> SeparatorKind -> m SeparatorKind
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SeparatorKind -> m SeparatorKind
gmapQi :: Int -> (forall d. Data d => d -> u) -> SeparatorKind -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SeparatorKind -> u
gmapQ :: (forall d. Data d => d -> u) -> SeparatorKind -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SeparatorKind -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SeparatorKind -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SeparatorKind -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SeparatorKind -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SeparatorKind -> r
gmapT :: (forall b. Data b => b -> b) -> SeparatorKind -> SeparatorKind
$cgmapT :: (forall b. Data b => b -> b) -> SeparatorKind -> SeparatorKind
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SeparatorKind)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SeparatorKind)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c SeparatorKind)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SeparatorKind)
dataTypeOf :: SeparatorKind -> DataType
$cdataTypeOf :: SeparatorKind -> DataType
toConstr :: SeparatorKind -> Constr
$ctoConstr :: SeparatorKind -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SeparatorKind
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SeparatorKind
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SeparatorKind -> c SeparatorKind
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SeparatorKind -> c SeparatorKind
$cp1Data :: Typeable SeparatorKind
Data)

-- ignore all separator kinds in comparisons
instance Eq SeparatorKind where
    _ == :: SeparatorKind -> SeparatorKind -> Bool
== _ = Bool
True

-- Ord must be consistent with Eq
instance Ord SeparatorKind where
   compare :: SeparatorKind -> SeparatorKind -> Ordering
compare _ _ = Ordering
EQ

-- | a variable with its type
data VarDecl = VarDecl Id Type SeparatorKind Range
  deriving (Int -> VarDecl -> ShowS
[VarDecl] -> ShowS
VarDecl -> String
(Int -> VarDecl -> ShowS)
-> (VarDecl -> String) -> ([VarDecl] -> ShowS) -> Show VarDecl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VarDecl] -> ShowS
$cshowList :: [VarDecl] -> ShowS
show :: VarDecl -> String
$cshow :: VarDecl -> String
showsPrec :: Int -> VarDecl -> ShowS
$cshowsPrec :: Int -> VarDecl -> ShowS
Show, VarDecl -> VarDecl -> Bool
(VarDecl -> VarDecl -> Bool)
-> (VarDecl -> VarDecl -> Bool) -> Eq VarDecl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VarDecl -> VarDecl -> Bool
$c/= :: VarDecl -> VarDecl -> Bool
== :: VarDecl -> VarDecl -> Bool
$c== :: VarDecl -> VarDecl -> Bool
Eq, Eq VarDecl
Eq VarDecl =>
(VarDecl -> VarDecl -> Ordering)
-> (VarDecl -> VarDecl -> Bool)
-> (VarDecl -> VarDecl -> Bool)
-> (VarDecl -> VarDecl -> Bool)
-> (VarDecl -> VarDecl -> Bool)
-> (VarDecl -> VarDecl -> VarDecl)
-> (VarDecl -> VarDecl -> VarDecl)
-> Ord VarDecl
VarDecl -> VarDecl -> Bool
VarDecl -> VarDecl -> Ordering
VarDecl -> VarDecl -> VarDecl
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 :: VarDecl -> VarDecl -> VarDecl
$cmin :: VarDecl -> VarDecl -> VarDecl
max :: VarDecl -> VarDecl -> VarDecl
$cmax :: VarDecl -> VarDecl -> VarDecl
>= :: VarDecl -> VarDecl -> Bool
$c>= :: VarDecl -> VarDecl -> Bool
> :: VarDecl -> VarDecl -> Bool
$c> :: VarDecl -> VarDecl -> Bool
<= :: VarDecl -> VarDecl -> Bool
$c<= :: VarDecl -> VarDecl -> Bool
< :: VarDecl -> VarDecl -> Bool
$c< :: VarDecl -> VarDecl -> Bool
compare :: VarDecl -> VarDecl -> Ordering
$ccompare :: VarDecl -> VarDecl -> Ordering
$cp1Ord :: Eq VarDecl
Ord, Typeable, Typeable VarDecl
Constr
DataType
Typeable VarDecl =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> VarDecl -> c VarDecl)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c VarDecl)
-> (VarDecl -> Constr)
-> (VarDecl -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c VarDecl))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c VarDecl))
-> ((forall b. Data b => b -> b) -> VarDecl -> VarDecl)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> VarDecl -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> VarDecl -> r)
-> (forall u. (forall d. Data d => d -> u) -> VarDecl -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> VarDecl -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> VarDecl -> m VarDecl)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> VarDecl -> m VarDecl)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> VarDecl -> m VarDecl)
-> Data VarDecl
VarDecl -> Constr
VarDecl -> DataType
(forall b. Data b => b -> b) -> VarDecl -> VarDecl
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> VarDecl -> c VarDecl
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c VarDecl
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> VarDecl -> u
forall u. (forall d. Data d => d -> u) -> VarDecl -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> VarDecl -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> VarDecl -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> VarDecl -> m VarDecl
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> VarDecl -> m VarDecl
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c VarDecl
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> VarDecl -> c VarDecl
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c VarDecl)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c VarDecl)
$cVarDecl :: Constr
$tVarDecl :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> VarDecl -> m VarDecl
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> VarDecl -> m VarDecl
gmapMp :: (forall d. Data d => d -> m d) -> VarDecl -> m VarDecl
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> VarDecl -> m VarDecl
gmapM :: (forall d. Data d => d -> m d) -> VarDecl -> m VarDecl
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> VarDecl -> m VarDecl
gmapQi :: Int -> (forall d. Data d => d -> u) -> VarDecl -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> VarDecl -> u
gmapQ :: (forall d. Data d => d -> u) -> VarDecl -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> VarDecl -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> VarDecl -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> VarDecl -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> VarDecl -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> VarDecl -> r
gmapT :: (forall b. Data b => b -> b) -> VarDecl -> VarDecl
$cgmapT :: (forall b. Data b => b -> b) -> VarDecl -> VarDecl
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c VarDecl)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c VarDecl)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c VarDecl)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c VarDecl)
dataTypeOf :: VarDecl -> DataType
$cdataTypeOf :: VarDecl -> DataType
toConstr :: VarDecl -> Constr
$ctoConstr :: VarDecl -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c VarDecl
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c VarDecl
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> VarDecl -> c VarDecl
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> VarDecl -> c VarDecl
$cp1Data :: Typeable VarDecl
Data)
               -- pos "," or ":"

-- | the kind of a type variable (or a type argument in schemes)
data VarKind = VarKind Kind | Downset Type | MissingKind
 deriving (Int -> VarKind -> ShowS
[VarKind] -> ShowS
VarKind -> String
(Int -> VarKind -> ShowS)
-> (VarKind -> String) -> ([VarKind] -> ShowS) -> Show VarKind
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VarKind] -> ShowS
$cshowList :: [VarKind] -> ShowS
show :: VarKind -> String
$cshow :: VarKind -> String
showsPrec :: Int -> VarKind -> ShowS
$cshowsPrec :: Int -> VarKind -> ShowS
Show, VarKind -> VarKind -> Bool
(VarKind -> VarKind -> Bool)
-> (VarKind -> VarKind -> Bool) -> Eq VarKind
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VarKind -> VarKind -> Bool
$c/= :: VarKind -> VarKind -> Bool
== :: VarKind -> VarKind -> Bool
$c== :: VarKind -> VarKind -> Bool
Eq, Eq VarKind
Eq VarKind =>
(VarKind -> VarKind -> Ordering)
-> (VarKind -> VarKind -> Bool)
-> (VarKind -> VarKind -> Bool)
-> (VarKind -> VarKind -> Bool)
-> (VarKind -> VarKind -> Bool)
-> (VarKind -> VarKind -> VarKind)
-> (VarKind -> VarKind -> VarKind)
-> Ord VarKind
VarKind -> VarKind -> Bool
VarKind -> VarKind -> Ordering
VarKind -> VarKind -> VarKind
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 :: VarKind -> VarKind -> VarKind
$cmin :: VarKind -> VarKind -> VarKind
max :: VarKind -> VarKind -> VarKind
$cmax :: VarKind -> VarKind -> VarKind
>= :: VarKind -> VarKind -> Bool
$c>= :: VarKind -> VarKind -> Bool
> :: VarKind -> VarKind -> Bool
$c> :: VarKind -> VarKind -> Bool
<= :: VarKind -> VarKind -> Bool
$c<= :: VarKind -> VarKind -> Bool
< :: VarKind -> VarKind -> Bool
$c< :: VarKind -> VarKind -> Bool
compare :: VarKind -> VarKind -> Ordering
$ccompare :: VarKind -> VarKind -> Ordering
$cp1Ord :: Eq VarKind
Ord, Typeable, Typeable VarKind
Constr
DataType
Typeable VarKind =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> VarKind -> c VarKind)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c VarKind)
-> (VarKind -> Constr)
-> (VarKind -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c VarKind))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c VarKind))
-> ((forall b. Data b => b -> b) -> VarKind -> VarKind)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> VarKind -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> VarKind -> r)
-> (forall u. (forall d. Data d => d -> u) -> VarKind -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> VarKind -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> VarKind -> m VarKind)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> VarKind -> m VarKind)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> VarKind -> m VarKind)
-> Data VarKind
VarKind -> Constr
VarKind -> DataType
(forall b. Data b => b -> b) -> VarKind -> VarKind
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> VarKind -> c VarKind
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c VarKind
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> VarKind -> u
forall u. (forall d. Data d => d -> u) -> VarKind -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> VarKind -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> VarKind -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> VarKind -> m VarKind
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> VarKind -> m VarKind
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c VarKind
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> VarKind -> c VarKind
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c VarKind)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c VarKind)
$cMissingKind :: Constr
$cDownset :: Constr
$cVarKind :: Constr
$tVarKind :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> VarKind -> m VarKind
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> VarKind -> m VarKind
gmapMp :: (forall d. Data d => d -> m d) -> VarKind -> m VarKind
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> VarKind -> m VarKind
gmapM :: (forall d. Data d => d -> m d) -> VarKind -> m VarKind
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> VarKind -> m VarKind
gmapQi :: Int -> (forall d. Data d => d -> u) -> VarKind -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> VarKind -> u
gmapQ :: (forall d. Data d => d -> u) -> VarKind -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> VarKind -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> VarKind -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> VarKind -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> VarKind -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> VarKind -> r
gmapT :: (forall b. Data b => b -> b) -> VarKind -> VarKind
$cgmapT :: (forall b. Data b => b -> b) -> VarKind -> VarKind
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c VarKind)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c VarKind)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c VarKind)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c VarKind)
dataTypeOf :: VarKind -> DataType
$cdataTypeOf :: VarKind -> DataType
toConstr :: VarKind -> Constr
$ctoConstr :: VarKind -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c VarKind
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c VarKind
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> VarKind -> c VarKind
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> VarKind -> c VarKind
$cp1Data :: Typeable VarKind
Data)

-- | a (simple) type variable with its kind (or supertype)
data TypeArg =
    TypeArg Id Variance VarKind RawKind Int SeparatorKind Range
    -- pos "," or ":", "+" or "-"
    deriving (Int -> TypeArg -> ShowS
[TypeArg] -> ShowS
TypeArg -> String
(Int -> TypeArg -> ShowS)
-> (TypeArg -> String) -> ([TypeArg] -> ShowS) -> Show TypeArg
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TypeArg] -> ShowS
$cshowList :: [TypeArg] -> ShowS
show :: TypeArg -> String
$cshow :: TypeArg -> String
showsPrec :: Int -> TypeArg -> ShowS
$cshowsPrec :: Int -> TypeArg -> ShowS
Show, Typeable, Typeable TypeArg
Constr
DataType
Typeable TypeArg =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> TypeArg -> c TypeArg)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c TypeArg)
-> (TypeArg -> Constr)
-> (TypeArg -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c TypeArg))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeArg))
-> ((forall b. Data b => b -> b) -> TypeArg -> TypeArg)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> TypeArg -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> TypeArg -> r)
-> (forall u. (forall d. Data d => d -> u) -> TypeArg -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> TypeArg -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> TypeArg -> m TypeArg)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> TypeArg -> m TypeArg)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> TypeArg -> m TypeArg)
-> Data TypeArg
TypeArg -> Constr
TypeArg -> DataType
(forall b. Data b => b -> b) -> TypeArg -> TypeArg
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TypeArg -> c TypeArg
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TypeArg
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> TypeArg -> u
forall u. (forall d. Data d => d -> u) -> TypeArg -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TypeArg -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TypeArg -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TypeArg -> m TypeArg
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TypeArg -> m TypeArg
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TypeArg
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TypeArg -> c TypeArg
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TypeArg)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeArg)
$cTypeArg :: Constr
$tTypeArg :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> TypeArg -> m TypeArg
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TypeArg -> m TypeArg
gmapMp :: (forall d. Data d => d -> m d) -> TypeArg -> m TypeArg
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TypeArg -> m TypeArg
gmapM :: (forall d. Data d => d -> m d) -> TypeArg -> m TypeArg
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TypeArg -> m TypeArg
gmapQi :: Int -> (forall d. Data d => d -> u) -> TypeArg -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TypeArg -> u
gmapQ :: (forall d. Data d => d -> u) -> TypeArg -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> TypeArg -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TypeArg -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TypeArg -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TypeArg -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TypeArg -> r
gmapT :: (forall b. Data b => b -> b) -> TypeArg -> TypeArg
$cgmapT :: (forall b. Data b => b -> b) -> TypeArg -> TypeArg
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeArg)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeArg)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c TypeArg)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TypeArg)
dataTypeOf :: TypeArg -> DataType
$cdataTypeOf :: TypeArg -> DataType
toConstr :: TypeArg -> Constr
$ctoConstr :: TypeArg -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TypeArg
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TypeArg
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TypeArg -> c TypeArg
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TypeArg -> c TypeArg
$cp1Data :: Typeable TypeArg
Data)

-- | a value or type variable
data GenVarDecl =
    GenVarDecl VarDecl
  | GenTypeVarDecl TypeArg
    deriving (Int -> GenVarDecl -> ShowS
[GenVarDecl] -> ShowS
GenVarDecl -> String
(Int -> GenVarDecl -> ShowS)
-> (GenVarDecl -> String)
-> ([GenVarDecl] -> ShowS)
-> Show GenVarDecl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GenVarDecl] -> ShowS
$cshowList :: [GenVarDecl] -> ShowS
show :: GenVarDecl -> String
$cshow :: GenVarDecl -> String
showsPrec :: Int -> GenVarDecl -> ShowS
$cshowsPrec :: Int -> GenVarDecl -> ShowS
Show, GenVarDecl -> GenVarDecl -> Bool
(GenVarDecl -> GenVarDecl -> Bool)
-> (GenVarDecl -> GenVarDecl -> Bool) -> Eq GenVarDecl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GenVarDecl -> GenVarDecl -> Bool
$c/= :: GenVarDecl -> GenVarDecl -> Bool
== :: GenVarDecl -> GenVarDecl -> Bool
$c== :: GenVarDecl -> GenVarDecl -> Bool
Eq, Eq GenVarDecl
Eq GenVarDecl =>
(GenVarDecl -> GenVarDecl -> Ordering)
-> (GenVarDecl -> GenVarDecl -> Bool)
-> (GenVarDecl -> GenVarDecl -> Bool)
-> (GenVarDecl -> GenVarDecl -> Bool)
-> (GenVarDecl -> GenVarDecl -> Bool)
-> (GenVarDecl -> GenVarDecl -> GenVarDecl)
-> (GenVarDecl -> GenVarDecl -> GenVarDecl)
-> Ord GenVarDecl
GenVarDecl -> GenVarDecl -> Bool
GenVarDecl -> GenVarDecl -> Ordering
GenVarDecl -> GenVarDecl -> GenVarDecl
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 :: GenVarDecl -> GenVarDecl -> GenVarDecl
$cmin :: GenVarDecl -> GenVarDecl -> GenVarDecl
max :: GenVarDecl -> GenVarDecl -> GenVarDecl
$cmax :: GenVarDecl -> GenVarDecl -> GenVarDecl
>= :: GenVarDecl -> GenVarDecl -> Bool
$c>= :: GenVarDecl -> GenVarDecl -> Bool
> :: GenVarDecl -> GenVarDecl -> Bool
$c> :: GenVarDecl -> GenVarDecl -> Bool
<= :: GenVarDecl -> GenVarDecl -> Bool
$c<= :: GenVarDecl -> GenVarDecl -> Bool
< :: GenVarDecl -> GenVarDecl -> Bool
$c< :: GenVarDecl -> GenVarDecl -> Bool
compare :: GenVarDecl -> GenVarDecl -> Ordering
$ccompare :: GenVarDecl -> GenVarDecl -> Ordering
$cp1Ord :: Eq GenVarDecl
Ord, Typeable, Typeable GenVarDecl
Constr
DataType
Typeable GenVarDecl =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> GenVarDecl -> c GenVarDecl)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c GenVarDecl)
-> (GenVarDecl -> Constr)
-> (GenVarDecl -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c GenVarDecl))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c GenVarDecl))
-> ((forall b. Data b => b -> b) -> GenVarDecl -> GenVarDecl)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> GenVarDecl -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> GenVarDecl -> r)
-> (forall u. (forall d. Data d => d -> u) -> GenVarDecl -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> GenVarDecl -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> GenVarDecl -> m GenVarDecl)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> GenVarDecl -> m GenVarDecl)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> GenVarDecl -> m GenVarDecl)
-> Data GenVarDecl
GenVarDecl -> Constr
GenVarDecl -> DataType
(forall b. Data b => b -> b) -> GenVarDecl -> GenVarDecl
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> GenVarDecl -> c GenVarDecl
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c GenVarDecl
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> GenVarDecl -> u
forall u. (forall d. Data d => d -> u) -> GenVarDecl -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> GenVarDecl -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> GenVarDecl -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> GenVarDecl -> m GenVarDecl
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> GenVarDecl -> m GenVarDecl
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c GenVarDecl
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> GenVarDecl -> c GenVarDecl
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c GenVarDecl)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GenVarDecl)
$cGenTypeVarDecl :: Constr
$cGenVarDecl :: Constr
$tGenVarDecl :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> GenVarDecl -> m GenVarDecl
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> GenVarDecl -> m GenVarDecl
gmapMp :: (forall d. Data d => d -> m d) -> GenVarDecl -> m GenVarDecl
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> GenVarDecl -> m GenVarDecl
gmapM :: (forall d. Data d => d -> m d) -> GenVarDecl -> m GenVarDecl
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> GenVarDecl -> m GenVarDecl
gmapQi :: Int -> (forall d. Data d => d -> u) -> GenVarDecl -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> GenVarDecl -> u
gmapQ :: (forall d. Data d => d -> u) -> GenVarDecl -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> GenVarDecl -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> GenVarDecl -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> GenVarDecl -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> GenVarDecl -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> GenVarDecl -> r
gmapT :: (forall b. Data b => b -> b) -> GenVarDecl -> GenVarDecl
$cgmapT :: (forall b. Data b => b -> b) -> GenVarDecl -> GenVarDecl
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GenVarDecl)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GenVarDecl)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c GenVarDecl)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c GenVarDecl)
dataTypeOf :: GenVarDecl -> DataType
$cdataTypeOf :: GenVarDecl -> DataType
toConstr :: GenVarDecl -> Constr
$ctoConstr :: GenVarDecl -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c GenVarDecl
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c GenVarDecl
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> GenVarDecl -> c GenVarDecl
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> GenVarDecl -> c GenVarDecl
$cp1Data :: Typeable GenVarDecl
Data)

{- * symbol data types
symbols -}
data SymbItems =
    SymbItems SymbKind [Symb] [Annotation] Range
  deriving (Int -> SymbItems -> ShowS
[SymbItems] -> ShowS
SymbItems -> String
(Int -> SymbItems -> ShowS)
-> (SymbItems -> String)
-> ([SymbItems] -> ShowS)
-> Show SymbItems
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SymbItems] -> ShowS
$cshowList :: [SymbItems] -> ShowS
show :: SymbItems -> String
$cshow :: SymbItems -> String
showsPrec :: Int -> SymbItems -> ShowS
$cshowsPrec :: Int -> SymbItems -> ShowS
Show, SymbItems -> SymbItems -> Bool
(SymbItems -> SymbItems -> Bool)
-> (SymbItems -> SymbItems -> Bool) -> Eq SymbItems
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SymbItems -> SymbItems -> Bool
$c/= :: SymbItems -> SymbItems -> Bool
== :: SymbItems -> SymbItems -> Bool
$c== :: SymbItems -> SymbItems -> Bool
Eq, Eq SymbItems
Eq SymbItems =>
(SymbItems -> SymbItems -> Ordering)
-> (SymbItems -> SymbItems -> Bool)
-> (SymbItems -> SymbItems -> Bool)
-> (SymbItems -> SymbItems -> Bool)
-> (SymbItems -> SymbItems -> Bool)
-> (SymbItems -> SymbItems -> SymbItems)
-> (SymbItems -> SymbItems -> SymbItems)
-> Ord SymbItems
SymbItems -> SymbItems -> Bool
SymbItems -> SymbItems -> Ordering
SymbItems -> SymbItems -> SymbItems
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 :: SymbItems -> SymbItems -> SymbItems
$cmin :: SymbItems -> SymbItems -> SymbItems
max :: SymbItems -> SymbItems -> SymbItems
$cmax :: SymbItems -> SymbItems -> SymbItems
>= :: SymbItems -> SymbItems -> Bool
$c>= :: SymbItems -> SymbItems -> Bool
> :: SymbItems -> SymbItems -> Bool
$c> :: SymbItems -> SymbItems -> Bool
<= :: SymbItems -> SymbItems -> Bool
$c<= :: SymbItems -> SymbItems -> Bool
< :: SymbItems -> SymbItems -> Bool
$c< :: SymbItems -> SymbItems -> Bool
compare :: SymbItems -> SymbItems -> Ordering
$ccompare :: SymbItems -> SymbItems -> Ordering
$cp1Ord :: Eq SymbItems
Ord, Typeable, Typeable SymbItems
Constr
DataType
Typeable SymbItems =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> SymbItems -> c SymbItems)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c SymbItems)
-> (SymbItems -> Constr)
-> (SymbItems -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c SymbItems))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SymbItems))
-> ((forall b. Data b => b -> b) -> SymbItems -> SymbItems)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SymbItems -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SymbItems -> r)
-> (forall u. (forall d. Data d => d -> u) -> SymbItems -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> SymbItems -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> SymbItems -> m SymbItems)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SymbItems -> m SymbItems)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SymbItems -> m SymbItems)
-> Data SymbItems
SymbItems -> Constr
SymbItems -> DataType
(forall b. Data b => b -> b) -> SymbItems -> SymbItems
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SymbItems -> c SymbItems
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymbItems
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> SymbItems -> u
forall u. (forall d. Data d => d -> u) -> SymbItems -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymbItems -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SymbItems -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SymbItems -> m SymbItems
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SymbItems -> m SymbItems
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymbItems
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SymbItems -> c SymbItems
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SymbItems)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SymbItems)
$cSymbItems :: Constr
$tSymbItems :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> SymbItems -> m SymbItems
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SymbItems -> m SymbItems
gmapMp :: (forall d. Data d => d -> m d) -> SymbItems -> m SymbItems
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SymbItems -> m SymbItems
gmapM :: (forall d. Data d => d -> m d) -> SymbItems -> m SymbItems
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SymbItems -> m SymbItems
gmapQi :: Int -> (forall d. Data d => d -> u) -> SymbItems -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SymbItems -> u
gmapQ :: (forall d. Data d => d -> u) -> SymbItems -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SymbItems -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SymbItems -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SymbItems -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymbItems -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymbItems -> r
gmapT :: (forall b. Data b => b -> b) -> SymbItems -> SymbItems
$cgmapT :: (forall b. Data b => b -> b) -> SymbItems -> SymbItems
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SymbItems)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SymbItems)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c SymbItems)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SymbItems)
dataTypeOf :: SymbItems -> DataType
$cdataTypeOf :: SymbItems -> DataType
toConstr :: SymbItems -> Constr
$ctoConstr :: SymbItems -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymbItems
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymbItems
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SymbItems -> c SymbItems
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SymbItems -> c SymbItems
$cp1Data :: Typeable SymbItems
Data)
    -- pos: kind, commas

-- | mapped symbols
data SymbMapItems =
    SymbMapItems SymbKind [SymbOrMap] [Annotation] Range
  deriving (Int -> SymbMapItems -> ShowS
[SymbMapItems] -> ShowS
SymbMapItems -> String
(Int -> SymbMapItems -> ShowS)
-> (SymbMapItems -> String)
-> ([SymbMapItems] -> ShowS)
-> Show SymbMapItems
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SymbMapItems] -> ShowS
$cshowList :: [SymbMapItems] -> ShowS
show :: SymbMapItems -> String
$cshow :: SymbMapItems -> String
showsPrec :: Int -> SymbMapItems -> ShowS
$cshowsPrec :: Int -> SymbMapItems -> ShowS
Show, SymbMapItems -> SymbMapItems -> Bool
(SymbMapItems -> SymbMapItems -> Bool)
-> (SymbMapItems -> SymbMapItems -> Bool) -> Eq SymbMapItems
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SymbMapItems -> SymbMapItems -> Bool
$c/= :: SymbMapItems -> SymbMapItems -> Bool
== :: SymbMapItems -> SymbMapItems -> Bool
$c== :: SymbMapItems -> SymbMapItems -> Bool
Eq, Eq SymbMapItems
Eq SymbMapItems =>
(SymbMapItems -> SymbMapItems -> Ordering)
-> (SymbMapItems -> SymbMapItems -> Bool)
-> (SymbMapItems -> SymbMapItems -> Bool)
-> (SymbMapItems -> SymbMapItems -> Bool)
-> (SymbMapItems -> SymbMapItems -> Bool)
-> (SymbMapItems -> SymbMapItems -> SymbMapItems)
-> (SymbMapItems -> SymbMapItems -> SymbMapItems)
-> Ord SymbMapItems
SymbMapItems -> SymbMapItems -> Bool
SymbMapItems -> SymbMapItems -> Ordering
SymbMapItems -> SymbMapItems -> SymbMapItems
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 :: SymbMapItems -> SymbMapItems -> SymbMapItems
$cmin :: SymbMapItems -> SymbMapItems -> SymbMapItems
max :: SymbMapItems -> SymbMapItems -> SymbMapItems
$cmax :: SymbMapItems -> SymbMapItems -> SymbMapItems
>= :: SymbMapItems -> SymbMapItems -> Bool
$c>= :: SymbMapItems -> SymbMapItems -> Bool
> :: SymbMapItems -> SymbMapItems -> Bool
$c> :: SymbMapItems -> SymbMapItems -> Bool
<= :: SymbMapItems -> SymbMapItems -> Bool
$c<= :: SymbMapItems -> SymbMapItems -> Bool
< :: SymbMapItems -> SymbMapItems -> Bool
$c< :: SymbMapItems -> SymbMapItems -> Bool
compare :: SymbMapItems -> SymbMapItems -> Ordering
$ccompare :: SymbMapItems -> SymbMapItems -> Ordering
$cp1Ord :: Eq SymbMapItems
Ord, Typeable, Typeable SymbMapItems
Constr
DataType
Typeable SymbMapItems =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> SymbMapItems -> c SymbMapItems)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c SymbMapItems)
-> (SymbMapItems -> Constr)
-> (SymbMapItems -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c SymbMapItems))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c SymbMapItems))
-> ((forall b. Data b => b -> b) -> SymbMapItems -> SymbMapItems)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SymbMapItems -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SymbMapItems -> r)
-> (forall u. (forall d. Data d => d -> u) -> SymbMapItems -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> SymbMapItems -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> SymbMapItems -> m SymbMapItems)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SymbMapItems -> m SymbMapItems)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SymbMapItems -> m SymbMapItems)
-> Data SymbMapItems
SymbMapItems -> Constr
SymbMapItems -> DataType
(forall b. Data b => b -> b) -> SymbMapItems -> SymbMapItems
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SymbMapItems -> c SymbMapItems
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymbMapItems
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> SymbMapItems -> u
forall u. (forall d. Data d => d -> u) -> SymbMapItems -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymbMapItems -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SymbMapItems -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SymbMapItems -> m SymbMapItems
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SymbMapItems -> m SymbMapItems
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymbMapItems
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SymbMapItems -> c SymbMapItems
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SymbMapItems)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SymbMapItems)
$cSymbMapItems :: Constr
$tSymbMapItems :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> SymbMapItems -> m SymbMapItems
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SymbMapItems -> m SymbMapItems
gmapMp :: (forall d. Data d => d -> m d) -> SymbMapItems -> m SymbMapItems
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SymbMapItems -> m SymbMapItems
gmapM :: (forall d. Data d => d -> m d) -> SymbMapItems -> m SymbMapItems
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SymbMapItems -> m SymbMapItems
gmapQi :: Int -> (forall d. Data d => d -> u) -> SymbMapItems -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SymbMapItems -> u
gmapQ :: (forall d. Data d => d -> u) -> SymbMapItems -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SymbMapItems -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SymbMapItems -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SymbMapItems -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymbMapItems -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymbMapItems -> r
gmapT :: (forall b. Data b => b -> b) -> SymbMapItems -> SymbMapItems
$cgmapT :: (forall b. Data b => b -> b) -> SymbMapItems -> SymbMapItems
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SymbMapItems)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SymbMapItems)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c SymbMapItems)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SymbMapItems)
dataTypeOf :: SymbMapItems -> DataType
$cdataTypeOf :: SymbMapItems -> DataType
toConstr :: SymbMapItems -> Constr
$ctoConstr :: SymbMapItems -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymbMapItems
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymbMapItems
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SymbMapItems -> c SymbMapItems
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SymbMapItems -> c SymbMapItems
$cp1Data :: Typeable SymbMapItems
Data)
    -- pos: kind commas

-- | kind of symbols
data SymbKind =
    Implicit
  | SyKtype
  | SyKsort
  | SyKfun
  | SyKop
  | SyKpred
  | SyKclass
    deriving (Int -> SymbKind -> ShowS
[SymbKind] -> ShowS
SymbKind -> String
(Int -> SymbKind -> ShowS)
-> (SymbKind -> String) -> ([SymbKind] -> ShowS) -> Show SymbKind
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SymbKind] -> ShowS
$cshowList :: [SymbKind] -> ShowS
show :: SymbKind -> String
$cshow :: SymbKind -> String
showsPrec :: Int -> SymbKind -> ShowS
$cshowsPrec :: Int -> SymbKind -> ShowS
Show, SymbKind -> SymbKind -> Bool
(SymbKind -> SymbKind -> Bool)
-> (SymbKind -> SymbKind -> Bool) -> Eq SymbKind
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SymbKind -> SymbKind -> Bool
$c/= :: SymbKind -> SymbKind -> Bool
== :: SymbKind -> SymbKind -> Bool
$c== :: SymbKind -> SymbKind -> Bool
Eq, Eq SymbKind
Eq SymbKind =>
(SymbKind -> SymbKind -> Ordering)
-> (SymbKind -> SymbKind -> Bool)
-> (SymbKind -> SymbKind -> Bool)
-> (SymbKind -> SymbKind -> Bool)
-> (SymbKind -> SymbKind -> Bool)
-> (SymbKind -> SymbKind -> SymbKind)
-> (SymbKind -> SymbKind -> SymbKind)
-> Ord SymbKind
SymbKind -> SymbKind -> Bool
SymbKind -> SymbKind -> Ordering
SymbKind -> SymbKind -> SymbKind
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 :: SymbKind -> SymbKind -> SymbKind
$cmin :: SymbKind -> SymbKind -> SymbKind
max :: SymbKind -> SymbKind -> SymbKind
$cmax :: SymbKind -> SymbKind -> SymbKind
>= :: SymbKind -> SymbKind -> Bool
$c>= :: SymbKind -> SymbKind -> Bool
> :: SymbKind -> SymbKind -> Bool
$c> :: SymbKind -> SymbKind -> Bool
<= :: SymbKind -> SymbKind -> Bool
$c<= :: SymbKind -> SymbKind -> Bool
< :: SymbKind -> SymbKind -> Bool
$c< :: SymbKind -> SymbKind -> Bool
compare :: SymbKind -> SymbKind -> Ordering
$ccompare :: SymbKind -> SymbKind -> Ordering
$cp1Ord :: Eq SymbKind
Ord, Typeable, Typeable SymbKind
Constr
DataType
Typeable SymbKind =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> SymbKind -> c SymbKind)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c SymbKind)
-> (SymbKind -> Constr)
-> (SymbKind -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c SymbKind))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SymbKind))
-> ((forall b. Data b => b -> b) -> SymbKind -> SymbKind)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SymbKind -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SymbKind -> r)
-> (forall u. (forall d. Data d => d -> u) -> SymbKind -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> SymbKind -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> SymbKind -> m SymbKind)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SymbKind -> m SymbKind)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SymbKind -> m SymbKind)
-> Data SymbKind
SymbKind -> Constr
SymbKind -> DataType
(forall b. Data b => b -> b) -> SymbKind -> SymbKind
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SymbKind -> c SymbKind
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymbKind
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> SymbKind -> u
forall u. (forall d. Data d => d -> u) -> SymbKind -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymbKind -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SymbKind -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SymbKind -> m SymbKind
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SymbKind -> m SymbKind
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymbKind
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SymbKind -> c SymbKind
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SymbKind)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SymbKind)
$cSyKclass :: Constr
$cSyKpred :: Constr
$cSyKop :: Constr
$cSyKfun :: Constr
$cSyKsort :: Constr
$cSyKtype :: Constr
$cImplicit :: Constr
$tSymbKind :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> SymbKind -> m SymbKind
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SymbKind -> m SymbKind
gmapMp :: (forall d. Data d => d -> m d) -> SymbKind -> m SymbKind
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SymbKind -> m SymbKind
gmapM :: (forall d. Data d => d -> m d) -> SymbKind -> m SymbKind
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SymbKind -> m SymbKind
gmapQi :: Int -> (forall d. Data d => d -> u) -> SymbKind -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SymbKind -> u
gmapQ :: (forall d. Data d => d -> u) -> SymbKind -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SymbKind -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SymbKind -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SymbKind -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymbKind -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymbKind -> r
gmapT :: (forall b. Data b => b -> b) -> SymbKind -> SymbKind
$cgmapT :: (forall b. Data b => b -> b) -> SymbKind -> SymbKind
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SymbKind)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SymbKind)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c SymbKind)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SymbKind)
dataTypeOf :: SymbKind -> DataType
$cdataTypeOf :: SymbKind -> DataType
toConstr :: SymbKind -> Constr
$ctoConstr :: SymbKind -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymbKind
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymbKind
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SymbKind -> c SymbKind
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SymbKind -> c SymbKind
$cp1Data :: Typeable SymbKind
Data)

instance Pretty SymbKind where
  pretty :: SymbKind -> Doc
pretty symbol_kind :: SymbKind
symbol_kind = case SymbKind
symbol_kind of
    Implicit -> String -> Doc
text "implicit"
    SyKtype -> String -> Doc
text "type"
    SyKsort -> String -> Doc
text "sort"
    SyKfun -> String -> Doc
text "fun"
    SyKop -> String -> Doc
text "op"
    SyKpred -> String -> Doc
text "pred"
    SyKclass -> String -> Doc
text "class"
    
-- | type annotated symbols
data Symb = Symb Id (Maybe SymbType) Range
  deriving (Int -> Symb -> ShowS
[Symb] -> ShowS
Symb -> String
(Int -> Symb -> ShowS)
-> (Symb -> String) -> ([Symb] -> ShowS) -> Show Symb
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Symb] -> ShowS
$cshowList :: [Symb] -> ShowS
show :: Symb -> String
$cshow :: Symb -> String
showsPrec :: Int -> Symb -> ShowS
$cshowsPrec :: Int -> Symb -> ShowS
Show, Symb -> Symb -> Bool
(Symb -> Symb -> Bool) -> (Symb -> Symb -> Bool) -> Eq Symb
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Symb -> Symb -> Bool
$c/= :: Symb -> Symb -> Bool
== :: Symb -> Symb -> Bool
$c== :: Symb -> Symb -> Bool
Eq, Eq Symb
Eq Symb =>
(Symb -> Symb -> Ordering)
-> (Symb -> Symb -> Bool)
-> (Symb -> Symb -> Bool)
-> (Symb -> Symb -> Bool)
-> (Symb -> Symb -> Bool)
-> (Symb -> Symb -> Symb)
-> (Symb -> Symb -> Symb)
-> Ord Symb
Symb -> Symb -> Bool
Symb -> Symb -> Ordering
Symb -> Symb -> Symb
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 :: Symb -> Symb -> Symb
$cmin :: Symb -> Symb -> Symb
max :: Symb -> Symb -> Symb
$cmax :: Symb -> Symb -> Symb
>= :: Symb -> Symb -> Bool
$c>= :: Symb -> Symb -> Bool
> :: Symb -> Symb -> Bool
$c> :: Symb -> Symb -> Bool
<= :: Symb -> Symb -> Bool
$c<= :: Symb -> Symb -> Bool
< :: Symb -> Symb -> Bool
$c< :: Symb -> Symb -> Bool
compare :: Symb -> Symb -> Ordering
$ccompare :: Symb -> Symb -> Ordering
$cp1Ord :: Eq Symb
Ord, Typeable, Typeable Symb
Constr
DataType
Typeable Symb =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> Symb -> c Symb)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Symb)
-> (Symb -> Constr)
-> (Symb -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Symb))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Symb))
-> ((forall b. Data b => b -> b) -> Symb -> Symb)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Symb -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Symb -> r)
-> (forall u. (forall d. Data d => d -> u) -> Symb -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Symb -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Symb -> m Symb)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Symb -> m Symb)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Symb -> m Symb)
-> Data Symb
Symb -> Constr
Symb -> DataType
(forall b. Data b => b -> b) -> Symb -> Symb
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Symb -> c Symb
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Symb
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Symb -> u
forall u. (forall d. Data d => d -> u) -> Symb -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Symb -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Symb -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Symb -> m Symb
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Symb -> m Symb
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Symb
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Symb -> c Symb
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Symb)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Symb)
$cSymb :: Constr
$tSymb :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Symb -> m Symb
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Symb -> m Symb
gmapMp :: (forall d. Data d => d -> m d) -> Symb -> m Symb
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Symb -> m Symb
gmapM :: (forall d. Data d => d -> m d) -> Symb -> m Symb
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Symb -> m Symb
gmapQi :: Int -> (forall d. Data d => d -> u) -> Symb -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Symb -> u
gmapQ :: (forall d. Data d => d -> u) -> Symb -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Symb -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Symb -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Symb -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Symb -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Symb -> r
gmapT :: (forall b. Data b => b -> b) -> Symb -> Symb
$cgmapT :: (forall b. Data b => b -> b) -> Symb -> Symb
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Symb)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Symb)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Symb)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Symb)
dataTypeOf :: Symb -> DataType
$cdataTypeOf :: Symb -> DataType
toConstr :: Symb -> Constr
$ctoConstr :: Symb -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Symb
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Symb
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Symb -> c Symb
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Symb -> c Symb
$cp1Data :: Typeable Symb
Data)
            -- pos: colon (or empty)

-- | type for symbols
data SymbType = SymbType TypeScheme deriving (Int -> SymbType -> ShowS
[SymbType] -> ShowS
SymbType -> String
(Int -> SymbType -> ShowS)
-> (SymbType -> String) -> ([SymbType] -> ShowS) -> Show SymbType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SymbType] -> ShowS
$cshowList :: [SymbType] -> ShowS
show :: SymbType -> String
$cshow :: SymbType -> String
showsPrec :: Int -> SymbType -> ShowS
$cshowsPrec :: Int -> SymbType -> ShowS
Show, SymbType -> SymbType -> Bool
(SymbType -> SymbType -> Bool)
-> (SymbType -> SymbType -> Bool) -> Eq SymbType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SymbType -> SymbType -> Bool
$c/= :: SymbType -> SymbType -> Bool
== :: SymbType -> SymbType -> Bool
$c== :: SymbType -> SymbType -> Bool
Eq, Eq SymbType
Eq SymbType =>
(SymbType -> SymbType -> Ordering)
-> (SymbType -> SymbType -> Bool)
-> (SymbType -> SymbType -> Bool)
-> (SymbType -> SymbType -> Bool)
-> (SymbType -> SymbType -> Bool)
-> (SymbType -> SymbType -> SymbType)
-> (SymbType -> SymbType -> SymbType)
-> Ord SymbType
SymbType -> SymbType -> Bool
SymbType -> SymbType -> Ordering
SymbType -> SymbType -> SymbType
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 :: SymbType -> SymbType -> SymbType
$cmin :: SymbType -> SymbType -> SymbType
max :: SymbType -> SymbType -> SymbType
$cmax :: SymbType -> SymbType -> SymbType
>= :: SymbType -> SymbType -> Bool
$c>= :: SymbType -> SymbType -> Bool
> :: SymbType -> SymbType -> Bool
$c> :: SymbType -> SymbType -> Bool
<= :: SymbType -> SymbType -> Bool
$c<= :: SymbType -> SymbType -> Bool
< :: SymbType -> SymbType -> Bool
$c< :: SymbType -> SymbType -> Bool
compare :: SymbType -> SymbType -> Ordering
$ccompare :: SymbType -> SymbType -> Ordering
$cp1Ord :: Eq SymbType
Ord, Typeable, Typeable SymbType
Constr
DataType
Typeable SymbType =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> SymbType -> c SymbType)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c SymbType)
-> (SymbType -> Constr)
-> (SymbType -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c SymbType))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SymbType))
-> ((forall b. Data b => b -> b) -> SymbType -> SymbType)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SymbType -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SymbType -> r)
-> (forall u. (forall d. Data d => d -> u) -> SymbType -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> SymbType -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> SymbType -> m SymbType)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SymbType -> m SymbType)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SymbType -> m SymbType)
-> Data SymbType
SymbType -> Constr
SymbType -> DataType
(forall b. Data b => b -> b) -> SymbType -> SymbType
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SymbType -> c SymbType
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymbType
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> SymbType -> u
forall u. (forall d. Data d => d -> u) -> SymbType -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymbType -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SymbType -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SymbType -> m SymbType
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SymbType -> m SymbType
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymbType
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SymbType -> c SymbType
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SymbType)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SymbType)
$cSymbType :: Constr
$tSymbType :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> SymbType -> m SymbType
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SymbType -> m SymbType
gmapMp :: (forall d. Data d => d -> m d) -> SymbType -> m SymbType
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SymbType -> m SymbType
gmapM :: (forall d. Data d => d -> m d) -> SymbType -> m SymbType
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SymbType -> m SymbType
gmapQi :: Int -> (forall d. Data d => d -> u) -> SymbType -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SymbType -> u
gmapQ :: (forall d. Data d => d -> u) -> SymbType -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SymbType -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SymbType -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SymbType -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymbType -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymbType -> r
gmapT :: (forall b. Data b => b -> b) -> SymbType -> SymbType
$cgmapT :: (forall b. Data b => b -> b) -> SymbType -> SymbType
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SymbType)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SymbType)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c SymbType)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SymbType)
dataTypeOf :: SymbType -> DataType
$cdataTypeOf :: SymbType -> DataType
toConstr :: SymbType -> Constr
$ctoConstr :: SymbType -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymbType
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymbType
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SymbType -> c SymbType
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SymbType -> c SymbType
$cp1Data :: Typeable SymbType
Data)

-- | mapped symbol
data SymbOrMap = SymbOrMap Symb (Maybe Symb) Range
  deriving (Int -> SymbOrMap -> ShowS
[SymbOrMap] -> ShowS
SymbOrMap -> String
(Int -> SymbOrMap -> ShowS)
-> (SymbOrMap -> String)
-> ([SymbOrMap] -> ShowS)
-> Show SymbOrMap
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SymbOrMap] -> ShowS
$cshowList :: [SymbOrMap] -> ShowS
show :: SymbOrMap -> String
$cshow :: SymbOrMap -> String
showsPrec :: Int -> SymbOrMap -> ShowS
$cshowsPrec :: Int -> SymbOrMap -> ShowS
Show, SymbOrMap -> SymbOrMap -> Bool
(SymbOrMap -> SymbOrMap -> Bool)
-> (SymbOrMap -> SymbOrMap -> Bool) -> Eq SymbOrMap
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SymbOrMap -> SymbOrMap -> Bool
$c/= :: SymbOrMap -> SymbOrMap -> Bool
== :: SymbOrMap -> SymbOrMap -> Bool
$c== :: SymbOrMap -> SymbOrMap -> Bool
Eq, Eq SymbOrMap
Eq SymbOrMap =>
(SymbOrMap -> SymbOrMap -> Ordering)
-> (SymbOrMap -> SymbOrMap -> Bool)
-> (SymbOrMap -> SymbOrMap -> Bool)
-> (SymbOrMap -> SymbOrMap -> Bool)
-> (SymbOrMap -> SymbOrMap -> Bool)
-> (SymbOrMap -> SymbOrMap -> SymbOrMap)
-> (SymbOrMap -> SymbOrMap -> SymbOrMap)
-> Ord SymbOrMap
SymbOrMap -> SymbOrMap -> Bool
SymbOrMap -> SymbOrMap -> Ordering
SymbOrMap -> SymbOrMap -> SymbOrMap
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 :: SymbOrMap -> SymbOrMap -> SymbOrMap
$cmin :: SymbOrMap -> SymbOrMap -> SymbOrMap
max :: SymbOrMap -> SymbOrMap -> SymbOrMap
$cmax :: SymbOrMap -> SymbOrMap -> SymbOrMap
>= :: SymbOrMap -> SymbOrMap -> Bool
$c>= :: SymbOrMap -> SymbOrMap -> Bool
> :: SymbOrMap -> SymbOrMap -> Bool
$c> :: SymbOrMap -> SymbOrMap -> Bool
<= :: SymbOrMap -> SymbOrMap -> Bool
$c<= :: SymbOrMap -> SymbOrMap -> Bool
< :: SymbOrMap -> SymbOrMap -> Bool
$c< :: SymbOrMap -> SymbOrMap -> Bool
compare :: SymbOrMap -> SymbOrMap -> Ordering
$ccompare :: SymbOrMap -> SymbOrMap -> Ordering
$cp1Ord :: Eq SymbOrMap
Ord, Typeable, Typeable SymbOrMap
Constr
DataType
Typeable SymbOrMap =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> SymbOrMap -> c SymbOrMap)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c SymbOrMap)
-> (SymbOrMap -> Constr)
-> (SymbOrMap -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c SymbOrMap))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SymbOrMap))
-> ((forall b. Data b => b -> b) -> SymbOrMap -> SymbOrMap)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SymbOrMap -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SymbOrMap -> r)
-> (forall u. (forall d. Data d => d -> u) -> SymbOrMap -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> SymbOrMap -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> SymbOrMap -> m SymbOrMap)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SymbOrMap -> m SymbOrMap)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SymbOrMap -> m SymbOrMap)
-> Data SymbOrMap
SymbOrMap -> Constr
SymbOrMap -> DataType
(forall b. Data b => b -> b) -> SymbOrMap -> SymbOrMap
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SymbOrMap -> c SymbOrMap
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymbOrMap
forall a.
Typeable a =>
(forall (c :: * -> *).
 (forall d b. Data d => c (d -> b) -> d -> c b)
 -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> SymbOrMap -> u
forall u. (forall d. Data d => d -> u) -> SymbOrMap -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymbOrMap -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SymbOrMap -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SymbOrMap -> m SymbOrMap
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SymbOrMap -> m SymbOrMap
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymbOrMap
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SymbOrMap -> c SymbOrMap
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SymbOrMap)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SymbOrMap)
$cSymbOrMap :: Constr
$tSymbOrMap :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> SymbOrMap -> m SymbOrMap
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SymbOrMap -> m SymbOrMap
gmapMp :: (forall d. Data d => d -> m d) -> SymbOrMap -> m SymbOrMap
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> SymbOrMap -> m SymbOrMap
gmapM :: (forall d. Data d => d -> m d) -> SymbOrMap -> m SymbOrMap
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> SymbOrMap -> m SymbOrMap
gmapQi :: Int -> (forall d. Data d => d -> u) -> SymbOrMap -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SymbOrMap -> u
gmapQ :: (forall d. Data d => d -> u) -> SymbOrMap -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SymbOrMap -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SymbOrMap -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SymbOrMap -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymbOrMap -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SymbOrMap -> r
gmapT :: (forall b. Data b => b -> b) -> SymbOrMap -> SymbOrMap
$cgmapT :: (forall b. Data b => b -> b) -> SymbOrMap -> SymbOrMap
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SymbOrMap)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SymbOrMap)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c SymbOrMap)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SymbOrMap)
dataTypeOf :: SymbOrMap -> DataType
$cdataTypeOf :: SymbOrMap -> DataType
toConstr :: SymbOrMap -> Constr
$ctoConstr :: SymbOrMap -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymbOrMap
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SymbOrMap
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SymbOrMap -> c SymbOrMap
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SymbOrMap -> c SymbOrMap
$cp1Data :: Typeable SymbOrMap
Data)
                   -- pos: "|->" (or empty)

-- * equality instances ignoring positions

instance Eq Type where
    t1 :: Type
t1 == :: Type -> Type -> Bool
== t2 :: Type
t2 = Type -> Type -> Ordering
forall a. Ord a => a -> a -> Ordering
compare Type
t1 Type
t2 Ordering -> Ordering -> Bool
forall a. Eq a => a -> a -> Bool
== Ordering
EQ

instance Ord Type where
  compare :: Type -> Type -> Ordering
compare ty1 :: Type
ty1 ty2 :: Type
ty2 = case (Type
ty1, Type
ty2) of
    (TypeName i1 :: Id
i1 k1 :: RawKind
k1 v1 :: Int
v1, TypeName i2 :: Id
i2 k2 :: RawKind
k2 v2 :: Int
v2) ->
        if Int
v1 Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== 0 Bool -> Bool -> Bool
&& Int
v2 Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== 0 then (Id, RawKind) -> (Id, RawKind) -> Ordering
forall a. Ord a => a -> a -> Ordering
compare (Id
i1, RawKind
k1) (Id
i2, RawKind
k2)
        else (Int, RawKind) -> (Int, RawKind) -> Ordering
forall a. Ord a => a -> a -> Ordering
compare (Int
v1, RawKind
k1) (Int
v2, RawKind
k2)
    (TypeAppl f1 :: Type
f1 a1 :: Type
a1, TypeAppl f2 :: Type
f2 a2 :: Type
a2) -> (Type, Type) -> (Type, Type) -> Ordering
forall a. Ord a => a -> a -> Ordering
compare (Type
f1, Type
a1) (Type
f2, Type
a2)
    (TypeAbs v1 :: TypeArg
v1 a1 :: Type
a1 _, TypeAbs v2 :: TypeArg
v2 a2 :: Type
a2 _) -> (TypeArg, Type) -> (TypeArg, Type) -> Ordering
forall a. Ord a => a -> a -> Ordering
compare (TypeArg
v1, Type
a1) (TypeArg
v2, Type
a2)
    (TypeToken t1 :: Token
t1, TypeToken t2 :: Token
t2) -> Token -> Token -> Ordering
forall a. Ord a => a -> a -> Ordering
compare Token
t1 Token
t2
    (BracketType b1 :: BracketKind
b1 l1 :: [Type]
l1 _, BracketType b2 :: BracketKind
b2 l2 :: [Type]
l2 _) -> (BracketKind, [Type]) -> (BracketKind, [Type]) -> Ordering
forall a. Ord a => a -> a -> Ordering
compare (BracketKind
b1, [Type]
l1) (BracketKind
b2, [Type]
l2)
    (KindedType t1 :: Type
t1 k1 :: Set Kind
k1 _, KindedType t2 :: Type
t2 k2 :: Set Kind
k2 _) -> (Type, Set Kind) -> (Type, Set Kind) -> Ordering
forall a. Ord a => a -> a -> Ordering
compare (Type
t1, Set Kind
k1) (Type
t2, Set Kind
k2)
    (MixfixType l1 :: [Type]
l1, MixfixType l2 :: [Type]
l2) -> [Type] -> [Type] -> Ordering
forall a. Ord a => a -> a -> Ordering
compare [Type]
l1 [Type]
l2
    (ExpandedType _ t1 :: Type
t1, t2 :: Type
t2) -> Type -> Type -> Ordering
forall a. Ord a => a -> a -> Ordering
compare Type
t1 Type
t2
    (t1 :: Type
t1, ExpandedType _ t2 :: Type
t2) -> Type -> Type -> Ordering
forall a. Ord a => a -> a -> Ordering
compare Type
t1 Type
t2
    (TypeName {}, _) -> Ordering
LT
    (_, TypeName {}) -> Ordering
GT
    (TypeAppl {}, _) -> Ordering
LT
    (_, TypeAppl {}) -> Ordering
GT
    (TypeAbs {}, _) -> Ordering
LT
    (_, TypeAbs {}) -> Ordering
GT
    (TypeToken _, _) -> Ordering
LT
    (_, TypeToken _) -> Ordering
GT
    (BracketType {}, _) -> Ordering
LT
    (_, BracketType {}) -> Ordering
GT
    (KindedType {}, _) -> Ordering
LT
    (_, KindedType {}) -> Ordering
GT

-- used within quantified formulas
instance Eq TypeArg where
    t1 :: TypeArg
t1 == :: TypeArg -> TypeArg -> Bool
== t2 :: TypeArg
t2 = TypeArg -> TypeArg -> Ordering
forall a. Ord a => a -> a -> Ordering
compare TypeArg
t1 TypeArg
t2 Ordering -> Ordering -> Bool
forall a. Eq a => a -> a -> Bool
== Ordering
EQ
instance Ord TypeArg where
    compare :: TypeArg -> TypeArg -> Ordering
compare (TypeArg i1 :: Id
i1 v1 :: Variance
v1 e1 :: VarKind
e1 r1 :: RawKind
r1 c1 :: Int
c1 _ _) (TypeArg i2 :: Id
i2 v2 :: Variance
v2 e2 :: VarKind
e2 r2 :: RawKind
r2 c2 :: Int
c2 _ _) =
        if Int
c1 Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
< 0 Bool -> Bool -> Bool
&& Int
c2 Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
< 0 then (Variance, VarKind, RawKind, Int)
-> (Variance, VarKind, RawKind, Int) -> Ordering
forall a. Ord a => a -> a -> Ordering
compare (Variance
v1, VarKind
e1, RawKind
r1, Int
c1) (Variance
v2, VarKind
e2, RawKind
r2, Int
c2)
        else (Id, Variance, VarKind, RawKind, Int)
-> (Id, Variance, VarKind, RawKind, Int) -> Ordering
forall a. Ord a => a -> a -> Ordering
compare (Id
i1, Variance
v1, VarKind
e1, RawKind
r1, Int
c1) (Id
i2, Variance
v2, VarKind
e2, RawKind
r2, Int
c2)

-- * compute better position

-- | get a reasonable position for a list with an additional position list
bestRange :: GetRange a => [a] -> Range -> Range
bestRange :: [a] -> Range -> Range
bestRange l :: [a]
l (Range ps :: [Pos]
ps) = [Pos] -> Range
Range (Range -> [Pos]
rangeToList ([a] -> Range
forall a. GetRange a => a -> Range
getRange [a]
l) [Pos] -> [Pos] -> [Pos]
forall a. [a] -> [a] -> [a]
++ [Pos]
ps)

instance GetRange OpAttr where
  getRange :: OpAttr -> Range
getRange a :: OpAttr
a = case OpAttr
a of
    BinOpAttr _ r :: Range
r -> Range
r
    UnitOpAttr _ r :: Range
r -> Range
r

instance GetRange Type where
  getRange :: Type -> Range
getRange ty :: Type
ty = case Type
ty of
    TypeName i :: Id
i _ _ -> Id -> Range
posOfId Id
i
    TypeAppl t1 :: Type
t1 t2 :: Type
t2 -> [Type] -> Range
forall a. GetRange a => a -> Range
getRange [Type
t1, Type
t2]
    TypeAbs _ t :: Type
t ps :: Range
ps -> [Type] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [Type
t] Range
ps
    ExpandedType t1 :: Type
t1 t2 :: Type
t2 -> [Type] -> Range
forall a. GetRange a => a -> Range
getRange [Type
t1, Type
t2]
    TypeToken t :: Token
t -> Token -> Range
tokPos Token
t
    BracketType _ ts :: [Type]
ts ps :: Range
ps -> [Type] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [Type]
ts Range
ps
    KindedType t :: Type
t _ ps :: Range
ps -> [Type] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [Type
t] Range
ps
    MixfixType ts :: [Type]
ts -> [Type] -> Range
forall a. GetRange a => a -> Range
getRange [Type]
ts

instance GetRange Term where
   getRange :: Term -> Range
getRange trm :: Term
trm = case Term
trm of
    QualVar v :: VarDecl
v -> VarDecl -> Range
forall a. GetRange a => a -> Range
getRange VarDecl
v
    QualOp _ (PolyId i :: Id
i _ _) _ _ _ qs :: Range
qs -> [Id] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [Id
i] Range
qs
    ResolvedMixTerm i :: Id
i _ _ _ -> Id -> Range
posOfId Id
i
    ApplTerm t1 :: Term
t1 t2 :: Term
t2 ps :: Range
ps -> [Term] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [Term
t1, Term
t2] Range
ps
    TupleTerm ts :: [Term]
ts ps :: Range
ps -> [Term] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [Term]
ts Range
ps
    TypedTerm t :: Term
t _ _ ps :: Range
ps -> [Term] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [Term
t] Range
ps
    QuantifiedTerm _ _ t :: Term
t ps :: Range
ps -> [Term] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [Term
t] Range
ps
    LambdaTerm _ _ t :: Term
t ps :: Range
ps -> [Term] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [Term
t] Range
ps
    CaseTerm t :: Term
t _ ps :: Range
ps -> [Term] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [Term
t] Range
ps
    LetTerm _ _ t :: Term
t ps :: Range
ps -> [Term] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [Term
t] Range
ps
    TermToken t :: Token
t -> Token -> Range
tokPos Token
t
    MixTypeTerm _ t :: Type
t ps :: Range
ps -> [Type] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [Type
t] Range
ps
    MixfixTerm ts :: [Term]
ts -> [Term] -> Range
forall a. GetRange a => a -> Range
getRange [Term]
ts
    BracketTerm _ ts :: [Term]
ts ps :: Range
ps -> [Term] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [Term]
ts Range
ps
    AsPattern v :: VarDecl
v _ ps :: Range
ps -> [VarDecl] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [VarDecl
v] Range
ps

instance GetRange TypePattern where
  getRange :: TypePattern -> Range
getRange pat :: TypePattern
pat = case TypePattern
pat of
    TypePattern t :: Id
t _ ps :: Range
ps -> [Id] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [Id
t] Range
ps
    TypePatternToken t :: Token
t -> Token -> Range
tokPos Token
t
    MixfixTypePattern ts :: [TypePattern]
ts -> [TypePattern] -> Range
forall a. GetRange a => a -> Range
getRange [TypePattern]
ts
    BracketTypePattern _ ts :: [TypePattern]
ts ps :: Range
ps -> [TypePattern] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [TypePattern]
ts Range
ps
    TypePatternArg (TypeArg t :: Id
t _ _ _ _ _ _) ps :: Range
ps -> [Id] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [Id
t] Range
ps

instance GetRange VarDecl where
    getRange :: VarDecl -> Range
getRange (VarDecl v :: Id
v _ _ p :: Range
p) = [Id] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [Id
v] Range
p

instance GetRange TypeArg where
    getRange :: TypeArg -> Range
getRange (TypeArg v :: Id
v _ _ _ _ _ p :: Range
p) = [Id] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [Id
v] Range
p

instance GetRange TypeScheme where
    getRange :: TypeScheme -> Range
getRange (TypeScheme args :: [TypeArg]
args t :: Type
t ps :: Range
ps) = [TypeArg] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [TypeArg]
args (Range -> Range) -> Range -> Range
forall a b. (a -> b) -> a -> b
$ [Type] -> Range -> Range
forall a. GetRange a => [a] -> Range -> Range
bestRange [Type
t] Range
ps

instance GetRange BasicSpec