{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE UndecidableInstances #-}
module Agda.Syntax.Internal
( module Agda.Syntax.Internal
, module Agda.Syntax.Abstract.Name
, MetaId(..)
) where
import Prelude hiding (foldr, mapM, null)
import GHC.Stack (HasCallStack, freezeCallStack, callStack)
import Control.Monad.Identity hiding (mapM)
import Control.DeepSeq
import Data.Foldable ( Foldable, foldMap )
import Data.Function
import qualified Data.List as List
import Data.Maybe
import Data.Monoid ( Monoid, mempty, mappend )
import Data.Semigroup ( Semigroup, (<>), Sum(..) )
import Data.Traversable
import Data.Data (Data)
import Agda.Syntax.Position
import Agda.Syntax.Common
import Agda.Syntax.Literal
import Agda.Syntax.Concrete.Pretty (prettyHiding)
import Agda.Syntax.Abstract.Name
import Agda.Utils.Empty
import Agda.Utils.Functor
import Agda.Utils.Lens
import Agda.Utils.Null
import Agda.Utils.Size
import Agda.Utils.Pretty
import Agda.Utils.Tuple
import Agda.Utils.Impossible
data Dom' t e = Dom
{ Dom' t e -> ArgInfo
domInfo :: ArgInfo
, Dom' t e -> Bool
domFinite :: !Bool
, Dom' t e -> Maybe NamedName
domName :: Maybe NamedName
, Dom' t e -> Maybe t
domTactic :: Maybe t
, Dom' t e -> e
unDom :: e
} deriving (Typeable (Dom' t e)
DataType
Constr
Typeable (Dom' t e) =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Dom' t e -> c (Dom' t e))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Dom' t e))
-> (Dom' t e -> Constr)
-> (Dom' t e -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Dom' t e)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Dom' t e)))
-> ((forall b. Data b => b -> b) -> Dom' t e -> Dom' t e)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Dom' t e -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Dom' t e -> r)
-> (forall u. (forall d. Data d => d -> u) -> Dom' t e -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Dom' t e -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Dom' t e -> m (Dom' t e))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Dom' t e -> m (Dom' t e))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Dom' t e -> m (Dom' t e))
-> Data (Dom' t e)
Dom' t e -> DataType
Dom' t e -> Constr
(forall b. Data b => b -> b) -> Dom' t e -> Dom' t e
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Dom' t e -> c (Dom' t e)
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Dom' t e)
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Dom' t e))
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) -> Dom' t e -> u
forall u. (forall d. Data d => d -> u) -> Dom' t e -> [u]
forall t e. (Data t, Data e) => Typeable (Dom' t e)
forall t e. (Data t, Data e) => Dom' t e -> DataType
forall t e. (Data t, Data e) => Dom' t e -> Constr
forall t e.
(Data t, Data e) =>
(forall b. Data b => b -> b) -> Dom' t e -> Dom' t e
forall t e u.
(Data t, Data e) =>
Int -> (forall d. Data d => d -> u) -> Dom' t e -> u
forall t e u.
(Data t, Data e) =>
(forall d. Data d => d -> u) -> Dom' t e -> [u]
forall t e r r'.
(Data t, Data e) =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Dom' t e -> r
forall t e r r'.
(Data t, Data e) =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Dom' t e -> r
forall t e (m :: * -> *).
(Data t, Data e, Monad m) =>
(forall d. Data d => d -> m d) -> Dom' t e -> m (Dom' t e)
forall t e (m :: * -> *).
(Data t, Data e, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Dom' t e -> m (Dom' t e)
forall t e (c :: * -> *).
(Data t, Data e) =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Dom' t e)
forall t e (c :: * -> *).
(Data t, Data e) =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Dom' t e -> c (Dom' t e)
forall t e (t :: * -> *) (c :: * -> *).
(Data t, Data e, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Dom' t e))
forall t e (t :: * -> * -> *) (c :: * -> *).
(Data t, Data e, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Dom' t e))
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Dom' t e -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Dom' t e -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Dom' t e -> m (Dom' t e)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Dom' t e -> m (Dom' t e)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Dom' t e)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Dom' t e -> c (Dom' t e)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Dom' t e))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Dom' t e))
$cDom :: Constr
$tDom' :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Dom' t e -> m (Dom' t e)
$cgmapMo :: forall t e (m :: * -> *).
(Data t, Data e, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Dom' t e -> m (Dom' t e)
gmapMp :: (forall d. Data d => d -> m d) -> Dom' t e -> m (Dom' t e)
$cgmapMp :: forall t e (m :: * -> *).
(Data t, Data e, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Dom' t e -> m (Dom' t e)
gmapM :: (forall d. Data d => d -> m d) -> Dom' t e -> m (Dom' t e)
$cgmapM :: forall t e (m :: * -> *).
(Data t, Data e, Monad m) =>
(forall d. Data d => d -> m d) -> Dom' t e -> m (Dom' t e)
gmapQi :: Int -> (forall d. Data d => d -> u) -> Dom' t e -> u
$cgmapQi :: forall t e u.
(Data t, Data e) =>
Int -> (forall d. Data d => d -> u) -> Dom' t e -> u
gmapQ :: (forall d. Data d => d -> u) -> Dom' t e -> [u]
$cgmapQ :: forall t e u.
(Data t, Data e) =>
(forall d. Data d => d -> u) -> Dom' t e -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Dom' t e -> r
$cgmapQr :: forall t e r r'.
(Data t, Data e) =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Dom' t e -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Dom' t e -> r
$cgmapQl :: forall t e r r'.
(Data t, Data e) =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Dom' t e -> r
gmapT :: (forall b. Data b => b -> b) -> Dom' t e -> Dom' t e
$cgmapT :: forall t e.
(Data t, Data e) =>
(forall b. Data b => b -> b) -> Dom' t e -> Dom' t e
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Dom' t e))
$cdataCast2 :: forall t e (t :: * -> * -> *) (c :: * -> *).
(Data t, Data e, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Dom' t e))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (Dom' t e))
$cdataCast1 :: forall t e (t :: * -> *) (c :: * -> *).
(Data t, Data e, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Dom' t e))
dataTypeOf :: Dom' t e -> DataType
$cdataTypeOf :: forall t e. (Data t, Data e) => Dom' t e -> DataType
toConstr :: Dom' t e -> Constr
$ctoConstr :: forall t e. (Data t, Data e) => Dom' t e -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Dom' t e)
$cgunfold :: forall t e (c :: * -> *).
(Data t, Data e) =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Dom' t e)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Dom' t e -> c (Dom' t e)
$cgfoldl :: forall t e (c :: * -> *).
(Data t, Data e) =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Dom' t e -> c (Dom' t e)
$cp1Data :: forall t e. (Data t, Data e) => Typeable (Dom' t e)
Data, Int -> Dom' t e -> ShowS
[Dom' t e] -> ShowS
Dom' t e -> String
(Int -> Dom' t e -> ShowS)
-> (Dom' t e -> String) -> ([Dom' t e] -> ShowS) -> Show (Dom' t e)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
forall t e. (Show t, Show e) => Int -> Dom' t e -> ShowS
forall t e. (Show t, Show e) => [Dom' t e] -> ShowS
forall t e. (Show t, Show e) => Dom' t e -> String
showList :: [Dom' t e] -> ShowS
$cshowList :: forall t e. (Show t, Show e) => [Dom' t e] -> ShowS
show :: Dom' t e -> String
$cshow :: forall t e. (Show t, Show e) => Dom' t e -> String
showsPrec :: Int -> Dom' t e -> ShowS
$cshowsPrec :: forall t e. (Show t, Show e) => Int -> Dom' t e -> ShowS
Show, a -> Dom' t b -> Dom' t a
(a -> b) -> Dom' t a -> Dom' t b
(forall a b. (a -> b) -> Dom' t a -> Dom' t b)
-> (forall a b. a -> Dom' t b -> Dom' t a) -> Functor (Dom' t)
forall a b. a -> Dom' t b -> Dom' t a
forall a b. (a -> b) -> Dom' t a -> Dom' t b
forall t a b. a -> Dom' t b -> Dom' t a
forall t a b. (a -> b) -> Dom' t a -> Dom' t b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> Dom' t b -> Dom' t a
$c<$ :: forall t a b. a -> Dom' t b -> Dom' t a
fmap :: (a -> b) -> Dom' t a -> Dom' t b
$cfmap :: forall t a b. (a -> b) -> Dom' t a -> Dom' t b
Functor, Dom' t a -> Bool
(a -> m) -> Dom' t a -> m
(a -> b -> b) -> b -> Dom' t a -> b
(forall m. Monoid m => Dom' t m -> m)
-> (forall m a. Monoid m => (a -> m) -> Dom' t a -> m)
-> (forall m a. Monoid m => (a -> m) -> Dom' t a -> m)
-> (forall a b. (a -> b -> b) -> b -> Dom' t a -> b)
-> (forall a b. (a -> b -> b) -> b -> Dom' t a -> b)
-> (forall b a. (b -> a -> b) -> b -> Dom' t a -> b)
-> (forall b a. (b -> a -> b) -> b -> Dom' t a -> b)
-> (forall a. (a -> a -> a) -> Dom' t a -> a)
-> (forall a. (a -> a -> a) -> Dom' t a -> a)
-> (forall a. Dom' t a -> [a])
-> (forall a. Dom' t a -> Bool)
-> (forall a. Dom' t a -> Int)
-> (forall a. Eq a => a -> Dom' t a -> Bool)
-> (forall a. Ord a => Dom' t a -> a)
-> (forall a. Ord a => Dom' t a -> a)
-> (forall a. Num a => Dom' t a -> a)
-> (forall a. Num a => Dom' t a -> a)
-> Foldable (Dom' t)
forall a. Eq a => a -> Dom' t a -> Bool
forall a. Num a => Dom' t a -> a
forall a. Ord a => Dom' t a -> a
forall m. Monoid m => Dom' t m -> m
forall a. Dom' t a -> Bool
forall a. Dom' t a -> Int
forall a. Dom' t a -> [a]
forall a. (a -> a -> a) -> Dom' t a -> a
forall t a. Eq a => a -> Dom' t a -> Bool
forall t a. Num a => Dom' t a -> a
forall t a. Ord a => Dom' t a -> a
forall m a. Monoid m => (a -> m) -> Dom' t a -> m
forall t m. Monoid m => Dom' t m -> m
forall t a. Dom' t a -> Bool
forall t a. Dom' t a -> Int
forall t a. Dom' t a -> [a]
forall b a. (b -> a -> b) -> b -> Dom' t a -> b
forall a b. (a -> b -> b) -> b -> Dom' t a -> b
forall t a. (a -> a -> a) -> Dom' t a -> a
forall t m a. Monoid m => (a -> m) -> Dom' t a -> m
forall t b a. (b -> a -> b) -> b -> Dom' t a -> b
forall t a b. (a -> b -> b) -> b -> Dom' t a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: Dom' t a -> a
$cproduct :: forall t a. Num a => Dom' t a -> a
sum :: Dom' t a -> a
$csum :: forall t a. Num a => Dom' t a -> a
minimum :: Dom' t a -> a
$cminimum :: forall t a. Ord a => Dom' t a -> a
maximum :: Dom' t a -> a
$cmaximum :: forall t a. Ord a => Dom' t a -> a
elem :: a -> Dom' t a -> Bool
$celem :: forall t a. Eq a => a -> Dom' t a -> Bool
length :: Dom' t a -> Int
$clength :: forall t a. Dom' t a -> Int
null :: Dom' t a -> Bool
$cnull :: forall t a. Dom' t a -> Bool
toList :: Dom' t a -> [a]
$ctoList :: forall t a. Dom' t a -> [a]
foldl1 :: (a -> a -> a) -> Dom' t a -> a
$cfoldl1 :: forall t a. (a -> a -> a) -> Dom' t a -> a
foldr1 :: (a -> a -> a) -> Dom' t a -> a
$cfoldr1 :: forall t a. (a -> a -> a) -> Dom' t a -> a
foldl' :: (b -> a -> b) -> b -> Dom' t a -> b
$cfoldl' :: forall t b a. (b -> a -> b) -> b -> Dom' t a -> b
foldl :: (b -> a -> b) -> b -> Dom' t a -> b
$cfoldl :: forall t b a. (b -> a -> b) -> b -> Dom' t a -> b
foldr' :: (a -> b -> b) -> b -> Dom' t a -> b
$cfoldr' :: forall t a b. (a -> b -> b) -> b -> Dom' t a -> b
foldr :: (a -> b -> b) -> b -> Dom' t a -> b
$cfoldr :: forall t a b. (a -> b -> b) -> b -> Dom' t a -> b
foldMap' :: (a -> m) -> Dom' t a -> m
$cfoldMap' :: forall t m a. Monoid m => (a -> m) -> Dom' t a -> m
foldMap :: (a -> m) -> Dom' t a -> m
$cfoldMap :: forall t m a. Monoid m => (a -> m) -> Dom' t a -> m
fold :: Dom' t m -> m
$cfold :: forall t m. Monoid m => Dom' t m -> m
Foldable, Functor (Dom' t)
Foldable (Dom' t)
(Functor (Dom' t), Foldable (Dom' t)) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Dom' t a -> f (Dom' t b))
-> (forall (f :: * -> *) a.
Applicative f =>
Dom' t (f a) -> f (Dom' t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Dom' t a -> m (Dom' t b))
-> (forall (m :: * -> *) a.
Monad m =>
Dom' t (m a) -> m (Dom' t a))
-> Traversable (Dom' t)
(a -> f b) -> Dom' t a -> f (Dom' t b)
forall t. Functor (Dom' t)
forall t. Foldable (Dom' t)
forall t (m :: * -> *) a. Monad m => Dom' t (m a) -> m (Dom' t a)
forall t (f :: * -> *) a.
Applicative f =>
Dom' t (f a) -> f (Dom' t a)
forall t (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Dom' t a -> m (Dom' t b)
forall t (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Dom' t a -> f (Dom' t b)
forall (t :: * -> *).
(Functor t, Foldable t) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a. Monad m => Dom' t (m a) -> m (Dom' t a)
forall (f :: * -> *) a.
Applicative f =>
Dom' t (f a) -> f (Dom' t a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Dom' t a -> m (Dom' t b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Dom' t a -> f (Dom' t b)
sequence :: Dom' t (m a) -> m (Dom' t a)
$csequence :: forall t (m :: * -> *) a. Monad m => Dom' t (m a) -> m (Dom' t a)
mapM :: (a -> m b) -> Dom' t a -> m (Dom' t b)
$cmapM :: forall t (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Dom' t a -> m (Dom' t b)
sequenceA :: Dom' t (f a) -> f (Dom' t a)
$csequenceA :: forall t (f :: * -> *) a.
Applicative f =>
Dom' t (f a) -> f (Dom' t a)
traverse :: (a -> f b) -> Dom' t a -> f (Dom' t b)
$ctraverse :: forall t (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Dom' t a -> f (Dom' t b)
$cp2Traversable :: forall t. Foldable (Dom' t)
$cp1Traversable :: forall t. Functor (Dom' t)
Traversable)
type Dom = Dom' Term
instance Decoration (Dom' t) where
traverseF :: (a -> m b) -> Dom' t a -> m (Dom' t b)
traverseF f :: a -> m b
f (Dom ai :: ArgInfo
ai b :: Bool
b x :: Maybe NamedName
x t :: Maybe t
t a :: a
a) = ArgInfo -> Bool -> Maybe NamedName -> Maybe t -> b -> Dom' t b
forall t e.
ArgInfo -> Bool -> Maybe NamedName -> Maybe t -> e -> Dom' t e
Dom ArgInfo
ai Bool
b Maybe NamedName
x Maybe t
t (b -> Dom' t b) -> m b -> m (Dom' t b)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> a -> m b
f a
a
instance HasRange a => HasRange (Dom' t a) where
getRange :: Dom' t a -> Range
getRange = a -> Range
forall t. HasRange t => t -> Range
getRange (a -> Range) -> (Dom' t a -> a) -> Dom' t a -> Range
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Dom' t a -> a
forall t e. Dom' t e -> e
unDom
instance (KillRange t, KillRange a) => KillRange (Dom' t a) where
killRange :: KillRangeT (Dom' t a)
killRange (Dom info :: ArgInfo
info b :: Bool
b x :: Maybe NamedName
x t :: Maybe t
t a :: a
a) = (ArgInfo -> Bool -> Maybe NamedName -> Maybe t -> a -> Dom' t a)
-> ArgInfo -> Bool -> Maybe NamedName -> Maybe t -> a -> Dom' t a
forall a b c d e f.
(KillRange a, KillRange b, KillRange c, KillRange d,
KillRange e) =>
(a -> b -> c -> d -> e -> f) -> a -> b -> c -> d -> e -> f
killRange5 ArgInfo -> Bool -> Maybe NamedName -> Maybe t -> a -> Dom' t a
forall t e.
ArgInfo -> Bool -> Maybe NamedName -> Maybe t -> e -> Dom' t e
Dom ArgInfo
info Bool
b Maybe NamedName
x Maybe t
t a
a
instance Eq a => Eq (Dom' t a) where
Dom (ArgInfo h1 :: Hiding
h1 m1 :: Modality
m1 _ _) b1 :: Bool
b1 s1 :: Maybe NamedName
s1 _ x1 :: a
x1 == :: Dom' t a -> Dom' t a -> Bool
== Dom (ArgInfo h2 :: Hiding
h2 m2 :: Modality
m2 _ _) b2 :: Bool
b2 s2 :: Maybe NamedName
s2 _ x2 :: a
x2 =
(Hiding
h1, Modality
m1, Bool
b1, Maybe NamedName
s1, a
x1) (Hiding, Modality, Bool, Maybe NamedName, a)
-> (Hiding, Modality, Bool, Maybe NamedName, a) -> Bool
forall a. Eq a => a -> a -> Bool
== (Hiding
h2, Modality
m2, Bool
b2, Maybe NamedName
s2, a
x2)
instance LensNamed NamedName (Dom' t e) where
lensNamed :: (Maybe NamedName -> f (Maybe NamedName))
-> Dom' t e -> f (Dom' t e)
lensNamed f :: Maybe NamedName -> f (Maybe NamedName)
f dom :: Dom' t e
dom = Maybe NamedName -> f (Maybe NamedName)
f (Dom' t e -> Maybe NamedName
forall t e. Dom' t e -> Maybe NamedName
domName Dom' t e
dom) f (Maybe NamedName)
-> (Maybe NamedName -> Dom' t e) -> f (Dom' t e)
forall (m :: * -> *) a b. Functor m => m a -> (a -> b) -> m b
<&> \ nm :: Maybe NamedName
nm -> Dom' t e
dom { domName :: Maybe NamedName
domName = Maybe NamedName
nm }
instance LensArgInfo (Dom' t e) where
getArgInfo :: Dom' t e -> ArgInfo
getArgInfo = Dom' t e -> ArgInfo
forall t e. Dom' t e -> ArgInfo
domInfo
setArgInfo :: ArgInfo -> Dom' t e -> Dom' t e
setArgInfo ai :: ArgInfo
ai dom :: Dom' t e
dom = Dom' t e
dom { domInfo :: ArgInfo
domInfo = ArgInfo
ai }
mapArgInfo :: (ArgInfo -> ArgInfo) -> Dom' t e -> Dom' t e
mapArgInfo f :: ArgInfo -> ArgInfo
f dom :: Dom' t e
dom = Dom' t e
dom { domInfo :: ArgInfo
domInfo = ArgInfo -> ArgInfo
f (ArgInfo -> ArgInfo) -> ArgInfo -> ArgInfo
forall a b. (a -> b) -> a -> b
$ Dom' t e -> ArgInfo
forall t e. Dom' t e -> ArgInfo
domInfo Dom' t e
dom }
instance LensHiding (Dom' t e) where
instance LensModality (Dom' t e) where
instance LensOrigin (Dom' t e) where
instance LensFreeVariables (Dom' t e) where
instance LensRelevance (Dom' t e) where
instance LensQuantity (Dom' t e) where
instance LensCohesion (Dom' t e) where
argFromDom :: Dom' t a -> Arg a
argFromDom :: Dom' t a -> Arg a
argFromDom Dom{domInfo :: forall t e. Dom' t e -> ArgInfo
domInfo = ArgInfo
i, unDom :: forall t e. Dom' t e -> e
unDom = a
a} = ArgInfo -> a -> Arg a
forall e. ArgInfo -> e -> Arg e
Arg ArgInfo
i a
a
namedArgFromDom :: Dom' t a -> NamedArg a
namedArgFromDom :: Dom' t a -> NamedArg a
namedArgFromDom Dom{domInfo :: forall t e. Dom' t e -> ArgInfo
domInfo = ArgInfo
i, domName :: forall t e. Dom' t e -> Maybe NamedName
domName = Maybe NamedName
s, unDom :: forall t e. Dom' t e -> e
unDom = a
a} = ArgInfo -> Named NamedName a -> NamedArg a
forall e. ArgInfo -> e -> Arg e
Arg ArgInfo
i (Named NamedName a -> NamedArg a)
-> Named NamedName a -> NamedArg a
forall a b. (a -> b) -> a -> b
$ Maybe NamedName -> a -> Named NamedName a
forall name a. Maybe name -> a -> Named name a
Named Maybe NamedName
s a
a
domFromArg :: Arg a -> Dom a
domFromArg :: Arg a -> Dom a
domFromArg (Arg i :: ArgInfo
i a :: a
a) = ArgInfo -> Bool -> Maybe NamedName -> Maybe Term -> a -> Dom a
forall t e.
ArgInfo -> Bool -> Maybe NamedName -> Maybe t -> e -> Dom' t e
Dom ArgInfo
i Bool
False Maybe NamedName
forall a. Maybe a
Nothing Maybe Term
forall a. Maybe a
Nothing a
a
domFromNamedArg :: NamedArg a -> Dom a
domFromNamedArg :: NamedArg a -> Dom a
domFromNamedArg (Arg i :: ArgInfo
i a :: Named_ a
a) = ArgInfo -> Bool -> Maybe NamedName -> Maybe Term -> a -> Dom a
forall t e.
ArgInfo -> Bool -> Maybe NamedName -> Maybe t -> e -> Dom' t e
Dom ArgInfo
i Bool
False (Named_ a -> Maybe NamedName
forall name a. Named name a -> Maybe name
nameOf Named_ a
a) Maybe Term
forall a. Maybe a
Nothing (Named_ a -> a
forall name a. Named name a -> a
namedThing Named_ a
a)
defaultDom :: a -> Dom a
defaultDom :: a -> Dom a
defaultDom = ArgInfo -> a -> Dom a
forall a. ArgInfo -> a -> Dom a
defaultArgDom ArgInfo
defaultArgInfo
defaultArgDom :: ArgInfo -> a -> Dom a
defaultArgDom :: ArgInfo -> a -> Dom a
defaultArgDom info :: ArgInfo
info x :: a
x = Arg a -> Dom a
forall a. Arg a -> Dom a
domFromArg (ArgInfo -> a -> Arg a
forall e. ArgInfo -> e -> Arg e
Arg ArgInfo
info a
x)
defaultNamedArgDom :: ArgInfo -> String -> a -> Dom a
defaultNamedArgDom :: ArgInfo -> String -> a -> Dom a
defaultNamedArgDom info :: ArgInfo
info s :: String
s x :: a
x = (ArgInfo -> a -> Dom a
forall a. ArgInfo -> a -> Dom a
defaultArgDom ArgInfo
info a
x) { domName :: Maybe NamedName
domName = NamedName -> Maybe NamedName
forall a. a -> Maybe a
Just (NamedName -> Maybe NamedName) -> NamedName -> Maybe NamedName
forall a b. (a -> b) -> a -> b
$ Origin -> Ranged String -> NamedName
forall a. Origin -> a -> WithOrigin a
WithOrigin Origin
Inserted (Ranged String -> NamedName) -> Ranged String -> NamedName
forall a b. (a -> b) -> a -> b
$ String -> Ranged String
forall a. a -> Ranged a
unranged String
s }
type Args = [Arg Term]
type NamedArgs = [NamedArg Term]
data ConHead = ConHead
{ ConHead -> QName
conName :: QName
, ConHead -> Induction
conInductive :: Induction
, ConHead -> [Arg QName]
conFields :: [Arg QName]
} deriving (Typeable ConHead
DataType
Constr
Typeable ConHead =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ConHead -> c ConHead)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ConHead)
-> (ConHead -> Constr)
-> (ConHead -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ConHead))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ConHead))
-> ((forall b. Data b => b -> b) -> ConHead -> ConHead)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ConHead -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ConHead -> r)
-> (forall u. (forall d. Data d => d -> u) -> ConHead -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> ConHead -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ConHead -> m ConHead)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ConHead -> m ConHead)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ConHead -> m ConHead)
-> Data ConHead
ConHead -> DataType
ConHead -> Constr
(forall b. Data b => b -> b) -> ConHead -> ConHead
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ConHead -> c ConHead
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ConHead
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) -> ConHead -> u
forall u. (forall d. Data d => d -> u) -> ConHead -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ConHead -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ConHead -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ConHead -> m ConHead
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ConHead -> m ConHead
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ConHead
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ConHead -> c ConHead
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ConHead)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ConHead)
$cConHead :: Constr
$tConHead :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> ConHead -> m ConHead
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ConHead -> m ConHead
gmapMp :: (forall d. Data d => d -> m d) -> ConHead -> m ConHead
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ConHead -> m ConHead
gmapM :: (forall d. Data d => d -> m d) -> ConHead -> m ConHead
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ConHead -> m ConHead
gmapQi :: Int -> (forall d. Data d => d -> u) -> ConHead -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ConHead -> u
gmapQ :: (forall d. Data d => d -> u) -> ConHead -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ConHead -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ConHead -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ConHead -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ConHead -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ConHead -> r
gmapT :: (forall b. Data b => b -> b) -> ConHead -> ConHead
$cgmapT :: (forall b. Data b => b -> b) -> ConHead -> ConHead
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ConHead)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ConHead)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c ConHead)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ConHead)
dataTypeOf :: ConHead -> DataType
$cdataTypeOf :: ConHead -> DataType
toConstr :: ConHead -> Constr
$ctoConstr :: ConHead -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ConHead
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ConHead
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ConHead -> c ConHead
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ConHead -> c ConHead
$cp1Data :: Typeable ConHead
Data, Int -> ConHead -> ShowS
[ConHead] -> ShowS
ConHead -> String
(Int -> ConHead -> ShowS)
-> (ConHead -> String) -> ([ConHead] -> ShowS) -> Show ConHead
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConHead] -> ShowS
$cshowList :: [ConHead] -> ShowS
show :: ConHead -> String
$cshow :: ConHead -> String
showsPrec :: Int -> ConHead -> ShowS
$cshowsPrec :: Int -> ConHead -> ShowS
Show)
instance Eq ConHead where
== :: ConHead -> ConHead -> Bool
(==) = QName -> QName -> Bool
forall a. Eq a => a -> a -> Bool
(==) (QName -> QName -> Bool)
-> (ConHead -> QName) -> ConHead -> ConHead -> Bool
forall b c a. (b -> b -> c) -> (a -> b) -> a -> a -> c
`on` ConHead -> QName
conName
instance Ord ConHead where
<= :: ConHead -> ConHead -> Bool
(<=) = QName -> QName -> Bool
forall a. Ord a => a -> a -> Bool
(<=) (QName -> QName -> Bool)
-> (ConHead -> QName) -> ConHead -> ConHead -> Bool
forall b c a. (b -> b -> c) -> (a -> b) -> a -> a -> c
`on` ConHead -> QName
conName
instance Pretty ConHead where
pretty :: ConHead -> Doc
pretty = QName -> Doc
forall a. Pretty a => a -> Doc
pretty (QName -> Doc) -> (ConHead -> QName) -> ConHead -> Doc
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ConHead -> QName
conName
instance HasRange ConHead where
getRange :: ConHead -> Range
getRange = QName -> Range
forall t. HasRange t => t -> Range
getRange (QName -> Range) -> (ConHead -> QName) -> ConHead -> Range
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ConHead -> QName
conName
instance SetRange ConHead where
setRange :: Range -> ConHead -> ConHead
setRange r :: Range
r = (QName -> QName) -> ConHead -> ConHead
forall a. LensConName a => (QName -> QName) -> a -> a
mapConName (Range -> QName -> QName
forall t. SetRange t => Range -> t -> t
setRange Range
r)
class LensConName a where
getConName :: a -> QName
setConName :: QName -> a -> a
setConName = (QName -> QName) -> a -> a
forall a. LensConName a => (QName -> QName) -> a -> a
mapConName ((QName -> QName) -> a -> a)
-> (QName -> QName -> QName) -> QName -> a -> a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. QName -> QName -> QName
forall a b. a -> b -> a
const
mapConName :: (QName -> QName) -> a -> a
mapConName f :: QName -> QName
f a :: a
a = QName -> a -> a
forall a. LensConName a => QName -> a -> a
setConName (QName -> QName
f (a -> QName
forall a. LensConName a => a -> QName
getConName a
a)) a
a
instance LensConName ConHead where
getConName :: ConHead -> QName
getConName = ConHead -> QName
conName
setConName :: QName -> ConHead -> ConHead
setConName c :: QName
c con :: ConHead
con = ConHead
con { conName :: QName
conName = QName
c }
data Term = Var {-# UNPACK #-} !Int Elims
| Lam ArgInfo (Abs Term)
| Lit Literal
| Def QName Elims
| Con ConHead ConInfo Elims
| Pi (Dom Type) (Abs Type)
| Sort Sort
| Level Level
| MetaV {-# UNPACK #-} !MetaId Elims
| DontCare Term
| Dummy String Elims
deriving (Typeable Term
DataType
Constr
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 -> DataType
Term -> Constr
(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)
$cDummy :: Constr
$cDontCare :: Constr
$cMetaV :: Constr
$cLevel :: Constr
$cSort :: Constr
$cPi :: Constr
$cCon :: Constr
$cDef :: Constr
$cLit :: Constr
$cLam :: Constr
$cVar :: 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, 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)
type ConInfo = ConOrigin
data Elim' a
= Apply (Arg a)
| Proj ProjOrigin QName
| IApply a a a
deriving (Typeable (Elim' a)
DataType
Constr
Typeable (Elim' a) =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Elim' a -> c (Elim' a))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Elim' a))
-> (Elim' a -> Constr)
-> (Elim' a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Elim' a)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Elim' a)))
-> ((forall b. Data b => b -> b) -> Elim' a -> Elim' a)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Elim' a -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Elim' a -> r)
-> (forall u. (forall d. Data d => d -> u) -> Elim' a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Elim' a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Elim' a -> m (Elim' a))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Elim' a -> m (Elim' a))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Elim' a -> m (Elim' a))
-> Data (Elim' a)
Elim' a -> DataType
Elim' a -> Constr
(forall d. Data d => c (t d)) -> Maybe (c (Elim' a))
(forall b. Data b => b -> b) -> Elim' a -> Elim' a
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Elim' a -> c (Elim' a)
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Elim' a)
forall a. Data a => Typeable (Elim' a)
forall a. Data a => Elim' a -> DataType
forall a. Data a => Elim' a -> Constr
forall a.
Data a =>
(forall b. Data b => b -> b) -> Elim' a -> Elim' a
forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> Elim' a -> u
forall a u.
Data a =>
(forall d. Data d => d -> u) -> Elim' a -> [u]
forall a r r'.
Data a =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Elim' a -> r
forall a r r'.
Data a =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Elim' a -> r
forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d) -> Elim' a -> m (Elim' a)
forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Elim' a -> m (Elim' a)
forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Elim' a)
forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Elim' a -> c (Elim' a)
forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Elim' a))
forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Elim' 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) -> Elim' a -> u
forall u. (forall d. Data d => d -> u) -> Elim' a -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Elim' a -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Elim' a -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Elim' a -> m (Elim' a)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Elim' a -> m (Elim' a)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Elim' a)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Elim' a -> c (Elim' a)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Elim' a))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Elim' a))
$cIApply :: Constr
$cProj :: Constr
$cApply :: Constr
$tElim' :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Elim' a -> m (Elim' a)
$cgmapMo :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Elim' a -> m (Elim' a)
gmapMp :: (forall d. Data d => d -> m d) -> Elim' a -> m (Elim' a)
$cgmapMp :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Elim' a -> m (Elim' a)
gmapM :: (forall d. Data d => d -> m d) -> Elim' a -> m (Elim' a)
$cgmapM :: forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d) -> Elim' a -> m (Elim' a)
gmapQi :: Int -> (forall d. Data d => d -> u) -> Elim' a -> u
$cgmapQi :: forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> Elim' a -> u
gmapQ :: (forall d. Data d => d -> u) -> Elim' a -> [u]
$cgmapQ :: forall a u.
Data a =>
(forall d. Data d => d -> u) -> Elim' a -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Elim' a -> r
$cgmapQr :: forall a r r'.
Data a =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Elim' a -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Elim' a -> r
$cgmapQl :: forall a r r'.
Data a =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Elim' a -> r
gmapT :: (forall b. Data b => b -> b) -> Elim' a -> Elim' a
$cgmapT :: forall a.
Data a =>
(forall b. Data b => b -> b) -> Elim' a -> Elim' a
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Elim' a))
$cdataCast2 :: forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Elim' a))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (Elim' a))
$cdataCast1 :: forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Elim' a))
dataTypeOf :: Elim' a -> DataType
$cdataTypeOf :: forall a. Data a => Elim' a -> DataType
toConstr :: Elim' a -> Constr
$ctoConstr :: forall a. Data a => Elim' a -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Elim' a)
$cgunfold :: forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Elim' a)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Elim' a -> c (Elim' a)
$cgfoldl :: forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Elim' a -> c (Elim' a)
$cp1Data :: forall a. Data a => Typeable (Elim' a)
Data, Int -> Elim' a -> ShowS
[Elim' a] -> ShowS
Elim' a -> String
(Int -> Elim' a -> ShowS)
-> (Elim' a -> String) -> ([Elim' a] -> ShowS) -> Show (Elim' a)
forall a. Show a => Int -> Elim' a -> ShowS
forall a. Show a => [Elim' a] -> ShowS
forall a. Show a => Elim' a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Elim' a] -> ShowS
$cshowList :: forall a. Show a => [Elim' a] -> ShowS
show :: Elim' a -> String
$cshow :: forall a. Show a => Elim' a -> String
showsPrec :: Int -> Elim' a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> Elim' a -> ShowS
Show, a -> Elim' b -> Elim' a
(a -> b) -> Elim' a -> Elim' b
(forall a b. (a -> b) -> Elim' a -> Elim' b)
-> (forall a b. a -> Elim' b -> Elim' a) -> Functor Elim'
forall a b. a -> Elim' b -> Elim' a
forall a b. (a -> b) -> Elim' a -> Elim' b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> Elim' b -> Elim' a
$c<$ :: forall a b. a -> Elim' b -> Elim' a
fmap :: (a -> b) -> Elim' a -> Elim' b
$cfmap :: forall a b. (a -> b) -> Elim' a -> Elim' b
Functor, Elim' a -> Bool
(a -> m) -> Elim' a -> m
(a -> b -> b) -> b -> Elim' a -> b
(forall m. Monoid m => Elim' m -> m)
-> (forall m a. Monoid m => (a -> m) -> Elim' a -> m)
-> (forall m a. Monoid m => (a -> m) -> Elim' a -> m)
-> (forall a b. (a -> b -> b) -> b -> Elim' a -> b)
-> (forall a b. (a -> b -> b) -> b -> Elim' a -> b)
-> (forall b a. (b -> a -> b) -> b -> Elim' a -> b)
-> (forall b a. (b -> a -> b) -> b -> Elim' a -> b)
-> (forall a. (a -> a -> a) -> Elim' a -> a)
-> (forall a. (a -> a -> a) -> Elim' a -> a)
-> (forall a. Elim' a -> [a])
-> (forall a. Elim' a -> Bool)
-> (forall a. Elim' a -> Int)
-> (forall a. Eq a => a -> Elim' a -> Bool)
-> (forall a. Ord a => Elim' a -> a)
-> (forall a. Ord a => Elim' a -> a)
-> (forall a. Num a => Elim' a -> a)
-> (forall a. Num a => Elim' a -> a)
-> Foldable Elim'
forall a. Eq a => a -> Elim' a -> Bool
forall a. Num a => Elim' a -> a
forall a. Ord a => Elim' a -> a
forall m. Monoid m => Elim' m -> m
forall a. Elim' a -> Bool
forall a. Elim' a -> Int
forall a. Elim' a -> [a]
forall a. (a -> a -> a) -> Elim' a -> a
forall m a. Monoid m => (a -> m) -> Elim' a -> m
forall b a. (b -> a -> b) -> b -> Elim' a -> b
forall a b. (a -> b -> b) -> b -> Elim' a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: Elim' a -> a
$cproduct :: forall a. Num a => Elim' a -> a
sum :: Elim' a -> a
$csum :: forall a. Num a => Elim' a -> a
minimum :: Elim' a -> a
$cminimum :: forall a. Ord a => Elim' a -> a
maximum :: Elim' a -> a
$cmaximum :: forall a. Ord a => Elim' a -> a
elem :: a -> Elim' a -> Bool
$celem :: forall a. Eq a => a -> Elim' a -> Bool
length :: Elim' a -> Int
$clength :: forall a. Elim' a -> Int
null :: Elim' a -> Bool
$cnull :: forall a. Elim' a -> Bool
toList :: Elim' a -> [a]
$ctoList :: forall a. Elim' a -> [a]
foldl1 :: (a -> a -> a) -> Elim' a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> Elim' a -> a
foldr1 :: (a -> a -> a) -> Elim' a -> a
$cfoldr1 :: forall a. (a -> a -> a) -> Elim' a -> a
foldl' :: (b -> a -> b) -> b -> Elim' a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> Elim' a -> b
foldl :: (b -> a -> b) -> b -> Elim' a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> Elim' a -> b
foldr' :: (a -> b -> b) -> b -> Elim' a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> Elim' a -> b
foldr :: (a -> b -> b) -> b -> Elim' a -> b
$cfoldr :: forall a b. (a -> b -> b) -> b -> Elim' a -> b
foldMap' :: (a -> m) -> Elim' a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> Elim' a -> m
foldMap :: (a -> m) -> Elim' a -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> Elim' a -> m
fold :: Elim' m -> m
$cfold :: forall m. Monoid m => Elim' m -> m
Foldable, Functor Elim'
Foldable Elim'
(Functor Elim', Foldable Elim') =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Elim' a -> f (Elim' b))
-> (forall (f :: * -> *) a.
Applicative f =>
Elim' (f a) -> f (Elim' a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Elim' a -> m (Elim' b))
-> (forall (m :: * -> *) a. Monad m => Elim' (m a) -> m (Elim' a))
-> Traversable Elim'
(a -> f b) -> Elim' a -> f (Elim' b)
forall (t :: * -> *).
(Functor t, Foldable t) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a. Monad m => Elim' (m a) -> m (Elim' a)
forall (f :: * -> *) a. Applicative f => Elim' (f a) -> f (Elim' a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Elim' a -> m (Elim' b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Elim' a -> f (Elim' b)
sequence :: Elim' (m a) -> m (Elim' a)
$csequence :: forall (m :: * -> *) a. Monad m => Elim' (m a) -> m (Elim' a)
mapM :: (a -> m b) -> Elim' a -> m (Elim' b)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Elim' a -> m (Elim' b)
sequenceA :: Elim' (f a) -> f (Elim' a)
$csequenceA :: forall (f :: * -> *) a. Applicative f => Elim' (f a) -> f (Elim' a)
traverse :: (a -> f b) -> Elim' a -> f (Elim' b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Elim' a -> f (Elim' b)
$cp2Traversable :: Foldable Elim'
$cp1Traversable :: Functor Elim'
Traversable)
type Elim = Elim' Term
type Elims = [Elim]
instance LensOrigin (Elim' a) where
getOrigin :: Elim' a -> Origin
getOrigin (Apply a :: Arg a
a) = Arg a -> Origin
forall a. LensOrigin a => a -> Origin
getOrigin Arg a
a
getOrigin Proj{} = Origin
UserWritten
getOrigin IApply{} = Origin
UserWritten
mapOrigin :: (Origin -> Origin) -> Elim' a -> Elim' a
mapOrigin f :: Origin -> Origin
f (Apply a :: Arg a
a) = Arg a -> Elim' a
forall a. Arg a -> Elim' a
Apply (Arg a -> Elim' a) -> Arg a -> Elim' a
forall a b. (a -> b) -> a -> b
$ (Origin -> Origin) -> Arg a -> Arg a
forall a. LensOrigin a => (Origin -> Origin) -> a -> a
mapOrigin Origin -> Origin
f Arg a
a
mapOrigin f :: Origin -> Origin
f e :: Elim' a
e@Proj{} = Elim' a
e
mapOrigin f :: Origin -> Origin
f e :: Elim' a
e@IApply{} = Elim' a
e
data Abs a = Abs { Abs a -> String
absName :: ArgName, Abs a -> a
unAbs :: a }
| NoAbs { absName :: ArgName, unAbs :: a }
deriving (Typeable (Abs a)
DataType
Constr
Typeable (Abs a) =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Abs a -> c (Abs a))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Abs a))
-> (Abs a -> Constr)
-> (Abs a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Abs a)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Abs a)))
-> ((forall b. Data b => b -> b) -> Abs a -> Abs a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Abs a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Abs a -> r)
-> (forall u. (forall d. Data d => d -> u) -> Abs a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Abs a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Abs a -> m (Abs a))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Abs a -> m (Abs a))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Abs a -> m (Abs a))
-> Data (Abs a)
Abs a -> DataType
Abs a -> Constr
(forall d. Data d => c (t d)) -> Maybe (c (Abs a))
(forall b. Data b => b -> b) -> Abs a -> Abs a
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Abs a -> c (Abs a)
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Abs a)
forall a. Data a => Typeable (Abs a)
forall a. Data a => Abs a -> DataType
forall a. Data a => Abs a -> Constr
forall a. Data a => (forall b. Data b => b -> b) -> Abs a -> Abs a
forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> Abs a -> u
forall a u. Data a => (forall d. Data d => d -> u) -> Abs a -> [u]
forall a r r'.
Data a =>
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Abs a -> r
forall a r r'.
Data a =>
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Abs a -> r
forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d) -> Abs a -> m (Abs a)
forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Abs a -> m (Abs a)
forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Abs a)
forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Abs a -> c (Abs a)
forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Abs a))
forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Abs 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) -> Abs a -> u
forall u. (forall d. Data d => d -> u) -> Abs a -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Abs a -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Abs a -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Abs a -> m (Abs a)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Abs a -> m (Abs a)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Abs a)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Abs a -> c (Abs a)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Abs a))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Abs a))
$cNoAbs :: Constr
$cAbs :: Constr
$tAbs :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Abs a -> m (Abs a)
$cgmapMo :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Abs a -> m (Abs a)
gmapMp :: (forall d. Data d => d -> m d) -> Abs a -> m (Abs a)
$cgmapMp :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Abs a -> m (Abs a)
gmapM :: (forall d. Data d => d -> m d) -> Abs a -> m (Abs a)
$cgmapM :: forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d) -> Abs a -> m (Abs a)
gmapQi :: Int -> (forall d. Data d => d -> u) -> Abs a -> u
$cgmapQi :: forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> Abs a -> u
gmapQ :: (forall d. Data d => d -> u) -> Abs a -> [u]
$cgmapQ :: forall a u. Data a => (forall d. Data d => d -> u) -> Abs a -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Abs a -> r
$cgmapQr :: forall a r r'.
Data a =>
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Abs a -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Abs a -> r
$cgmapQl :: forall a r r'.
Data a =>
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Abs a -> r
gmapT :: (forall b. Data b => b -> b) -> Abs a -> Abs a
$cgmapT :: forall a. Data a => (forall b. Data b => b -> b) -> Abs a -> Abs a
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Abs a))
$cdataCast2 :: forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Abs a))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (Abs a))
$cdataCast1 :: forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Abs a))
dataTypeOf :: Abs a -> DataType
$cdataTypeOf :: forall a. Data a => Abs a -> DataType
toConstr :: Abs a -> Constr
$ctoConstr :: forall a. Data a => Abs a -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Abs a)
$cgunfold :: forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Abs a)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Abs a -> c (Abs a)
$cgfoldl :: forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Abs a -> c (Abs a)
$cp1Data :: forall a. Data a => Typeable (Abs a)
Data, a -> Abs b -> Abs a
(a -> b) -> Abs a -> Abs b
(forall a b. (a -> b) -> Abs a -> Abs b)
-> (forall a b. a -> Abs b -> Abs a) -> Functor Abs
forall a b. a -> Abs b -> Abs a
forall a b. (a -> b) -> Abs a -> Abs b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> Abs b -> Abs a
$c<$ :: forall a b. a -> Abs b -> Abs a
fmap :: (a -> b) -> Abs a -> Abs b
$cfmap :: forall a b. (a -> b) -> Abs a -> Abs b
Functor, Abs a -> Bool
(a -> m) -> Abs a -> m
(a -> b -> b) -> b -> Abs a -> b
(forall m. Monoid m => Abs m -> m)
-> (forall m a. Monoid m => (a -> m) -> Abs a -> m)
-> (forall m a. Monoid m => (a -> m) -> Abs a -> m)
-> (forall a b. (a -> b -> b) -> b -> Abs a -> b)
-> (forall a b. (a -> b -> b) -> b -> Abs a -> b)
-> (forall b a. (b -> a -> b) -> b -> Abs a -> b)
-> (forall b a. (b -> a -> b) -> b -> Abs a -> b)
-> (forall a. (a -> a -> a) -> Abs a -> a)
-> (forall a. (a -> a -> a) -> Abs a -> a)
-> (forall a. Abs a -> [a])
-> (forall a. Abs a -> Bool)
-> (forall a. Abs a -> Int)
-> (forall a. Eq a => a -> Abs a -> Bool)
-> (forall a. Ord a => Abs a -> a)
-> (forall a. Ord a => Abs a -> a)
-> (forall a. Num a => Abs a -> a)
-> (forall a. Num a => Abs a -> a)
-> Foldable Abs
forall a. Eq a => a -> Abs a -> Bool
forall a. Num a => Abs a -> a
forall a. Ord a => Abs a -> a
forall m. Monoid m => Abs m -> m
forall a. Abs a -> Bool
forall a. Abs a -> Int
forall a. Abs a -> [a]
forall a. (a -> a -> a) -> Abs a -> a
forall m a. Monoid m => (a -> m) -> Abs a -> m
forall b a. (b -> a -> b) -> b -> Abs a -> b
forall a b. (a -> b -> b) -> b -> Abs a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: Abs a -> a
$cproduct :: forall a. Num a => Abs a -> a
sum :: Abs a -> a
$csum :: forall a. Num a => Abs a -> a
minimum :: Abs a -> a
$cminimum :: forall a. Ord a => Abs a -> a
maximum :: Abs a -> a
$cmaximum :: forall a. Ord a => Abs a -> a
elem :: a -> Abs a -> Bool
$celem :: forall a. Eq a => a -> Abs a -> Bool
length :: Abs a -> Int
$clength :: forall a. Abs a -> Int
null :: Abs a -> Bool
$cnull :: forall a. Abs a -> Bool
toList :: Abs a -> [a]
$ctoList :: forall a. Abs a -> [a]
foldl1 :: (a -> a -> a) -> Abs a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> Abs a -> a
foldr1 :: (a -> a -> a) -> Abs a -> a
$cfoldr1 :: forall a. (a -> a -> a) -> Abs a -> a
foldl' :: (b -> a -> b) -> b -> Abs a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> Abs a -> b
foldl :: (b -> a -> b) -> b -> Abs a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> Abs a -> b
foldr' :: (a -> b -> b) -> b -> Abs a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> Abs a -> b
foldr :: (a -> b -> b) -> b -> Abs a -> b
$cfoldr :: forall a b. (a -> b -> b) -> b -> Abs a -> b
foldMap' :: (a -> m) -> Abs a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> Abs a -> m
foldMap :: (a -> m) -> Abs a -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> Abs a -> m
fold :: Abs m -> m
$cfold :: forall m. Monoid m => Abs m -> m
Foldable, Functor Abs
Foldable Abs
(Functor Abs, Foldable Abs) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Abs a -> f (Abs b))
-> (forall (f :: * -> *) a.
Applicative f =>
Abs (f a) -> f (Abs a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Abs a -> m (Abs b))
-> (forall (m :: * -> *) a. Monad m => Abs (m a) -> m (Abs a))
-> Traversable Abs
(a -> f b) -> Abs a -> f (Abs b)
forall (t :: * -> *).
(Functor t, Foldable t) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a. Monad m => Abs (m a) -> m (Abs a)
forall (f :: * -> *) a. Applicative f => Abs (f a) -> f (Abs a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Abs a -> m (Abs b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Abs a -> f (Abs b)
sequence :: Abs (m a) -> m (Abs a)
$csequence :: forall (m :: * -> *) a. Monad m => Abs (m a) -> m (Abs a)
mapM :: (a -> m b) -> Abs a -> m (Abs b)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Abs a -> m (Abs b)
sequenceA :: Abs (f a) -> f (Abs a)
$csequenceA :: forall (f :: * -> *) a. Applicative f => Abs (f a) -> f (Abs a)
traverse :: (a -> f b) -> Abs a -> f (Abs b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Abs a -> f (Abs b)
$cp2Traversable :: Foldable Abs
$cp1Traversable :: Functor Abs
Traversable)
instance Decoration Abs where
traverseF :: (a -> m b) -> Abs a -> m (Abs b)
traverseF f :: a -> m b
f (Abs x :: String
x a :: a
a) = String -> b -> Abs b
forall a. String -> a -> Abs a
Abs String
x (b -> Abs b) -> m b -> m (Abs b)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> a -> m b
f a
a
traverseF f :: a -> m b
f (NoAbs x :: String
x a :: a
a) = String -> b -> Abs b
forall a. String -> a -> Abs a
NoAbs String
x (b -> Abs b) -> m b -> m (Abs b)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> a -> m b
f a
a
data Type'' t a = El { Type'' t a -> Sort' t
_getSort :: Sort' t, Type'' t a -> a
unEl :: a }
deriving (Typeable (Type'' t a)
DataType
Constr
Typeable (Type'' t a) =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Type'' t a -> c (Type'' t a))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Type'' t a))
-> (Type'' t a -> Constr)
-> (Type'' t a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Type'' t a)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Type'' t a)))
-> ((forall b. Data b => b -> b) -> Type'' t a -> Type'' t a)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Type'' t a -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Type'' t a -> r)
-> (forall u. (forall d. Data d => d -> u) -> Type'' t a -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> Type'' t a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Type'' t a -> m (Type'' t a))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Type'' t a -> m (Type'' t a))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Type'' t a -> m (Type'' t a))
-> Data (Type'' t a)
Type'' t a -> DataType
Type'' t a -> Constr
(forall b. Data b => b -> b) -> Type'' t a -> Type'' t a
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Type'' t a -> c (Type'' t a)
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Type'' t a)
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Type'' t 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) -> Type'' t a -> u
forall u. (forall d. Data d => d -> u) -> Type'' t a -> [u]
forall t a. (Data t, Data a) => Typeable (Type'' t a)
forall t a. (Data t, Data a) => Type'' t a -> DataType
forall t a. (Data t, Data a) => Type'' t a -> Constr
forall t a.
(Data t, Data a) =>
(forall b. Data b => b -> b) -> Type'' t a -> Type'' t a
forall t a u.
(Data t, Data a) =>
Int -> (forall d. Data d => d -> u) -> Type'' t a -> u
forall t a u.
(Data t, Data a) =>
(forall d. Data d => d -> u) -> Type'' t a -> [u]
forall t a r r'.
(Data t, Data a) =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Type'' t a -> r
forall t a r r'.
(Data t, Data a) =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Type'' t a -> r
forall t a (m :: * -> *).
(Data t, Data a, Monad m) =>
(forall d. Data d => d -> m d) -> Type'' t a -> m (Type'' t a)
forall t a (m :: * -> *).
(Data t, Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Type'' t a -> m (Type'' t a)
forall t a (c :: * -> *).
(Data t, Data a) =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Type'' t a)
forall t a (c :: * -> *).
(Data t, Data a) =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Type'' t a -> c (Type'' t a)
forall t a (t :: * -> *) (c :: * -> *).
(Data t, Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Type'' t a))
forall t a (t :: * -> * -> *) (c :: * -> *).
(Data t, Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Type'' t a))
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Type'' t a -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Type'' t a -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Type'' t a -> m (Type'' t a)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Type'' t a -> m (Type'' t a)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Type'' t a)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Type'' t a -> c (Type'' t a)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Type'' t a))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Type'' t a))
$cEl :: Constr
$tType'' :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Type'' t a -> m (Type'' t a)
$cgmapMo :: forall t a (m :: * -> *).
(Data t, Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Type'' t a -> m (Type'' t a)
gmapMp :: (forall d. Data d => d -> m d) -> Type'' t a -> m (Type'' t a)
$cgmapMp :: forall t a (m :: * -> *).
(Data t, Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Type'' t a -> m (Type'' t a)
gmapM :: (forall d. Data d => d -> m d) -> Type'' t a -> m (Type'' t a)
$cgmapM :: forall t a (m :: * -> *).
(Data t, Data a, Monad m) =>
(forall d. Data d => d -> m d) -> Type'' t a -> m (Type'' t a)
gmapQi :: Int -> (forall d. Data d => d -> u) -> Type'' t a -> u
$cgmapQi :: forall t a u.
(Data t, Data a) =>
Int -> (forall d. Data d => d -> u) -> Type'' t a -> u
gmapQ :: (forall d. Data d => d -> u) -> Type'' t a -> [u]
$cgmapQ :: forall t a u.
(Data t, Data a) =>
(forall d. Data d => d -> u) -> Type'' t a -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Type'' t a -> r
$cgmapQr :: forall t a r r'.
(Data t, Data a) =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Type'' t a -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Type'' t a -> r
$cgmapQl :: forall t a r r'.
(Data t, Data a) =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Type'' t a -> r
gmapT :: (forall b. Data b => b -> b) -> Type'' t a -> Type'' t a
$cgmapT :: forall t a.
(Data t, Data a) =>
(forall b. Data b => b -> b) -> Type'' t a -> Type'' t a
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Type'' t a))
$cdataCast2 :: forall t a (t :: * -> * -> *) (c :: * -> *).
(Data t, Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Type'' t a))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (Type'' t a))
$cdataCast1 :: forall t a (t :: * -> *) (c :: * -> *).
(Data t, Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Type'' t a))
dataTypeOf :: Type'' t a -> DataType
$cdataTypeOf :: forall t a. (Data t, Data a) => Type'' t a -> DataType
toConstr :: Type'' t a -> Constr
$ctoConstr :: forall t a. (Data t, Data a) => Type'' t a -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Type'' t a)
$cgunfold :: forall t a (c :: * -> *).
(Data t, Data a) =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Type'' t a)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Type'' t a -> c (Type'' t a)
$cgfoldl :: forall t a (c :: * -> *).
(Data t, Data a) =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Type'' t a -> c (Type'' t a)
$cp1Data :: forall t a. (Data t, Data a) => Typeable (Type'' t a)
Data, Int -> Type'' t a -> ShowS
[Type'' t a] -> ShowS
Type'' t a -> String
(Int -> Type'' t a -> ShowS)
-> (Type'' t a -> String)
-> ([Type'' t a] -> ShowS)
-> Show (Type'' t a)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
forall t a. (Show t, Show a) => Int -> Type'' t a -> ShowS
forall t a. (Show t, Show a) => [Type'' t a] -> ShowS
forall t a. (Show t, Show a) => Type'' t a -> String
showList :: [Type'' t a] -> ShowS
$cshowList :: forall t a. (Show t, Show a) => [Type'' t a] -> ShowS
show :: Type'' t a -> String
$cshow :: forall t a. (Show t, Show a) => Type'' t a -> String
showsPrec :: Int -> Type'' t a -> ShowS
$cshowsPrec :: forall t a. (Show t, Show a) => Int -> Type'' t a -> ShowS
Show, a -> Type'' t b -> Type'' t a
(a -> b) -> Type'' t a -> Type'' t b
(forall a b. (a -> b) -> Type'' t a -> Type'' t b)
-> (forall a b. a -> Type'' t b -> Type'' t a)
-> Functor (Type'' t)
forall a b. a -> Type'' t b -> Type'' t a
forall a b. (a -> b) -> Type'' t a -> Type'' t b
forall t a b. a -> Type'' t b -> Type'' t a
forall t a b. (a -> b) -> Type'' t a -> Type'' t b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> Type'' t b -> Type'' t a
$c<$ :: forall t a b. a -> Type'' t b -> Type'' t a
fmap :: (a -> b) -> Type'' t a -> Type'' t b
$cfmap :: forall t a b. (a -> b) -> Type'' t a -> Type'' t b
Functor, Type'' t a -> Bool
(a -> m) -> Type'' t a -> m
(a -> b -> b) -> b -> Type'' t a -> b
(forall m. Monoid m => Type'' t m -> m)
-> (forall m a. Monoid m => (a -> m) -> Type'' t a -> m)
-> (forall m a. Monoid m => (a -> m) -> Type'' t a -> m)
-> (forall a b. (a -> b -> b) -> b -> Type'' t a -> b)
-> (forall a b. (a -> b -> b) -> b -> Type'' t a -> b)
-> (forall b a. (b -> a -> b) -> b -> Type'' t a -> b)
-> (forall b a. (b -> a -> b) -> b -> Type'' t a -> b)
-> (forall a. (a -> a -> a) -> Type'' t a -> a)
-> (forall a. (a -> a -> a) -> Type'' t a -> a)
-> (forall a. Type'' t a -> [a])
-> (forall a. Type'' t a -> Bool)
-> (forall a. Type'' t a -> Int)
-> (forall a. Eq a => a -> Type'' t a -> Bool)
-> (forall a. Ord a => Type'' t a -> a)
-> (forall a. Ord a => Type'' t a -> a)
-> (forall a. Num a => Type'' t a -> a)
-> (forall a. Num a => Type'' t a -> a)
-> Foldable (Type'' t)
forall a. Eq a => a -> Type'' t a -> Bool
forall a. Num a => Type'' t a -> a
forall a. Ord a => Type'' t a -> a
forall m. Monoid m => Type'' t m -> m
forall a. Type'' t a -> Bool
forall a. Type'' t a -> Int
forall a. Type'' t a -> [a]
forall a. (a -> a -> a) -> Type'' t a -> a
forall t a. Eq a => a -> Type'' t a -> Bool
forall t a. Num a => Type'' t a -> a
forall t a. Ord a => Type'' t a -> a
forall m a. Monoid m => (a -> m) -> Type'' t a -> m
forall t m. Monoid m => Type'' t m -> m
forall t a. Type'' t a -> Bool
forall t a. Type'' t a -> Int
forall t a. Type'' t a -> [a]
forall b a. (b -> a -> b) -> b -> Type'' t a -> b
forall a b. (a -> b -> b) -> b -> Type'' t a -> b
forall t a. (a -> a -> a) -> Type'' t a -> a
forall t m a. Monoid m => (a -> m) -> Type'' t a -> m
forall t b a. (b -> a -> b) -> b -> Type'' t a -> b
forall t a b. (a -> b -> b) -> b -> Type'' t a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: Type'' t a -> a
$cproduct :: forall t a. Num a => Type'' t a -> a
sum :: Type'' t a -> a
$csum :: forall t a. Num a => Type'' t a -> a
minimum :: Type'' t a -> a
$cminimum :: forall t a. Ord a => Type'' t a -> a
maximum :: Type'' t a -> a
$cmaximum :: forall t a. Ord a => Type'' t a -> a
elem :: a -> Type'' t a -> Bool
$celem :: forall t a. Eq a => a -> Type'' t a -> Bool
length :: Type'' t a -> Int
$clength :: forall t a. Type'' t a -> Int
null :: Type'' t a -> Bool
$cnull :: forall t a. Type'' t a -> Bool
toList :: Type'' t a -> [a]
$ctoList :: forall t a. Type'' t a -> [a]
foldl1 :: (a -> a -> a) -> Type'' t a -> a
$cfoldl1 :: forall t a. (a -> a -> a) -> Type'' t a -> a
foldr1 :: (a -> a -> a) -> Type'' t a -> a
$cfoldr1 :: forall t a. (a -> a -> a) -> Type'' t a -> a
foldl' :: (b -> a -> b) -> b -> Type'' t a -> b
$cfoldl' :: forall t b a. (b -> a -> b) -> b -> Type'' t a -> b
foldl :: (b -> a -> b) -> b -> Type'' t a -> b
$cfoldl :: forall t b a. (b -> a -> b) -> b -> Type'' t a -> b
foldr' :: (a -> b -> b) -> b -> Type'' t a -> b
$cfoldr' :: forall t a b. (a -> b -> b) -> b -> Type'' t a -> b
foldr :: (a -> b -> b) -> b -> Type'' t a -> b
$cfoldr :: forall t a b. (a -> b -> b) -> b -> Type'' t a -> b
foldMap' :: (a -> m) -> Type'' t a -> m
$cfoldMap' :: forall t m a. Monoid m => (a -> m) -> Type'' t a -> m
foldMap :: (a -> m) -> Type'' t a -> m
$cfoldMap :: forall t m a. Monoid m => (a -> m) -> Type'' t a -> m
fold :: Type'' t m -> m
$cfold :: forall t m. Monoid m => Type'' t m -> m
Foldable, Functor (Type'' t)
Foldable (Type'' t)
(Functor (Type'' t), Foldable (Type'' t)) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Type'' t a -> f (Type'' t b))
-> (forall (f :: * -> *) a.
Applicative f =>
Type'' t (f a) -> f (Type'' t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Type'' t a -> m (Type'' t b))
-> (forall (m :: * -> *) a.
Monad m =>
Type'' t (m a) -> m (Type'' t a))
-> Traversable (Type'' t)
(a -> f b) -> Type'' t a -> f (Type'' t b)
forall t. Functor (Type'' t)
forall t. Foldable (Type'' t)
forall t (m :: * -> *) a.
Monad m =>
Type'' t (m a) -> m (Type'' t a)
forall t (f :: * -> *) a.
Applicative f =>
Type'' t (f a) -> f (Type'' t a)
forall t (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Type'' t a -> m (Type'' t b)
forall t (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Type'' t a -> f (Type'' t b)
forall (t :: * -> *).
(Functor t, Foldable t) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a. Monad m => Type'' t (m a) -> m (Type'' t a)
forall (f :: * -> *) a.
Applicative f =>
Type'' t (f a) -> f (Type'' t a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Type'' t a -> m (Type'' t b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Type'' t a -> f (Type'' t b)
sequence :: Type'' t (m a) -> m (Type'' t a)
$csequence :: forall t (m :: * -> *) a.
Monad m =>
Type'' t (m a) -> m (Type'' t a)
mapM :: (a -> m b) -> Type'' t a -> m (Type'' t b)
$cmapM :: forall t (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Type'' t a -> m (Type'' t b)
sequenceA :: Type'' t (f a) -> f (Type'' t a)
$csequenceA :: forall t (f :: * -> *) a.
Applicative f =>
Type'' t (f a) -> f (Type'' t a)
traverse :: (a -> f b) -> Type'' t a -> f (Type'' t b)
$ctraverse :: forall t (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Type'' t a -> f (Type'' t b)
$cp2Traversable :: forall t. Foldable (Type'' t)
$cp1Traversable :: forall t. Functor (Type'' t)
Traversable)
type Type' a = Type'' Term a
type Type = Type' Term
instance Decoration (Type'' t) where
traverseF :: (a -> m b) -> Type'' t a -> m (Type'' t b)
traverseF f :: a -> m b
f (El s :: Sort' t
s a :: a
a) = Sort' t -> b -> Type'' t b
forall t a. Sort' t -> a -> Type'' t a
El Sort' t
s (b -> Type'' t b) -> m b -> m (Type'' t b)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> a -> m b
f a
a
class LensSort a where
lensSort :: Lens' Sort a
getSort :: a -> Sort
getSort a :: a
a = a
a a -> Lens' Sort a -> Sort
forall o i. o -> Lens' i o -> i
^. forall a. LensSort a => Lens' Sort a
Lens' Sort a
lensSort
instance LensSort (Type' a) where
lensSort :: (Sort -> f Sort) -> Type' a -> f (Type' a)
lensSort f :: Sort -> f Sort
f (El s :: Sort
s a :: a
a) = Sort -> f Sort
f Sort
s f Sort -> (Sort -> Type' a) -> f (Type' a)
forall (m :: * -> *) a b. Functor m => m a -> (a -> b) -> m b
<&> \ s' :: Sort
s' -> Sort -> a -> Type' a
forall t a. Sort' t -> a -> Type'' t a
El Sort
s' a
a
instance LensSort a => LensSort (Dom a) where
lensSort :: (Sort -> f Sort) -> Dom a -> f (Dom a)
lensSort = (a -> f a) -> Dom a -> f (Dom a)
forall (t :: * -> *) (m :: * -> *) a b.
(Decoration t, Functor m) =>
(a -> m b) -> t a -> m (t b)
traverseF ((a -> f a) -> Dom a -> f (Dom a))
-> ((Sort -> f Sort) -> a -> f a)
-> (Sort -> f Sort)
-> Dom a
-> f (Dom a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Sort -> f Sort) -> a -> f a
forall a. LensSort a => Lens' Sort a
lensSort
instance LensSort a => LensSort (Arg a) where
lensSort :: (Sort -> f Sort) -> Arg a -> f (Arg a)
lensSort = (a -> f a) -> Arg a -> f (Arg a)
forall (t :: * -> *) (m :: * -> *) a b.
(Decoration t, Functor m) =>
(a -> m b) -> t a -> m (t b)
traverseF ((a -> f a) -> Arg a -> f (Arg a))
-> ((Sort -> f Sort) -> a -> f a)
-> (Sort -> f Sort)
-> Arg a
-> f (Arg a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Sort -> f Sort) -> a -> f a
forall a. LensSort a => Lens' Sort a
lensSort
data Tele a = EmptyTel
| ExtendTel a (Abs (Tele a))
deriving (Typeable (Tele a)
DataType
Constr
Typeable (Tele a) =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Tele a -> c (Tele a))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Tele a))
-> (Tele a -> Constr)
-> (Tele a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Tele a)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Tele a)))
-> ((forall b. Data b => b -> b) -> Tele a -> Tele a)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Tele a -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Tele a -> r)
-> (forall u. (forall d. Data d => d -> u) -> Tele a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Tele a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Tele a -> m (Tele a))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Tele a -> m (Tele a))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Tele a -> m (Tele a))
-> Data (Tele a)
Tele a -> DataType
Tele a -> Constr
(forall d. Data d => c (t d)) -> Maybe (c (Tele a))
(forall b. Data b => b -> b) -> Tele a -> Tele a
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Tele a -> c (Tele a)
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Tele a)
forall a. Data a => Typeable (Tele a)
forall a. Data a => Tele a -> DataType
forall a. Data a => Tele a -> Constr
forall a.
Data a =>
(forall b. Data b => b -> b) -> Tele a -> Tele a
forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> Tele a -> u
forall a u. Data a => (forall d. Data d => d -> u) -> Tele a -> [u]
forall a r r'.
Data a =>
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Tele a -> r
forall a r r'.
Data a =>
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Tele a -> r
forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d) -> Tele a -> m (Tele a)
forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Tele a -> m (Tele a)
forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Tele a)
forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Tele a -> c (Tele a)
forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Tele a))
forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Tele 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) -> Tele a -> u
forall u. (forall d. Data d => d -> u) -> Tele a -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Tele a -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Tele a -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Tele a -> m (Tele a)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Tele a -> m (Tele a)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Tele a)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Tele a -> c (Tele a)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Tele a))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Tele a))
$cExtendTel :: Constr
$cEmptyTel :: Constr
$tTele :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Tele a -> m (Tele a)
$cgmapMo :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Tele a -> m (Tele a)
gmapMp :: (forall d. Data d => d -> m d) -> Tele a -> m (Tele a)
$cgmapMp :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Tele a -> m (Tele a)
gmapM :: (forall d. Data d => d -> m d) -> Tele a -> m (Tele a)
$cgmapM :: forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d) -> Tele a -> m (Tele a)
gmapQi :: Int -> (forall d. Data d => d -> u) -> Tele a -> u
$cgmapQi :: forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> Tele a -> u
gmapQ :: (forall d. Data d => d -> u) -> Tele a -> [u]
$cgmapQ :: forall a u. Data a => (forall d. Data d => d -> u) -> Tele a -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Tele a -> r
$cgmapQr :: forall a r r'.
Data a =>
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Tele a -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Tele a -> r
$cgmapQl :: forall a r r'.
Data a =>
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Tele a -> r
gmapT :: (forall b. Data b => b -> b) -> Tele a -> Tele a
$cgmapT :: forall a.
Data a =>
(forall b. Data b => b -> b) -> Tele a -> Tele a
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Tele a))
$cdataCast2 :: forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Tele a))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (Tele a))
$cdataCast1 :: forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Tele a))
dataTypeOf :: Tele a -> DataType
$cdataTypeOf :: forall a. Data a => Tele a -> DataType
toConstr :: Tele a -> Constr
$ctoConstr :: forall a. Data a => Tele a -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Tele a)
$cgunfold :: forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Tele a)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Tele a -> c (Tele a)
$cgfoldl :: forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Tele a -> c (Tele a)
$cp1Data :: forall a. Data a => Typeable (Tele a)
Data, Int -> Tele a -> ShowS
[Tele a] -> ShowS
Tele a -> String
(Int -> Tele a -> ShowS)
-> (Tele a -> String) -> ([Tele a] -> ShowS) -> Show (Tele a)
forall a. Show a => Int -> Tele a -> ShowS
forall a. Show a => [Tele a] -> ShowS
forall a. Show a => Tele a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Tele a] -> ShowS
$cshowList :: forall a. Show a => [Tele a] -> ShowS
show :: Tele a -> String
$cshow :: forall a. Show a => Tele a -> String
showsPrec :: Int -> Tele a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> Tele a -> ShowS
Show, a -> Tele b -> Tele a
(a -> b) -> Tele a -> Tele b
(forall a b. (a -> b) -> Tele a -> Tele b)
-> (forall a b. a -> Tele b -> Tele a) -> Functor Tele
forall a b. a -> Tele b -> Tele a
forall a b. (a -> b) -> Tele a -> Tele b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> Tele b -> Tele a
$c<$ :: forall a b. a -> Tele b -> Tele a
fmap :: (a -> b) -> Tele a -> Tele b
$cfmap :: forall a b. (a -> b) -> Tele a -> Tele b
Functor, Tele a -> Bool
(a -> m) -> Tele a -> m
(a -> b -> b) -> b -> Tele a -> b
(forall m. Monoid m => Tele m -> m)
-> (forall m a. Monoid m => (a -> m) -> Tele a -> m)
-> (forall m a. Monoid m => (a -> m) -> Tele a -> m)
-> (forall a b. (a -> b -> b) -> b -> Tele a -> b)
-> (forall a b. (a -> b -> b) -> b -> Tele a -> b)
-> (forall b a. (b -> a -> b) -> b -> Tele a -> b)
-> (forall b a. (b -> a -> b) -> b -> Tele a -> b)
-> (forall a. (a -> a -> a) -> Tele a -> a)
-> (forall a. (a -> a -> a) -> Tele a -> a)
-> (forall a. Tele a -> [a])
-> (forall a. Tele a -> Bool)
-> (forall a. Tele a -> Int)
-> (forall a. Eq a => a -> Tele a -> Bool)
-> (forall a. Ord a => Tele a -> a)
-> (forall a. Ord a => Tele a -> a)
-> (forall a. Num a => Tele a -> a)
-> (forall a. Num a => Tele a -> a)
-> Foldable Tele
forall a. Eq a => a -> Tele a -> Bool
forall a. Num a => Tele a -> a
forall a. Ord a => Tele a -> a
forall m. Monoid m => Tele m -> m
forall a. Tele a -> Bool
forall a. Tele a -> Int
forall a. Tele a -> [a]
forall a. (a -> a -> a) -> Tele a -> a
forall m a. Monoid m => (a -> m) -> Tele a -> m
forall b a. (b -> a -> b) -> b -> Tele a -> b
forall a b. (a -> b -> b) -> b -> Tele a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: Tele a -> a
$cproduct :: forall a. Num a => Tele a -> a
sum :: Tele a -> a
$csum :: forall a. Num a => Tele a -> a
minimum :: Tele a -> a
$cminimum :: forall a. Ord a => Tele a -> a
maximum :: Tele a -> a
$cmaximum :: forall a. Ord a => Tele a -> a
elem :: a -> Tele a -> Bool
$celem :: forall a. Eq a => a -> Tele a -> Bool
length :: Tele a -> Int
$clength :: forall a. Tele a -> Int
null :: Tele a -> Bool
$cnull :: forall a. Tele a -> Bool
toList :: Tele a -> [a]
$ctoList :: forall a. Tele a -> [a]
foldl1 :: (a -> a -> a) -> Tele a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> Tele a -> a
foldr1 :: (a -> a -> a) -> Tele a -> a
$cfoldr1 :: forall a. (a -> a -> a) -> Tele a -> a
foldl' :: (b -> a -> b) -> b -> Tele a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> Tele a -> b
foldl :: (b -> a -> b) -> b -> Tele a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> Tele a -> b
foldr' :: (a -> b -> b) -> b -> Tele a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> Tele a -> b
foldr :: (a -> b -> b) -> b -> Tele a -> b
$cfoldr :: forall a b. (a -> b -> b) -> b -> Tele a -> b
foldMap' :: (a -> m) -> Tele a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> Tele a -> m
foldMap :: (a -> m) -> Tele a -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> Tele a -> m
fold :: Tele m -> m
$cfold :: forall m. Monoid m => Tele m -> m
Foldable, Functor Tele
Foldable Tele
(Functor Tele, Foldable Tele) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Tele a -> f (Tele b))
-> (forall (f :: * -> *) a.
Applicative f =>
Tele (f a) -> f (Tele a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Tele a -> m (Tele b))
-> (forall (m :: * -> *) a. Monad m => Tele (m a) -> m (Tele a))
-> Traversable Tele
(a -> f b) -> Tele a -> f (Tele b)
forall (t :: * -> *).
(Functor t, Foldable t) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a. Monad m => Tele (m a) -> m (Tele a)
forall (f :: * -> *) a. Applicative f => Tele (f a) -> f (Tele a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Tele a -> m (Tele b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Tele a -> f (Tele b)
sequence :: Tele (m a) -> m (Tele a)
$csequence :: forall (m :: * -> *) a. Monad m => Tele (m a) -> m (Tele a)
mapM :: (a -> m b) -> Tele a -> m (Tele b)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Tele a -> m (Tele b)
sequenceA :: Tele (f a) -> f (Tele a)
$csequenceA :: forall (f :: * -> *) a. Applicative f => Tele (f a) -> f (Tele a)
traverse :: (a -> f b) -> Tele a -> f (Tele b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Tele a -> f (Tele b)
$cp2Traversable :: Foldable Tele
$cp1Traversable :: Functor Tele
Traversable)
type Telescope = Tele (Dom Type)
data Sort' t
= Type (Level' t)
| Prop (Level' t)
| Inf
| SizeUniv
| PiSort (Dom' t (Type'' t t)) (Abs (Sort' t))
| FunSort (Sort' t) (Sort' t)
| UnivSort (Sort' t)
| MetaS {-# UNPACK #-} !MetaId [Elim' t]
| DefS QName [Elim' t]
| DummyS String
deriving (Typeable (Sort' t)
DataType
Constr
Typeable (Sort' t) =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Sort' t -> c (Sort' t))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Sort' t))
-> (Sort' t -> Constr)
-> (Sort' t -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Sort' t)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Sort' t)))
-> ((forall b. Data b => b -> b) -> Sort' t -> Sort' t)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Sort' t -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Sort' t -> r)
-> (forall u. (forall d. Data d => d -> u) -> Sort' t -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Sort' t -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Sort' t -> m (Sort' t))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Sort' t -> m (Sort' t))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Sort' t -> m (Sort' t))
-> Data (Sort' t)
Sort' t -> DataType
Sort' t -> Constr
(forall d. Data d => c (t d)) -> Maybe (c (Sort' t))
(forall b. Data b => b -> b) -> Sort' t -> Sort' t
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Sort' t -> c (Sort' t)
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Sort' t)
forall t. Data t => Typeable (Sort' t)
forall t. Data t => Sort' t -> DataType
forall t. Data t => Sort' t -> Constr
forall t.
Data t =>
(forall b. Data b => b -> b) -> Sort' t -> Sort' t
forall t u.
Data t =>
Int -> (forall d. Data d => d -> u) -> Sort' t -> u
forall t u.
Data t =>
(forall d. Data d => d -> u) -> Sort' t -> [u]
forall t r r'.
Data t =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Sort' t -> r
forall t r r'.
Data t =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Sort' t -> r
forall t (m :: * -> *).
(Data t, Monad m) =>
(forall d. Data d => d -> m d) -> Sort' t -> m (Sort' t)
forall t (m :: * -> *).
(Data t, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Sort' t -> m (Sort' t)
forall t (c :: * -> *).
Data t =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Sort' t)
forall t (c :: * -> *).
Data t =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Sort' t -> c (Sort' t)
forall t (t :: * -> *) (c :: * -> *).
(Data t, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Sort' t))
forall t (t :: * -> * -> *) (c :: * -> *).
(Data t, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Sort' t))
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) -> Sort' t -> u
forall u. (forall d. Data d => d -> u) -> Sort' t -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Sort' t -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Sort' t -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Sort' t -> m (Sort' t)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Sort' t -> m (Sort' t)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Sort' t)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Sort' t -> c (Sort' t)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Sort' t))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Sort' t))
$cDummyS :: Constr
$cDefS :: Constr
$cMetaS :: Constr
$cUnivSort :: Constr
$cFunSort :: Constr
$cPiSort :: Constr
$cSizeUniv :: Constr
$cInf :: Constr
$cProp :: Constr
$cType :: Constr
$tSort' :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Sort' t -> m (Sort' t)
$cgmapMo :: forall t (m :: * -> *).
(Data t, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Sort' t -> m (Sort' t)
gmapMp :: (forall d. Data d => d -> m d) -> Sort' t -> m (Sort' t)
$cgmapMp :: forall t (m :: * -> *).
(Data t, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Sort' t -> m (Sort' t)
gmapM :: (forall d. Data d => d -> m d) -> Sort' t -> m (Sort' t)
$cgmapM :: forall t (m :: * -> *).
(Data t, Monad m) =>
(forall d. Data d => d -> m d) -> Sort' t -> m (Sort' t)
gmapQi :: Int -> (forall d. Data d => d -> u) -> Sort' t -> u
$cgmapQi :: forall t u.
Data t =>
Int -> (forall d. Data d => d -> u) -> Sort' t -> u
gmapQ :: (forall d. Data d => d -> u) -> Sort' t -> [u]
$cgmapQ :: forall t u.
Data t =>
(forall d. Data d => d -> u) -> Sort' t -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Sort' t -> r
$cgmapQr :: forall t r r'.
Data t =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Sort' t -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Sort' t -> r
$cgmapQl :: forall t r r'.
Data t =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Sort' t -> r
gmapT :: (forall b. Data b => b -> b) -> Sort' t -> Sort' t
$cgmapT :: forall t.
Data t =>
(forall b. Data b => b -> b) -> Sort' t -> Sort' t
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Sort' t))
$cdataCast2 :: forall t (t :: * -> * -> *) (c :: * -> *).
(Data t, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Sort' t))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (Sort' t))
$cdataCast1 :: forall t (t :: * -> *) (c :: * -> *).
(Data t, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Sort' t))
dataTypeOf :: Sort' t -> DataType
$cdataTypeOf :: forall t. Data t => Sort' t -> DataType
toConstr :: Sort' t -> Constr
$ctoConstr :: forall t. Data t => Sort' t -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Sort' t)
$cgunfold :: forall t (c :: * -> *).
Data t =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Sort' t)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Sort' t -> c (Sort' t)
$cgfoldl :: forall t (c :: * -> *).
Data t =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Sort' t -> c (Sort' t)
$cp1Data :: forall t. Data t => Typeable (Sort' t)
Data, Int -> Sort' t -> ShowS
[Sort' t] -> ShowS
Sort' t -> String
(Int -> Sort' t -> ShowS)
-> (Sort' t -> String) -> ([Sort' t] -> ShowS) -> Show (Sort' t)
forall t. Show t => Int -> Sort' t -> ShowS
forall t. Show t => [Sort' t] -> ShowS
forall t. Show t => Sort' t -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Sort' t] -> ShowS
$cshowList :: forall t. Show t => [Sort' t] -> ShowS
show :: Sort' t -> String
$cshow :: forall t. Show t => Sort' t -> String
showsPrec :: Int -> Sort' t -> ShowS
$cshowsPrec :: forall t. Show t => Int -> Sort' t -> ShowS
Show)
type Sort = Sort' Term
data Level' t = Max Integer [PlusLevel' t]
deriving (Int -> Level' t -> ShowS
[Level' t] -> ShowS
Level' t -> String
(Int -> Level' t -> ShowS)
-> (Level' t -> String) -> ([Level' t] -> ShowS) -> Show (Level' t)
forall t. Show t => Int -> Level' t -> ShowS
forall t. Show t => [Level' t] -> ShowS
forall t. Show t => Level' t -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Level' t] -> ShowS
$cshowList :: forall t. Show t => [Level' t] -> ShowS
show :: Level' t -> String
$cshow :: forall t. Show t => Level' t -> String
showsPrec :: Int -> Level' t -> ShowS
$cshowsPrec :: forall t. Show t => Int -> Level' t -> ShowS
Show, Typeable (Level' t)
DataType
Constr
Typeable (Level' t) =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Level' t -> c (Level' t))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Level' t))
-> (Level' t -> Constr)
-> (Level' t -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Level' t)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Level' t)))
-> ((forall b. Data b => b -> b) -> Level' t -> Level' t)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Level' t -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Level' t -> r)
-> (forall u. (forall d. Data d => d -> u) -> Level' t -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Level' t -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Level' t -> m (Level' t))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Level' t -> m (Level' t))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Level' t -> m (Level' t))
-> Data (Level' t)
Level' t -> DataType
Level' t -> Constr
(forall d. Data d => c (t d)) -> Maybe (c (Level' t))
(forall b. Data b => b -> b) -> Level' t -> Level' t
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Level' t -> c (Level' t)
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Level' t)
forall t. Data t => Typeable (Level' t)
forall t. Data t => Level' t -> DataType
forall t. Data t => Level' t -> Constr
forall t.
Data t =>
(forall b. Data b => b -> b) -> Level' t -> Level' t
forall t u.
Data t =>
Int -> (forall d. Data d => d -> u) -> Level' t -> u
forall t u.
Data t =>
(forall d. Data d => d -> u) -> Level' t -> [u]
forall t r r'.
Data t =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Level' t -> r
forall t r r'.
Data t =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Level' t -> r
forall t (m :: * -> *).
(Data t, Monad m) =>
(forall d. Data d => d -> m d) -> Level' t -> m (Level' t)
forall t (m :: * -> *).
(Data t, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Level' t -> m (Level' t)
forall t (c :: * -> *).
Data t =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Level' t)
forall t (c :: * -> *).
Data t =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Level' t -> c (Level' t)
forall t (t :: * -> *) (c :: * -> *).
(Data t, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Level' t))
forall t (t :: * -> * -> *) (c :: * -> *).
(Data t, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Level' t))
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) -> Level' t -> u
forall u. (forall d. Data d => d -> u) -> Level' t -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Level' t -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Level' t -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Level' t -> m (Level' t)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Level' t -> m (Level' t)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Level' t)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Level' t -> c (Level' t)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Level' t))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Level' t))
$cMax :: Constr
$tLevel' :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Level' t -> m (Level' t)
$cgmapMo :: forall t (m :: * -> *).
(Data t, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Level' t -> m (Level' t)
gmapMp :: (forall d. Data d => d -> m d) -> Level' t -> m (Level' t)
$cgmapMp :: forall t (m :: * -> *).
(Data t, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Level' t -> m (Level' t)
gmapM :: (forall d. Data d => d -> m d) -> Level' t -> m (Level' t)
$cgmapM :: forall t (m :: * -> *).
(Data t, Monad m) =>
(forall d. Data d => d -> m d) -> Level' t -> m (Level' t)
gmapQi :: Int -> (forall d. Data d => d -> u) -> Level' t -> u
$cgmapQi :: forall t u.
Data t =>
Int -> (forall d. Data d => d -> u) -> Level' t -> u
gmapQ :: (forall d. Data d => d -> u) -> Level' t -> [u]
$cgmapQ :: forall t u.
Data t =>
(forall d. Data d => d -> u) -> Level' t -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Level' t -> r
$cgmapQr :: forall t r r'.
Data t =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Level' t -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Level' t -> r
$cgmapQl :: forall t r r'.
Data t =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Level' t -> r
gmapT :: (forall b. Data b => b -> b) -> Level' t -> Level' t
$cgmapT :: forall t.
Data t =>
(forall b. Data b => b -> b) -> Level' t -> Level' t
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Level' t))
$cdataCast2 :: forall t (t :: * -> * -> *) (c :: * -> *).
(Data t, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Level' t))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (Level' t))
$cdataCast1 :: forall t (t :: * -> *) (c :: * -> *).
(Data t, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Level' t))
dataTypeOf :: Level' t -> DataType
$cdataTypeOf :: forall t. Data t => Level' t -> DataType
toConstr :: Level' t -> Constr
$ctoConstr :: forall t. Data t => Level' t -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Level' t)
$cgunfold :: forall t (c :: * -> *).
Data t =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Level' t)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Level' t -> c (Level' t)
$cgfoldl :: forall t (c :: * -> *).
Data t =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Level' t -> c (Level' t)
$cp1Data :: forall t. Data t => Typeable (Level' t)
Data)
type Level = Level' Term
data PlusLevel' t = Plus Integer (LevelAtom' t)
deriving (Int -> PlusLevel' t -> ShowS
[PlusLevel' t] -> ShowS
PlusLevel' t -> String
(Int -> PlusLevel' t -> ShowS)
-> (PlusLevel' t -> String)
-> ([PlusLevel' t] -> ShowS)
-> Show (PlusLevel' t)
forall t. Show t => Int -> PlusLevel' t -> ShowS
forall t. Show t => [PlusLevel' t] -> ShowS
forall t. Show t => PlusLevel' t -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PlusLevel' t] -> ShowS
$cshowList :: forall t. Show t => [PlusLevel' t] -> ShowS
show :: PlusLevel' t -> String
$cshow :: forall t. Show t => PlusLevel' t -> String
showsPrec :: Int -> PlusLevel' t -> ShowS
$cshowsPrec :: forall t. Show t => Int -> PlusLevel' t -> ShowS
Show, Typeable (PlusLevel' t)
DataType
Constr
Typeable (PlusLevel' t) =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PlusLevel' t -> c (PlusLevel' t))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (PlusLevel' t))
-> (PlusLevel' t -> Constr)
-> (PlusLevel' t -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (PlusLevel' t)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (PlusLevel' t)))
-> ((forall b. Data b => b -> b) -> PlusLevel' t -> PlusLevel' t)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PlusLevel' t -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PlusLevel' t -> r)
-> (forall u. (forall d. Data d => d -> u) -> PlusLevel' t -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> PlusLevel' t -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> PlusLevel' t -> m (PlusLevel' t))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PlusLevel' t -> m (PlusLevel' t))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PlusLevel' t -> m (PlusLevel' t))
-> Data (PlusLevel' t)
PlusLevel' t -> DataType
PlusLevel' t -> Constr
(forall d. Data d => c (t d)) -> Maybe (c (PlusLevel' t))
(forall b. Data b => b -> b) -> PlusLevel' t -> PlusLevel' t
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PlusLevel' t -> c (PlusLevel' t)
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (PlusLevel' t)
forall t. Data t => Typeable (PlusLevel' t)
forall t. Data t => PlusLevel' t -> DataType
forall t. Data t => PlusLevel' t -> Constr
forall t.
Data t =>
(forall b. Data b => b -> b) -> PlusLevel' t -> PlusLevel' t
forall t u.
Data t =>
Int -> (forall d. Data d => d -> u) -> PlusLevel' t -> u
forall t u.
Data t =>
(forall d. Data d => d -> u) -> PlusLevel' t -> [u]
forall t r r'.
Data t =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PlusLevel' t -> r
forall t r r'.
Data t =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PlusLevel' t -> r
forall t (m :: * -> *).
(Data t, Monad m) =>
(forall d. Data d => d -> m d) -> PlusLevel' t -> m (PlusLevel' t)
forall t (m :: * -> *).
(Data t, MonadPlus m) =>
(forall d. Data d => d -> m d) -> PlusLevel' t -> m (PlusLevel' t)
forall t (c :: * -> *).
Data t =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (PlusLevel' t)
forall t (c :: * -> *).
Data t =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PlusLevel' t -> c (PlusLevel' t)
forall t (t :: * -> *) (c :: * -> *).
(Data t, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (PlusLevel' t))
forall t (t :: * -> * -> *) (c :: * -> *).
(Data t, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (PlusLevel' t))
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) -> PlusLevel' t -> u
forall u. (forall d. Data d => d -> u) -> PlusLevel' t -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PlusLevel' t -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PlusLevel' t -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> PlusLevel' t -> m (PlusLevel' t)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PlusLevel' t -> m (PlusLevel' t)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (PlusLevel' t)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PlusLevel' t -> c (PlusLevel' t)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (PlusLevel' t))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (PlusLevel' t))
$cPlus :: Constr
$tPlusLevel' :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> PlusLevel' t -> m (PlusLevel' t)
$cgmapMo :: forall t (m :: * -> *).
(Data t, MonadPlus m) =>
(forall d. Data d => d -> m d) -> PlusLevel' t -> m (PlusLevel' t)
gmapMp :: (forall d. Data d => d -> m d) -> PlusLevel' t -> m (PlusLevel' t)
$cgmapMp :: forall t (m :: * -> *).
(Data t, MonadPlus m) =>
(forall d. Data d => d -> m d) -> PlusLevel' t -> m (PlusLevel' t)
gmapM :: (forall d. Data d => d -> m d) -> PlusLevel' t -> m (PlusLevel' t)
$cgmapM :: forall t (m :: * -> *).
(Data t, Monad m) =>
(forall d. Data d => d -> m d) -> PlusLevel' t -> m (PlusLevel' t)
gmapQi :: Int -> (forall d. Data d => d -> u) -> PlusLevel' t -> u
$cgmapQi :: forall t u.
Data t =>
Int -> (forall d. Data d => d -> u) -> PlusLevel' t -> u
gmapQ :: (forall d. Data d => d -> u) -> PlusLevel' t -> [u]
$cgmapQ :: forall t u.
Data t =>
(forall d. Data d => d -> u) -> PlusLevel' t -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PlusLevel' t -> r
$cgmapQr :: forall t r r'.
Data t =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PlusLevel' t -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PlusLevel' t -> r
$cgmapQl :: forall t r r'.
Data t =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PlusLevel' t -> r
gmapT :: (forall b. Data b => b -> b) -> PlusLevel' t -> PlusLevel' t
$cgmapT :: forall t.
Data t =>
(forall b. Data b => b -> b) -> PlusLevel' t -> PlusLevel' t
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (PlusLevel' t))
$cdataCast2 :: forall t (t :: * -> * -> *) (c :: * -> *).
(Data t, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (PlusLevel' t))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (PlusLevel' t))
$cdataCast1 :: forall t (t :: * -> *) (c :: * -> *).
(Data t, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (PlusLevel' t))
dataTypeOf :: PlusLevel' t -> DataType
$cdataTypeOf :: forall t. Data t => PlusLevel' t -> DataType
toConstr :: PlusLevel' t -> Constr
$ctoConstr :: forall t. Data t => PlusLevel' t -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (PlusLevel' t)
$cgunfold :: forall t (c :: * -> *).
Data t =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (PlusLevel' t)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PlusLevel' t -> c (PlusLevel' t)
$cgfoldl :: forall t (c :: * -> *).
Data t =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PlusLevel' t -> c (PlusLevel' t)
$cp1Data :: forall t. Data t => Typeable (PlusLevel' t)
Data)
type PlusLevel = PlusLevel' Term
data LevelAtom' t
= MetaLevel MetaId [Elim' t]
| BlockedLevel MetaId t
| NeutralLevel NotBlocked t
| UnreducedLevel t
deriving (Int -> LevelAtom' t -> ShowS
[LevelAtom' t] -> ShowS
LevelAtom' t -> String
(Int -> LevelAtom' t -> ShowS)
-> (LevelAtom' t -> String)
-> ([LevelAtom' t] -> ShowS)
-> Show (LevelAtom' t)
forall t. Show t => Int -> LevelAtom' t -> ShowS
forall t. Show t => [LevelAtom' t] -> ShowS
forall t. Show t => LevelAtom' t -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LevelAtom' t] -> ShowS
$cshowList :: forall t. Show t => [LevelAtom' t] -> ShowS
show :: LevelAtom' t -> String
$cshow :: forall t. Show t => LevelAtom' t -> String
showsPrec :: Int -> LevelAtom' t -> ShowS
$cshowsPrec :: forall t. Show t => Int -> LevelAtom' t -> ShowS
Show, Typeable (LevelAtom' t)
DataType
Constr
Typeable (LevelAtom' t) =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LevelAtom' t -> c (LevelAtom' t))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (LevelAtom' t))
-> (LevelAtom' t -> Constr)
-> (LevelAtom' t -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (LevelAtom' t)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (LevelAtom' t)))
-> ((forall b. Data b => b -> b) -> LevelAtom' t -> LevelAtom' t)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LevelAtom' t -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LevelAtom' t -> r)
-> (forall u. (forall d. Data d => d -> u) -> LevelAtom' t -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> LevelAtom' t -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> LevelAtom' t -> m (LevelAtom' t))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LevelAtom' t -> m (LevelAtom' t))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LevelAtom' t -> m (LevelAtom' t))
-> Data (LevelAtom' t)
LevelAtom' t -> DataType
LevelAtom' t -> Constr
(forall d. Data d => c (t d)) -> Maybe (c (LevelAtom' t))
(forall b. Data b => b -> b) -> LevelAtom' t -> LevelAtom' t
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LevelAtom' t -> c (LevelAtom' t)
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (LevelAtom' t)
forall t. Data t => Typeable (LevelAtom' t)
forall t. Data t => LevelAtom' t -> DataType
forall t. Data t => LevelAtom' t -> Constr
forall t.
Data t =>
(forall b. Data b => b -> b) -> LevelAtom' t -> LevelAtom' t
forall t u.
Data t =>
Int -> (forall d. Data d => d -> u) -> LevelAtom' t -> u
forall t u.
Data t =>
(forall d. Data d => d -> u) -> LevelAtom' t -> [u]
forall t r r'.
Data t =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LevelAtom' t -> r
forall t r r'.
Data t =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LevelAtom' t -> r
forall t (m :: * -> *).
(Data t, Monad m) =>
(forall d. Data d => d -> m d) -> LevelAtom' t -> m (LevelAtom' t)
forall t (m :: * -> *).
(Data t, MonadPlus m) =>
(forall d. Data d => d -> m d) -> LevelAtom' t -> m (LevelAtom' t)
forall t (c :: * -> *).
Data t =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (LevelAtom' t)
forall t (c :: * -> *).
Data t =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LevelAtom' t -> c (LevelAtom' t)
forall t (t :: * -> *) (c :: * -> *).
(Data t, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (LevelAtom' t))
forall t (t :: * -> * -> *) (c :: * -> *).
(Data t, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (LevelAtom' t))
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) -> LevelAtom' t -> u
forall u. (forall d. Data d => d -> u) -> LevelAtom' t -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LevelAtom' t -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LevelAtom' t -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> LevelAtom' t -> m (LevelAtom' t)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> LevelAtom' t -> m (LevelAtom' t)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (LevelAtom' t)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LevelAtom' t -> c (LevelAtom' t)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (LevelAtom' t))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (LevelAtom' t))
$cUnreducedLevel :: Constr
$cNeutralLevel :: Constr
$cBlockedLevel :: Constr
$cMetaLevel :: Constr
$tLevelAtom' :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> LevelAtom' t -> m (LevelAtom' t)
$cgmapMo :: forall t (m :: * -> *).
(Data t, MonadPlus m) =>
(forall d. Data d => d -> m d) -> LevelAtom' t -> m (LevelAtom' t)
gmapMp :: (forall d. Data d => d -> m d) -> LevelAtom' t -> m (LevelAtom' t)
$cgmapMp :: forall t (m :: * -> *).
(Data t, MonadPlus m) =>
(forall d. Data d => d -> m d) -> LevelAtom' t -> m (LevelAtom' t)
gmapM :: (forall d. Data d => d -> m d) -> LevelAtom' t -> m (LevelAtom' t)
$cgmapM :: forall t (m :: * -> *).
(Data t, Monad m) =>
(forall d. Data d => d -> m d) -> LevelAtom' t -> m (LevelAtom' t)
gmapQi :: Int -> (forall d. Data d => d -> u) -> LevelAtom' t -> u
$cgmapQi :: forall t u.
Data t =>
Int -> (forall d. Data d => d -> u) -> LevelAtom' t -> u
gmapQ :: (forall d. Data d => d -> u) -> LevelAtom' t -> [u]
$cgmapQ :: forall t u.
Data t =>
(forall d. Data d => d -> u) -> LevelAtom' t -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LevelAtom' t -> r
$cgmapQr :: forall t r r'.
Data t =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LevelAtom' t -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LevelAtom' t -> r
$cgmapQl :: forall t r r'.
Data t =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LevelAtom' t -> r
gmapT :: (forall b. Data b => b -> b) -> LevelAtom' t -> LevelAtom' t
$cgmapT :: forall t.
Data t =>
(forall b. Data b => b -> b) -> LevelAtom' t -> LevelAtom' t
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (LevelAtom' t))
$cdataCast2 :: forall t (t :: * -> * -> *) (c :: * -> *).
(Data t, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (LevelAtom' t))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (LevelAtom' t))
$cdataCast1 :: forall t (t :: * -> *) (c :: * -> *).
(Data t, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (LevelAtom' t))
dataTypeOf :: LevelAtom' t -> DataType
$cdataTypeOf :: forall t. Data t => LevelAtom' t -> DataType
toConstr :: LevelAtom' t -> Constr
$ctoConstr :: forall t. Data t => LevelAtom' t -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (LevelAtom' t)
$cgunfold :: forall t (c :: * -> *).
Data t =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (LevelAtom' t)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LevelAtom' t -> c (LevelAtom' t)
$cgfoldl :: forall t (c :: * -> *).
Data t =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LevelAtom' t -> c (LevelAtom' t)
$cp1Data :: forall t. Data t => Typeable (LevelAtom' t)
Data)
type LevelAtom = LevelAtom' Term
newtype BraveTerm = BraveTerm { BraveTerm -> Term
unBrave :: Term } deriving (Typeable BraveTerm
DataType
Constr
Typeable BraveTerm =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BraveTerm -> c BraveTerm)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BraveTerm)
-> (BraveTerm -> Constr)
-> (BraveTerm -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BraveTerm))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BraveTerm))
-> ((forall b. Data b => b -> b) -> BraveTerm -> BraveTerm)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BraveTerm -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BraveTerm -> r)
-> (forall u. (forall d. Data d => d -> u) -> BraveTerm -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> BraveTerm -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BraveTerm -> m BraveTerm)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BraveTerm -> m BraveTerm)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BraveTerm -> m BraveTerm)
-> Data BraveTerm
BraveTerm -> DataType
BraveTerm -> Constr
(forall b. Data b => b -> b) -> BraveTerm -> BraveTerm
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BraveTerm -> c BraveTerm
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BraveTerm
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) -> BraveTerm -> u
forall u. (forall d. Data d => d -> u) -> BraveTerm -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BraveTerm -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BraveTerm -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BraveTerm -> m BraveTerm
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BraveTerm -> m BraveTerm
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BraveTerm
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BraveTerm -> c BraveTerm
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BraveTerm)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BraveTerm)
$cBraveTerm :: Constr
$tBraveTerm :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> BraveTerm -> m BraveTerm
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BraveTerm -> m BraveTerm
gmapMp :: (forall d. Data d => d -> m d) -> BraveTerm -> m BraveTerm
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> BraveTerm -> m BraveTerm
gmapM :: (forall d. Data d => d -> m d) -> BraveTerm -> m BraveTerm
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> BraveTerm -> m BraveTerm
gmapQi :: Int -> (forall d. Data d => d -> u) -> BraveTerm -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> BraveTerm -> u
gmapQ :: (forall d. Data d => d -> u) -> BraveTerm -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> BraveTerm -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BraveTerm -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> BraveTerm -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BraveTerm -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> BraveTerm -> r
gmapT :: (forall b. Data b => b -> b) -> BraveTerm -> BraveTerm
$cgmapT :: (forall b. Data b => b -> b) -> BraveTerm -> BraveTerm
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BraveTerm)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BraveTerm)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c BraveTerm)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c BraveTerm)
dataTypeOf :: BraveTerm -> DataType
$cdataTypeOf :: BraveTerm -> DataType
toConstr :: BraveTerm -> Constr
$ctoConstr :: BraveTerm -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BraveTerm
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c BraveTerm
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BraveTerm -> c BraveTerm
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> BraveTerm -> c BraveTerm
$cp1Data :: Typeable BraveTerm
Data, Int -> BraveTerm -> ShowS
[BraveTerm] -> ShowS
BraveTerm -> String
(Int -> BraveTerm -> ShowS)
-> (BraveTerm -> String)
-> ([BraveTerm] -> ShowS)
-> Show BraveTerm
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BraveTerm] -> ShowS
$cshowList :: [BraveTerm] -> ShowS
show :: BraveTerm -> String
$cshow :: BraveTerm -> String
showsPrec :: Int -> BraveTerm -> ShowS
$cshowsPrec :: Int -> BraveTerm -> ShowS
Show)
data NotBlocked
= StuckOn Elim
| Underapplied
| AbsurdMatch
| MissingClauses
| ReallyNotBlocked
deriving (Int -> NotBlocked -> ShowS
[NotBlocked] -> ShowS
NotBlocked -> String
(Int -> NotBlocked -> ShowS)
-> (NotBlocked -> String)
-> ([NotBlocked] -> ShowS)
-> Show NotBlocked
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NotBlocked] -> ShowS
$cshowList :: [NotBlocked] -> ShowS
show :: NotBlocked -> String
$cshow :: NotBlocked -> String
showsPrec :: Int -> NotBlocked -> ShowS
$cshowsPrec :: Int -> NotBlocked -> ShowS
Show, Typeable NotBlocked
DataType
Constr
Typeable NotBlocked =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotBlocked -> c NotBlocked)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotBlocked)
-> (NotBlocked -> Constr)
-> (NotBlocked -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotBlocked))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NotBlocked))
-> ((forall b. Data b => b -> b) -> NotBlocked -> NotBlocked)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotBlocked -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NotBlocked -> r)
-> (forall u. (forall d. Data d => d -> u) -> NotBlocked -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> NotBlocked -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotBlocked -> m NotBlocked)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotBlocked -> m NotBlocked)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotBlocked -> m NotBlocked)
-> Data NotBlocked
NotBlocked -> DataType
NotBlocked -> Constr
(forall b. Data b => b -> b) -> NotBlocked -> NotBlocked
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotBlocked -> c NotBlocked
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotBlocked
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) -> NotBlocked -> u
forall u. (forall d. Data d => d -> u) -> NotBlocked -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotBlocked -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NotBlocked -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotBlocked -> m NotBlocked
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotBlocked -> m NotBlocked
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotBlocked
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotBlocked -> c NotBlocked
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotBlocked)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NotBlocked)
$cReallyNotBlocked :: Constr
$cMissingClauses :: Constr
$cAbsurdMatch :: Constr
$cUnderapplied :: Constr
$cStuckOn :: Constr
$tNotBlocked :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> NotBlocked -> m NotBlocked
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotBlocked -> m NotBlocked
gmapMp :: (forall d. Data d => d -> m d) -> NotBlocked -> m NotBlocked
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NotBlocked -> m NotBlocked
gmapM :: (forall d. Data d => d -> m d) -> NotBlocked -> m NotBlocked
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NotBlocked -> m NotBlocked
gmapQi :: Int -> (forall d. Data d => d -> u) -> NotBlocked -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NotBlocked -> u
gmapQ :: (forall d. Data d => d -> u) -> NotBlocked -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> NotBlocked -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NotBlocked -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NotBlocked -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotBlocked -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NotBlocked -> r
gmapT :: (forall b. Data b => b -> b) -> NotBlocked -> NotBlocked
$cgmapT :: (forall b. Data b => b -> b) -> NotBlocked -> NotBlocked
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NotBlocked)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NotBlocked)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c NotBlocked)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NotBlocked)
dataTypeOf :: NotBlocked -> DataType
$cdataTypeOf :: NotBlocked -> DataType
toConstr :: NotBlocked -> Constr
$ctoConstr :: NotBlocked -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotBlocked
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NotBlocked
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotBlocked -> c NotBlocked
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NotBlocked -> c NotBlocked
$cp1Data :: Typeable NotBlocked
Data)
instance Semigroup NotBlocked where
ReallyNotBlocked <> :: NotBlocked -> NotBlocked -> NotBlocked
<> b :: NotBlocked
b = NotBlocked
b
b :: NotBlocked
b@NotBlocked
MissingClauses <> _ = NotBlocked
b
_ <> b :: NotBlocked
b@NotBlocked
MissingClauses = NotBlocked
b
b :: NotBlocked
b@StuckOn{} <> _ = NotBlocked
b
_ <> b :: NotBlocked
b@StuckOn{} = NotBlocked
b
b :: NotBlocked
b <> _ = NotBlocked
b
instance Monoid NotBlocked where
mempty :: NotBlocked
mempty = NotBlocked
ReallyNotBlocked
mappend :: NotBlocked -> NotBlocked -> NotBlocked
mappend = NotBlocked -> NotBlocked -> NotBlocked
forall a. Semigroup a => a -> a -> a
(<>)
data Blocked t
= Blocked { Blocked t -> MetaId
theBlockingMeta :: MetaId , Blocked t -> t
ignoreBlocking :: t }
| NotBlocked { Blocked t -> NotBlocked
blockingStatus :: NotBlocked, ignoreBlocking :: t }
deriving (Typeable (Blocked t)
DataType
Constr
Typeable (Blocked t) =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Blocked t -> c (Blocked t))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Blocked t))
-> (Blocked t -> Constr)
-> (Blocked t -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Blocked t)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Blocked t)))
-> ((forall b. Data b => b -> b) -> Blocked t -> Blocked t)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Blocked t -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Blocked t -> r)
-> (forall u. (forall d. Data d => d -> u) -> Blocked t -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> Blocked t -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Blocked t -> m (Blocked t))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Blocked t -> m (Blocked t))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Blocked t -> m (Blocked t))
-> Data (Blocked t)
Blocked t -> DataType
Blocked t -> Constr
(forall d. Data d => c (t d)) -> Maybe (c (Blocked t))
(forall b. Data b => b -> b) -> Blocked t -> Blocked t
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Blocked t -> c (Blocked t)
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Blocked t)
forall t. Data t => Typeable (Blocked t)
forall t. Data t => Blocked t -> DataType
forall t. Data t => Blocked t -> Constr
forall t.
Data t =>
(forall b. Data b => b -> b) -> Blocked t -> Blocked t
forall t u.
Data t =>
Int -> (forall d. Data d => d -> u) -> Blocked t -> u
forall t u.
Data t =>
(forall d. Data d => d -> u) -> Blocked t -> [u]
forall t r r'.
Data t =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Blocked t -> r
forall t r r'.
Data t =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Blocked t -> r
forall t (m :: * -> *).
(Data t, Monad m) =>
(forall d. Data d => d -> m d) -> Blocked t -> m (Blocked t)
forall t (m :: * -> *).
(Data t, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Blocked t -> m (Blocked t)
forall t (c :: * -> *).
Data t =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Blocked t)
forall t (c :: * -> *).
Data t =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Blocked t -> c (Blocked t)
forall t (t :: * -> *) (c :: * -> *).
(Data t, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Blocked t))
forall t (t :: * -> * -> *) (c :: * -> *).
(Data t, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Blocked t))
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) -> Blocked t -> u
forall u. (forall d. Data d => d -> u) -> Blocked t -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Blocked t -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Blocked t -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Blocked t -> m (Blocked t)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Blocked t -> m (Blocked t)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Blocked t)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Blocked t -> c (Blocked t)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Blocked t))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Blocked t))
$cNotBlocked :: Constr
$cBlocked :: Constr
$tBlocked :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Blocked t -> m (Blocked t)
$cgmapMo :: forall t (m :: * -> *).
(Data t, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Blocked t -> m (Blocked t)
gmapMp :: (forall d. Data d => d -> m d) -> Blocked t -> m (Blocked t)
$cgmapMp :: forall t (m :: * -> *).
(Data t, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Blocked t -> m (Blocked t)
gmapM :: (forall d. Data d => d -> m d) -> Blocked t -> m (Blocked t)
$cgmapM :: forall t (m :: * -> *).
(Data t, Monad m) =>
(forall d. Data d => d -> m d) -> Blocked t -> m (Blocked t)
gmapQi :: Int -> (forall d. Data d => d -> u) -> Blocked t -> u
$cgmapQi :: forall t u.
Data t =>
Int -> (forall d. Data d => d -> u) -> Blocked t -> u
gmapQ :: (forall d. Data d => d -> u) -> Blocked t -> [u]
$cgmapQ :: forall t u.
Data t =>
(forall d. Data d => d -> u) -> Blocked t -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Blocked t -> r
$cgmapQr :: forall t r r'.
Data t =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Blocked t -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Blocked t -> r
$cgmapQl :: forall t r r'.
Data t =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Blocked t -> r
gmapT :: (forall b. Data b => b -> b) -> Blocked t -> Blocked t
$cgmapT :: forall t.
Data t =>
(forall b. Data b => b -> b) -> Blocked t -> Blocked t
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Blocked t))
$cdataCast2 :: forall t (t :: * -> * -> *) (c :: * -> *).
(Data t, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Blocked t))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (Blocked t))
$cdataCast1 :: forall t (t :: * -> *) (c :: * -> *).
(Data t, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Blocked t))
dataTypeOf :: Blocked t -> DataType
$cdataTypeOf :: forall t. Data t => Blocked t -> DataType
toConstr :: Blocked t -> Constr
$ctoConstr :: forall t. Data t => Blocked t -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Blocked t)
$cgunfold :: forall t (c :: * -> *).
Data t =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Blocked t)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Blocked t -> c (Blocked t)
$cgfoldl :: forall t (c :: * -> *).
Data t =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Blocked t -> c (Blocked t)
$cp1Data :: forall t. Data t => Typeable (Blocked t)
Data, Int -> Blocked t -> ShowS
[Blocked t] -> ShowS
Blocked t -> String
(Int -> Blocked t -> ShowS)
-> (Blocked t -> String)
-> ([Blocked t] -> ShowS)
-> Show (Blocked t)
forall t. Show t => Int -> Blocked t -> ShowS
forall t. Show t => [Blocked t] -> ShowS
forall t. Show t => Blocked t -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Blocked t] -> ShowS
$cshowList :: forall t. Show t => [Blocked t] -> ShowS
show :: Blocked t -> String
$cshow :: forall t. Show t => Blocked t -> String
showsPrec :: Int -> Blocked t -> ShowS
$cshowsPrec :: forall t. Show t => Int -> Blocked t -> ShowS
Show, a -> Blocked b -> Blocked a
(a -> b) -> Blocked a -> Blocked b
(forall a b. (a -> b) -> Blocked a -> Blocked b)
-> (forall a b. a -> Blocked b -> Blocked a) -> Functor Blocked
forall a b. a -> Blocked b -> Blocked a
forall a b. (a -> b) -> Blocked a -> Blocked b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> Blocked b -> Blocked a
$c<$ :: forall a b. a -> Blocked b -> Blocked a
fmap :: (a -> b) -> Blocked a -> Blocked b
$cfmap :: forall a b. (a -> b) -> Blocked a -> Blocked b
Functor, Blocked a -> Bool
(a -> m) -> Blocked a -> m
(a -> b -> b) -> b -> Blocked a -> b
(forall m. Monoid m => Blocked m -> m)
-> (forall m a. Monoid m => (a -> m) -> Blocked a -> m)
-> (forall m a. Monoid m => (a -> m) -> Blocked a -> m)
-> (forall a b. (a -> b -> b) -> b -> Blocked a -> b)
-> (forall a b. (a -> b -> b) -> b -> Blocked a -> b)
-> (forall b a. (b -> a -> b) -> b -> Blocked a -> b)
-> (forall b a. (b -> a -> b) -> b -> Blocked a -> b)
-> (forall a. (a -> a -> a) -> Blocked a -> a)
-> (forall a. (a -> a -> a) -> Blocked a -> a)
-> (forall a. Blocked a -> [a])
-> (forall a. Blocked a -> Bool)
-> (forall a. Blocked a -> Int)
-> (forall a. Eq a => a -> Blocked a -> Bool)
-> (forall a. Ord a => Blocked a -> a)
-> (forall a. Ord a => Blocked a -> a)
-> (forall a. Num a => Blocked a -> a)
-> (forall a. Num a => Blocked a -> a)
-> Foldable Blocked
forall a. Eq a => a -> Blocked a -> Bool
forall a. Num a => Blocked a -> a
forall a. Ord a => Blocked a -> a
forall m. Monoid m => Blocked m -> m
forall a. Blocked a -> Bool
forall a. Blocked a -> Int
forall a. Blocked a -> [a]
forall a. (a -> a -> a) -> Blocked a -> a
forall m a. Monoid m => (a -> m) -> Blocked a -> m
forall b a. (b -> a -> b) -> b -> Blocked a -> b
forall a b. (a -> b -> b) -> b -> Blocked a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: Blocked a -> a
$cproduct :: forall a. Num a => Blocked a -> a
sum :: Blocked a -> a
$csum :: forall a. Num a => Blocked a -> a
minimum :: Blocked a -> a
$cminimum :: forall a. Ord a => Blocked a -> a
maximum :: Blocked a -> a
$cmaximum :: forall a. Ord a => Blocked a -> a
elem :: a -> Blocked a -> Bool
$celem :: forall a. Eq a => a -> Blocked a -> Bool
length :: Blocked a -> Int
$clength :: forall a. Blocked a -> Int
null :: Blocked a -> Bool
$cnull :: forall a. Blocked a -> Bool
toList :: Blocked a -> [a]
$ctoList :: forall a. Blocked a -> [a]
foldl1 :: (a -> a -> a) -> Blocked a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> Blocked a -> a
foldr1 :: (a -> a -> a) -> Blocked a -> a
$cfoldr1 :: forall a. (a -> a -> a) -> Blocked a -> a
foldl' :: (b -> a -> b) -> b -> Blocked a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> Blocked a -> b
foldl :: (b -> a -> b) -> b -> Blocked a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> Blocked a -> b
foldr' :: (a -> b -> b) -> b -> Blocked a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> Blocked a -> b
foldr :: (a -> b -> b) -> b -> Blocked a -> b
$cfoldr :: forall a b. (a -> b -> b) -> b -> Blocked a -> b
foldMap' :: (a -> m) -> Blocked a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> Blocked a -> m
foldMap :: (a -> m) -> Blocked a -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> Blocked a -> m
fold :: Blocked m -> m
$cfold :: forall m. Monoid m => Blocked m -> m
Foldable, Functor Blocked
Foldable Blocked
(Functor Blocked, Foldable Blocked) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Blocked a -> f (Blocked b))
-> (forall (f :: * -> *) a.
Applicative f =>
Blocked (f a) -> f (Blocked a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Blocked a -> m (Blocked b))
-> (forall (m :: * -> *) a.
Monad m =>
Blocked (m a) -> m (Blocked a))
-> Traversable Blocked
(a -> f b) -> Blocked a -> f (Blocked b)
forall (t :: * -> *).
(Functor t, Foldable t) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a. Monad m => Blocked (m a) -> m (Blocked a)
forall (f :: * -> *) a.
Applicative f =>
Blocked (f a) -> f (Blocked a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Blocked a -> m (Blocked b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Blocked a -> f (Blocked b)
sequence :: Blocked (m a) -> m (Blocked a)
$csequence :: forall (m :: * -> *) a. Monad m => Blocked (m a) -> m (Blocked a)
mapM :: (a -> m b) -> Blocked a -> m (Blocked b)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Blocked a -> m (Blocked b)
sequenceA :: Blocked (f a) -> f (Blocked a)
$csequenceA :: forall (f :: * -> *) a.
Applicative f =>
Blocked (f a) -> f (Blocked a)
traverse :: (a -> f b) -> Blocked a -> f (Blocked b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Blocked a -> f (Blocked b)
$cp2Traversable :: Foldable Blocked
$cp1Traversable :: Functor Blocked
Traversable)
instance Applicative Blocked where
pure :: a -> Blocked a
pure = a -> Blocked a
forall a. a -> Blocked a
notBlocked
f :: Blocked (a -> b)
f <*> :: Blocked (a -> b) -> Blocked a -> Blocked b
<*> e :: Blocked a
e = ((Blocked (a -> b)
f Blocked (a -> b) -> () -> Blocked ()
forall (f :: * -> *) a b. Functor f => f a -> b -> f b
$> ()) Blocked () -> Blocked () -> Blocked ()
forall a. Monoid a => a -> a -> a
`mappend` (Blocked a
e Blocked a -> () -> Blocked ()
forall (f :: * -> *) a b. Functor f => f a -> b -> f b
$> ())) Blocked () -> b -> Blocked b
forall (f :: * -> *) a b. Functor f => f a -> b -> f b
$> Blocked (a -> b) -> a -> b
forall t. Blocked t -> t
ignoreBlocking Blocked (a -> b)
f (Blocked a -> a
forall t. Blocked t -> t
ignoreBlocking Blocked a
e)
type Blocked_ = Blocked ()
instance Semigroup Blocked_ where
b :: Blocked ()
b@Blocked{} <> :: Blocked () -> Blocked () -> Blocked ()
<> _ = Blocked ()
b
_ <> b :: Blocked ()
b@Blocked{} = Blocked ()
b
NotBlocked x :: NotBlocked
x _ <> NotBlocked y :: NotBlocked
y _ = NotBlocked -> () -> Blocked ()
forall t. NotBlocked -> t -> Blocked t
NotBlocked (NotBlocked
x NotBlocked -> NotBlocked -> NotBlocked
forall a. Semigroup a => a -> a -> a
<> NotBlocked
y) ()
instance Monoid Blocked_ where
mempty :: Blocked ()
mempty = () -> Blocked ()
forall a. a -> Blocked a
notBlocked ()
mappend :: Blocked () -> Blocked () -> Blocked ()
mappend = Blocked () -> Blocked () -> Blocked ()
forall a. Semigroup a => a -> a -> a
(<>)
stuckOn :: Elim -> NotBlocked -> NotBlocked
stuckOn :: Elim -> NotBlocked -> NotBlocked
stuckOn e :: Elim
e r :: NotBlocked
r =
case NotBlocked
r of
MissingClauses -> NotBlocked
r
StuckOn{} -> NotBlocked
r
Underapplied -> NotBlocked
r'
AbsurdMatch -> NotBlocked
r'
ReallyNotBlocked -> NotBlocked
r'
where r' :: NotBlocked
r' = Elim -> NotBlocked
StuckOn Elim
e
type NAPs = [NamedArg DeBruijnPattern]
data Clause = Clause
{ Clause -> Range
clauseLHSRange :: Range
, Clause -> Range
clauseFullRange :: Range
, Clause -> Telescope
clauseTel :: Telescope
, Clause -> NAPs
namedClausePats :: NAPs
, Clause -> Maybe Term
clauseBody :: Maybe Term
, Clause -> Maybe (Arg Type)
clauseType :: Maybe (Arg Type)
, Clause -> Bool
clauseCatchall :: Bool
, Clause -> Maybe Bool
clauseRecursive :: Maybe Bool
, Clause -> Maybe Bool
clauseUnreachable :: Maybe Bool
, Clause -> ExpandedEllipsis
clauseEllipsis :: ExpandedEllipsis
}
deriving (Typeable Clause
DataType
Constr
Typeable Clause =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Clause -> c Clause)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Clause)
-> (Clause -> Constr)
-> (Clause -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Clause))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Clause))
-> ((forall b. Data b => b -> b) -> Clause -> Clause)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Clause -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Clause -> r)
-> (forall u. (forall d. Data d => d -> u) -> Clause -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> Clause -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Clause -> m Clause)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Clause -> m Clause)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Clause -> m Clause)
-> Data Clause
Clause -> DataType
Clause -> Constr
(forall b. Data b => b -> b) -> Clause -> Clause
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Clause -> c Clause
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Clause
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) -> Clause -> u
forall u. (forall d. Data d => d -> u) -> Clause -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Clause -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Clause -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Clause -> m Clause
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Clause -> m Clause
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Clause
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Clause -> c Clause
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Clause)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Clause)
$cClause :: Constr
$tClause :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Clause -> m Clause
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Clause -> m Clause
gmapMp :: (forall d. Data d => d -> m d) -> Clause -> m Clause
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Clause -> m Clause
gmapM :: (forall d. Data d => d -> m d) -> Clause -> m Clause
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Clause -> m Clause
gmapQi :: Int -> (forall d. Data d => d -> u) -> Clause -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Clause -> u
gmapQ :: (forall d. Data d => d -> u) -> Clause -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> Clause -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Clause -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Clause -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Clause -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Clause -> r
gmapT :: (forall b. Data b => b -> b) -> Clause -> Clause
$cgmapT :: (forall b. Data b => b -> b) -> Clause -> Clause
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Clause)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Clause)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c Clause)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c Clause)
dataTypeOf :: Clause -> DataType
$cdataTypeOf :: Clause -> DataType
toConstr :: Clause -> Constr
$ctoConstr :: Clause -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Clause
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c Clause
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Clause -> c Clause
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Clause -> c Clause
$cp1Data :: Typeable Clause
Data, Int -> Clause -> ShowS
[Clause] -> ShowS
Clause -> String
(Int -> Clause -> ShowS)
-> (Clause -> String) -> ([Clause] -> ShowS) -> Show Clause
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Clause] -> ShowS
$cshowList :: [Clause] -> ShowS
show :: Clause -> String
$cshow :: Clause -> String
showsPrec :: Int -> Clause -> ShowS
$cshowsPrec :: Int -> Clause -> ShowS
Show)
clausePats :: Clause -> [Arg DeBruijnPattern]
clausePats :: Clause -> [Arg DeBruijnPattern]
clausePats = (Arg (Named NamedName DeBruijnPattern) -> Arg DeBruijnPattern)
-> NAPs -> [Arg DeBruijnPattern]
forall a b. (a -> b) -> [a] -> [b]
map ((Named NamedName DeBruijnPattern -> DeBruijnPattern)
-> Arg (Named NamedName DeBruijnPattern) -> Arg DeBruijnPattern
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Named NamedName DeBruijnPattern -> DeBruijnPattern
forall name a. Named name a -> a
namedThing) (NAPs -> [Arg DeBruijnPattern])
-> (Clause -> NAPs) -> Clause -> [Arg DeBruijnPattern]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Clause -> NAPs
namedClausePats
instance HasRange Clause where
getRange :: Clause -> Range
getRange = Clause -> Range
clauseLHSRange
type PatVarName = ArgName
patVarNameToString :: PatVarName -> String
patVarNameToString :: ShowS
patVarNameToString = ShowS
argNameToString
nameToPatVarName :: Name -> PatVarName
nameToPatVarName :: Name -> String
nameToPatVarName = Name -> String
nameToArgName
data PatternInfo = PatternInfo
{ PatternInfo -> PatOrigin
patOrigin :: PatOrigin
, PatternInfo -> [Name]
patAsNames :: [Name]
} deriving (Typeable PatternInfo
DataType
Constr
Typeable PatternInfo =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PatternInfo -> c PatternInfo)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PatternInfo)
-> (PatternInfo -> Constr)
-> (PatternInfo -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PatternInfo))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PatternInfo))
-> ((forall b. Data b => b -> b) -> PatternInfo -> PatternInfo)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PatternInfo -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PatternInfo -> r)
-> (forall u. (forall d. Data d => d -> u) -> PatternInfo -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> PatternInfo -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> PatternInfo -> m PatternInfo)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PatternInfo -> m PatternInfo)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PatternInfo -> m PatternInfo)
-> Data PatternInfo
PatternInfo -> DataType
PatternInfo -> Constr
(forall b. Data b => b -> b) -> PatternInfo -> PatternInfo
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PatternInfo -> c PatternInfo
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PatternInfo
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) -> PatternInfo -> u
forall u. (forall d. Data d => d -> u) -> PatternInfo -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PatternInfo -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PatternInfo -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> PatternInfo -> m PatternInfo
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PatternInfo -> m PatternInfo
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PatternInfo
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PatternInfo -> c PatternInfo
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PatternInfo)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PatternInfo)
$cPatternInfo :: Constr
$tPatternInfo :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> PatternInfo -> m PatternInfo
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PatternInfo -> m PatternInfo
gmapMp :: (forall d. Data d => d -> m d) -> PatternInfo -> m PatternInfo
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PatternInfo -> m PatternInfo
gmapM :: (forall d. Data d => d -> m d) -> PatternInfo -> m PatternInfo
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> PatternInfo -> m PatternInfo
gmapQi :: Int -> (forall d. Data d => d -> u) -> PatternInfo -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> PatternInfo -> u
gmapQ :: (forall d. Data d => d -> u) -> PatternInfo -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> PatternInfo -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PatternInfo -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PatternInfo -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PatternInfo -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PatternInfo -> r
gmapT :: (forall b. Data b => b -> b) -> PatternInfo -> PatternInfo
$cgmapT :: (forall b. Data b => b -> b) -> PatternInfo -> PatternInfo
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PatternInfo)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c PatternInfo)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c PatternInfo)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PatternInfo)
dataTypeOf :: PatternInfo -> DataType
$cdataTypeOf :: PatternInfo -> DataType
toConstr :: PatternInfo -> Constr
$ctoConstr :: PatternInfo -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PatternInfo
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PatternInfo
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PatternInfo -> c PatternInfo
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PatternInfo -> c PatternInfo
$cp1Data :: Typeable PatternInfo
Data, Int -> PatternInfo -> ShowS
[PatternInfo] -> ShowS
PatternInfo -> String
(Int -> PatternInfo -> ShowS)
-> (PatternInfo -> String)
-> ([PatternInfo] -> ShowS)
-> Show PatternInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PatternInfo] -> ShowS
$cshowList :: [PatternInfo] -> ShowS
show :: PatternInfo -> String
$cshow :: PatternInfo -> String
showsPrec :: Int -> PatternInfo -> ShowS
$cshowsPrec :: Int -> PatternInfo -> ShowS
Show, PatternInfo -> PatternInfo -> Bool
(PatternInfo -> PatternInfo -> Bool)
-> (PatternInfo -> PatternInfo -> Bool) -> Eq PatternInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PatternInfo -> PatternInfo -> Bool
$c/= :: PatternInfo -> PatternInfo -> Bool
== :: PatternInfo -> PatternInfo -> Bool
$c== :: PatternInfo -> PatternInfo -> Bool
Eq)
defaultPatternInfo :: PatternInfo
defaultPatternInfo :: PatternInfo
defaultPatternInfo = PatOrigin -> [Name] -> PatternInfo
PatternInfo PatOrigin
PatOSystem []
data PatOrigin
= PatOSystem
| PatOSplit
| PatOVar Name
| PatODot
| PatOWild
| PatOCon
| PatORec
| PatOLit
| PatOAbsurd
deriving (Typeable PatOrigin
DataType
Constr
Typeable PatOrigin =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PatOrigin -> c PatOrigin)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PatOrigin)
-> (PatOrigin -> Constr)
-> (PatOrigin -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PatOrigin))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PatOrigin))
-> ((forall b. Data b => b -> b) -> PatOrigin -> PatOrigin)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PatOrigin -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PatOrigin -> r)
-> (forall u. (forall d. Data d => d -> u) -> PatOrigin -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> PatOrigin -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> PatOrigin -> m PatOrigin)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PatOrigin -> m PatOrigin)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PatOrigin -> m PatOrigin)
-> Data PatOrigin
PatOrigin -> DataType
PatOrigin -> Constr
(forall b. Data b => b -> b) -> PatOrigin -> PatOrigin
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PatOrigin -> c PatOrigin
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PatOrigin
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) -> PatOrigin -> u
forall u. (forall d. Data d => d -> u) -> PatOrigin -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PatOrigin -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PatOrigin -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> PatOrigin -> m PatOrigin
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PatOrigin -> m PatOrigin
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PatOrigin
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PatOrigin -> c PatOrigin
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PatOrigin)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PatOrigin)
$cPatOAbsurd :: Constr
$cPatOLit :: Constr
$cPatORec :: Constr
$cPatOCon :: Constr
$cPatOWild :: Constr
$cPatODot :: Constr
$cPatOVar :: Constr
$cPatOSplit :: Constr
$cPatOSystem :: Constr
$tPatOrigin :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> PatOrigin -> m PatOrigin
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PatOrigin -> m PatOrigin
gmapMp :: (forall d. Data d => d -> m d) -> PatOrigin -> m PatOrigin
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> PatOrigin -> m PatOrigin
gmapM :: (forall d. Data d => d -> m d) -> PatOrigin -> m PatOrigin
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> PatOrigin -> m PatOrigin
gmapQi :: Int -> (forall d. Data d => d -> u) -> PatOrigin -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> PatOrigin -> u
gmapQ :: (forall d. Data d => d -> u) -> PatOrigin -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> PatOrigin -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PatOrigin -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> PatOrigin -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PatOrigin -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> PatOrigin -> r
gmapT :: (forall b. Data b => b -> b) -> PatOrigin -> PatOrigin
$cgmapT :: (forall b. Data b => b -> b) -> PatOrigin -> PatOrigin
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PatOrigin)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PatOrigin)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c PatOrigin)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c PatOrigin)
dataTypeOf :: PatOrigin -> DataType
$cdataTypeOf :: PatOrigin -> DataType
toConstr :: PatOrigin -> Constr
$ctoConstr :: PatOrigin -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PatOrigin
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c PatOrigin
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PatOrigin -> c PatOrigin
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> PatOrigin -> c PatOrigin
$cp1Data :: Typeable PatOrigin
Data, Int -> PatOrigin -> ShowS
[PatOrigin] -> ShowS
PatOrigin -> String
(Int -> PatOrigin -> ShowS)
-> (PatOrigin -> String)
-> ([PatOrigin] -> ShowS)
-> Show PatOrigin
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PatOrigin] -> ShowS
$cshowList :: [PatOrigin] -> ShowS
show :: PatOrigin -> String
$cshow :: PatOrigin -> String
showsPrec :: Int -> PatOrigin -> ShowS
$cshowsPrec :: Int -> PatOrigin -> ShowS
Show, PatOrigin -> PatOrigin -> Bool
(PatOrigin -> PatOrigin -> Bool)
-> (PatOrigin -> PatOrigin -> Bool) -> Eq PatOrigin
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PatOrigin -> PatOrigin -> Bool
$c/= :: PatOrigin -> PatOrigin -> Bool
== :: PatOrigin -> PatOrigin -> Bool
$c== :: PatOrigin -> PatOrigin -> Bool
Eq)
data Pattern' x
= VarP PatternInfo x
| DotP PatternInfo Term
| ConP ConHead ConPatternInfo [NamedArg (Pattern' x)]
| LitP PatternInfo Literal
| ProjP ProjOrigin QName
| IApplyP PatternInfo Term Term x
| DefP PatternInfo QName [NamedArg (Pattern' x)]
deriving (Typeable (Pattern' x)
DataType
Constr
Typeable (Pattern' x) =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Pattern' x -> c (Pattern' x))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Pattern' x))
-> (Pattern' x -> Constr)
-> (Pattern' x -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Pattern' x)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Pattern' x)))
-> ((forall b. Data b => b -> b) -> Pattern' x -> Pattern' x)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Pattern' x -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Pattern' x -> r)
-> (forall u. (forall d. Data d => d -> u) -> Pattern' x -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> Pattern' x -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Pattern' x -> m (Pattern' x))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Pattern' x -> m (Pattern' x))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Pattern' x -> m (Pattern' x))
-> Data (Pattern' x)
Pattern' x -> DataType
Pattern' x -> Constr
(forall d. Data d => c (t d)) -> Maybe (c (Pattern' x))
(forall b. Data b => b -> b) -> Pattern' x -> Pattern' x
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Pattern' x -> c (Pattern' x)
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Pattern' x)
forall x. Data x => Typeable (Pattern' x)
forall x. Data x => Pattern' x -> DataType
forall x. Data x => Pattern' x -> Constr
forall x.
Data x =>
(forall b. Data b => b -> b) -> Pattern' x -> Pattern' x
forall x u.
Data x =>
Int -> (forall d. Data d => d -> u) -> Pattern' x -> u
forall x u.
Data x =>
(forall d. Data d => d -> u) -> Pattern' x -> [u]
forall x r r'.
Data x =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Pattern' x -> r
forall x r r'.
Data x =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Pattern' x -> r
forall x (m :: * -> *).
(Data x, Monad m) =>
(forall d. Data d => d -> m d) -> Pattern' x -> m (Pattern' x)
forall x (m :: * -> *).
(Data x, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Pattern' x -> m (Pattern' x)
forall x (c :: * -> *).
Data x =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Pattern' x)
forall x (c :: * -> *).
Data x =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Pattern' x -> c (Pattern' x)
forall x (t :: * -> *) (c :: * -> *).
(Data x, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Pattern' x))
forall x (t :: * -> * -> *) (c :: * -> *).
(Data x, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Pattern' x))
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) -> Pattern' x -> u
forall u. (forall d. Data d => d -> u) -> Pattern' x -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Pattern' x -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Pattern' x -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Pattern' x -> m (Pattern' x)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Pattern' x -> m (Pattern' x)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Pattern' x)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Pattern' x -> c (Pattern' x)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Pattern' x))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Pattern' x))
$cDefP :: Constr
$cIApplyP :: Constr
$cProjP :: Constr
$cLitP :: Constr
$cConP :: Constr
$cDotP :: Constr
$cVarP :: Constr
$tPattern' :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Pattern' x -> m (Pattern' x)
$cgmapMo :: forall x (m :: * -> *).
(Data x, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Pattern' x -> m (Pattern' x)
gmapMp :: (forall d. Data d => d -> m d) -> Pattern' x -> m (Pattern' x)
$cgmapMp :: forall x (m :: * -> *).
(Data x, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Pattern' x -> m (Pattern' x)
gmapM :: (forall d. Data d => d -> m d) -> Pattern' x -> m (Pattern' x)
$cgmapM :: forall x (m :: * -> *).
(Data x, Monad m) =>
(forall d. Data d => d -> m d) -> Pattern' x -> m (Pattern' x)
gmapQi :: Int -> (forall d. Data d => d -> u) -> Pattern' x -> u
$cgmapQi :: forall x u.
Data x =>
Int -> (forall d. Data d => d -> u) -> Pattern' x -> u
gmapQ :: (forall d. Data d => d -> u) -> Pattern' x -> [u]
$cgmapQ :: forall x u.
Data x =>
(forall d. Data d => d -> u) -> Pattern' x -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Pattern' x -> r
$cgmapQr :: forall x r r'.
Data x =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Pattern' x -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Pattern' x -> r
$cgmapQl :: forall x r r'.
Data x =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Pattern' x -> r
gmapT :: (forall b. Data b => b -> b) -> Pattern' x -> Pattern' x
$cgmapT :: forall x.
Data x =>
(forall b. Data b => b -> b) -> Pattern' x -> Pattern' x
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Pattern' x))
$cdataCast2 :: forall x (t :: * -> * -> *) (c :: * -> *).
(Data x, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Pattern' x))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (Pattern' x))
$cdataCast1 :: forall x (t :: * -> *) (c :: * -> *).
(Data x, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Pattern' x))
dataTypeOf :: Pattern' x -> DataType
$cdataTypeOf :: forall x. Data x => Pattern' x -> DataType
toConstr :: Pattern' x -> Constr
$ctoConstr :: forall x. Data x => Pattern' x -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Pattern' x)
$cgunfold :: forall x (c :: * -> *).
Data x =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Pattern' x)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Pattern' x -> c (Pattern' x)
$cgfoldl :: forall x (c :: * -> *).
Data x =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Pattern' x -> c (Pattern' x)
$cp1Data :: forall x. Data x => Typeable (Pattern' x)
Data, Int -> Pattern' x -> ShowS
[Pattern' x] -> ShowS
Pattern' x -> String
(Int -> Pattern' x -> ShowS)
-> (Pattern' x -> String)
-> ([Pattern' x] -> ShowS)
-> Show (Pattern' x)
forall x. Show x => Int -> Pattern' x -> ShowS
forall x. Show x => [Pattern' x] -> ShowS
forall x. Show x => Pattern' x -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Pattern' x] -> ShowS
$cshowList :: forall x. Show x => [Pattern' x] -> ShowS
show :: Pattern' x -> String
$cshow :: forall x. Show x => Pattern' x -> String
showsPrec :: Int -> Pattern' x -> ShowS
$cshowsPrec :: forall x. Show x => Int -> Pattern' x -> ShowS
Show, a -> Pattern' b -> Pattern' a
(a -> b) -> Pattern' a -> Pattern' b
(forall a b. (a -> b) -> Pattern' a -> Pattern' b)
-> (forall a b. a -> Pattern' b -> Pattern' a) -> Functor Pattern'
forall a b. a -> Pattern' b -> Pattern' a
forall a b. (a -> b) -> Pattern' a -> Pattern' b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> Pattern' b -> Pattern' a
$c<$ :: forall a b. a -> Pattern' b -> Pattern' a
fmap :: (a -> b) -> Pattern' a -> Pattern' b
$cfmap :: forall a b. (a -> b) -> Pattern' a -> Pattern' b
Functor, Pattern' a -> Bool
(a -> m) -> Pattern' a -> m
(a -> b -> b) -> b -> Pattern' a -> b
(forall m. Monoid m => Pattern' m -> m)
-> (forall m a. Monoid m => (a -> m) -> Pattern' a -> m)
-> (forall m a. Monoid m => (a -> m) -> Pattern' a -> m)
-> (forall a b. (a -> b -> b) -> b -> Pattern' a -> b)
-> (forall a b. (a -> b -> b) -> b -> Pattern' a -> b)
-> (forall b a. (b -> a -> b) -> b -> Pattern' a -> b)
-> (forall b a. (b -> a -> b) -> b -> Pattern' a -> b)
-> (forall a. (a -> a -> a) -> Pattern' a -> a)
-> (forall a. (a -> a -> a) -> Pattern' a -> a)
-> (forall a. Pattern' a -> [a])
-> (forall a. Pattern' a -> Bool)
-> (forall a. Pattern' a -> Int)
-> (forall a. Eq a => a -> Pattern' a -> Bool)
-> (forall a. Ord a => Pattern' a -> a)
-> (forall a. Ord a => Pattern' a -> a)
-> (forall a. Num a => Pattern' a -> a)
-> (forall a. Num a => Pattern' a -> a)
-> Foldable Pattern'
forall a. Eq a => a -> Pattern' a -> Bool
forall a. Num a => Pattern' a -> a
forall a. Ord a => Pattern' a -> a
forall m. Monoid m => Pattern' m -> m
forall a. Pattern' a -> Bool
forall a. Pattern' a -> Int
forall a. Pattern' a -> [a]
forall a. (a -> a -> a) -> Pattern' a -> a
forall m a. Monoid m => (a -> m) -> Pattern' a -> m
forall b a. (b -> a -> b) -> b -> Pattern' a -> b
forall a b. (a -> b -> b) -> b -> Pattern' a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: Pattern' a -> a
$cproduct :: forall a. Num a => Pattern' a -> a
sum :: Pattern' a -> a
$csum :: forall a. Num a => Pattern' a -> a
minimum :: Pattern' a -> a
$cminimum :: forall a. Ord a => Pattern' a -> a
maximum :: Pattern' a -> a
$cmaximum :: forall a. Ord a => Pattern' a -> a
elem :: a -> Pattern' a -> Bool
$celem :: forall a. Eq a => a -> Pattern' a -> Bool
length :: Pattern' a -> Int
$clength :: forall a. Pattern' a -> Int
null :: Pattern' a -> Bool
$cnull :: forall a. Pattern' a -> Bool
toList :: Pattern' a -> [a]
$ctoList :: forall a. Pattern' a -> [a]
foldl1 :: (a -> a -> a) -> Pattern' a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> Pattern' a -> a
foldr1 :: (a -> a -> a) -> Pattern' a -> a
$cfoldr1 :: forall a. (a -> a -> a) -> Pattern' a -> a
foldl' :: (b -> a -> b) -> b -> Pattern' a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> Pattern' a -> b
foldl :: (b -> a -> b) -> b -> Pattern' a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> Pattern' a -> b
foldr' :: (a -> b -> b) -> b -> Pattern' a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> Pattern' a -> b
foldr :: (a -> b -> b) -> b -> Pattern' a -> b
$cfoldr :: forall a b. (a -> b -> b) -> b -> Pattern' a -> b
foldMap' :: (a -> m) -> Pattern' a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> Pattern' a -> m
foldMap :: (a -> m) -> Pattern' a -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> Pattern' a -> m
fold :: Pattern' m -> m
$cfold :: forall m. Monoid m => Pattern' m -> m
Foldable, Functor Pattern'
Foldable Pattern'
(Functor Pattern', Foldable Pattern') =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Pattern' a -> f (Pattern' b))
-> (forall (f :: * -> *) a.
Applicative f =>
Pattern' (f a) -> f (Pattern' a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Pattern' a -> m (Pattern' b))
-> (forall (m :: * -> *) a.
Monad m =>
Pattern' (m a) -> m (Pattern' a))
-> Traversable Pattern'
(a -> f b) -> Pattern' a -> f (Pattern' b)
forall (t :: * -> *).
(Functor t, Foldable t) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a. Monad m => Pattern' (m a) -> m (Pattern' a)
forall (f :: * -> *) a.
Applicative f =>
Pattern' (f a) -> f (Pattern' a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Pattern' a -> m (Pattern' b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Pattern' a -> f (Pattern' b)
sequence :: Pattern' (m a) -> m (Pattern' a)
$csequence :: forall (m :: * -> *) a. Monad m => Pattern' (m a) -> m (Pattern' a)
mapM :: (a -> m b) -> Pattern' a -> m (Pattern' b)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Pattern' a -> m (Pattern' b)
sequenceA :: Pattern' (f a) -> f (Pattern' a)
$csequenceA :: forall (f :: * -> *) a.
Applicative f =>
Pattern' (f a) -> f (Pattern' a)
traverse :: (a -> f b) -> Pattern' a -> f (Pattern' b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Pattern' a -> f (Pattern' b)
$cp2Traversable :: Foldable Pattern'
$cp1Traversable :: Functor Pattern'
Traversable)
type Pattern = Pattern' PatVarName
varP :: a -> Pattern' a
varP :: a -> Pattern' a
varP = PatternInfo -> a -> Pattern' a
forall x. PatternInfo -> x -> Pattern' x
VarP PatternInfo
defaultPatternInfo
dotP :: Term -> Pattern' a
dotP :: Term -> Pattern' a
dotP = PatternInfo -> Term -> Pattern' a
forall x. PatternInfo -> Term -> Pattern' x
DotP PatternInfo
defaultPatternInfo
litP :: Literal -> Pattern' a
litP :: Literal -> Pattern' a
litP = PatternInfo -> Literal -> Pattern' a
forall x. PatternInfo -> Literal -> Pattern' x
LitP PatternInfo
defaultPatternInfo
data DBPatVar = DBPatVar
{ DBPatVar -> String
dbPatVarName :: PatVarName
, DBPatVar -> Int
dbPatVarIndex :: Int
} deriving (Typeable DBPatVar
DataType
Constr
Typeable DBPatVar =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DBPatVar -> c DBPatVar)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DBPatVar)
-> (DBPatVar -> Constr)
-> (DBPatVar -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DBPatVar))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DBPatVar))
-> ((forall b. Data b => b -> b) -> DBPatVar -> DBPatVar)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DBPatVar -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DBPatVar -> r)
-> (forall u. (forall d. Data d => d -> u) -> DBPatVar -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> DBPatVar -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DBPatVar -> m DBPatVar)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DBPatVar -> m DBPatVar)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DBPatVar -> m DBPatVar)
-> Data DBPatVar
DBPatVar -> DataType
DBPatVar -> Constr
(forall b. Data b => b -> b) -> DBPatVar -> DBPatVar
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DBPatVar -> c DBPatVar
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DBPatVar
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) -> DBPatVar -> u
forall u. (forall d. Data d => d -> u) -> DBPatVar -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DBPatVar -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DBPatVar -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DBPatVar -> m DBPatVar
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DBPatVar -> m DBPatVar
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DBPatVar
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DBPatVar -> c DBPatVar
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DBPatVar)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DBPatVar)
$cDBPatVar :: Constr
$tDBPatVar :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> DBPatVar -> m DBPatVar
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DBPatVar -> m DBPatVar
gmapMp :: (forall d. Data d => d -> m d) -> DBPatVar -> m DBPatVar
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DBPatVar -> m DBPatVar
gmapM :: (forall d. Data d => d -> m d) -> DBPatVar -> m DBPatVar
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DBPatVar -> m DBPatVar
gmapQi :: Int -> (forall d. Data d => d -> u) -> DBPatVar -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> DBPatVar -> u
gmapQ :: (forall d. Data d => d -> u) -> DBPatVar -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> DBPatVar -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DBPatVar -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DBPatVar -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DBPatVar -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DBPatVar -> r
gmapT :: (forall b. Data b => b -> b) -> DBPatVar -> DBPatVar
$cgmapT :: (forall b. Data b => b -> b) -> DBPatVar -> DBPatVar
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DBPatVar)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DBPatVar)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c DBPatVar)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DBPatVar)
dataTypeOf :: DBPatVar -> DataType
$cdataTypeOf :: DBPatVar -> DataType
toConstr :: DBPatVar -> Constr
$ctoConstr :: DBPatVar -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DBPatVar
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DBPatVar
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DBPatVar -> c DBPatVar
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DBPatVar -> c DBPatVar
$cp1Data :: Typeable DBPatVar
Data, Int -> DBPatVar -> ShowS
[DBPatVar] -> ShowS
DBPatVar -> String
(Int -> DBPatVar -> ShowS)
-> (DBPatVar -> String) -> ([DBPatVar] -> ShowS) -> Show DBPatVar
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DBPatVar] -> ShowS
$cshowList :: [DBPatVar] -> ShowS
show :: DBPatVar -> String
$cshow :: DBPatVar -> String
showsPrec :: Int -> DBPatVar -> ShowS
$cshowsPrec :: Int -> DBPatVar -> ShowS
Show, DBPatVar -> DBPatVar -> Bool
(DBPatVar -> DBPatVar -> Bool)
-> (DBPatVar -> DBPatVar -> Bool) -> Eq DBPatVar
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBPatVar -> DBPatVar -> Bool
$c/= :: DBPatVar -> DBPatVar -> Bool
== :: DBPatVar -> DBPatVar -> Bool
$c== :: DBPatVar -> DBPatVar -> Bool
Eq)
type DeBruijnPattern = Pattern' DBPatVar
namedVarP :: PatVarName -> Named_ Pattern
namedVarP :: String -> Named_ Pattern
namedVarP x :: String
x = Maybe NamedName -> Pattern -> Named_ Pattern
forall name a. Maybe name -> a -> Named name a
Named Maybe NamedName
named (Pattern -> Named_ Pattern) -> Pattern -> Named_ Pattern
forall a b. (a -> b) -> a -> b
$ String -> Pattern
forall a. a -> Pattern' a
varP String
x
where named :: Maybe NamedName
named = if String -> Bool
forall a. Underscore a => a -> Bool
isUnderscore String
x then Maybe NamedName
forall a. Maybe a
Nothing else NamedName -> Maybe NamedName
forall a. a -> Maybe a
Just (NamedName -> Maybe NamedName) -> NamedName -> Maybe NamedName
forall a b. (a -> b) -> a -> b
$ Origin -> Ranged String -> NamedName
forall a. Origin -> a -> WithOrigin a
WithOrigin Origin
Inserted (Ranged String -> NamedName) -> Ranged String -> NamedName
forall a b. (a -> b) -> a -> b
$ String -> Ranged String
forall a. a -> Ranged a
unranged String
x
namedDBVarP :: Int -> PatVarName -> Named_ DeBruijnPattern
namedDBVarP :: Int -> String -> Named NamedName DeBruijnPattern
namedDBVarP m :: Int
m = ((Pattern -> DeBruijnPattern)
-> Named_ Pattern -> Named NamedName DeBruijnPattern
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ((Pattern -> DeBruijnPattern)
-> Named_ Pattern -> Named NamedName DeBruijnPattern)
-> ((String -> DBPatVar) -> Pattern -> DeBruijnPattern)
-> (String -> DBPatVar)
-> Named_ Pattern
-> Named NamedName DeBruijnPattern
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (String -> DBPatVar) -> Pattern -> DeBruijnPattern
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap) (\x :: String
x -> String -> Int -> DBPatVar
DBPatVar String
x Int
m) (Named_ Pattern -> Named NamedName DeBruijnPattern)
-> (String -> Named_ Pattern)
-> String
-> Named NamedName DeBruijnPattern
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> Named_ Pattern
namedVarP
absurdP :: Int -> DeBruijnPattern
absurdP :: Int -> DeBruijnPattern
absurdP = PatternInfo -> DBPatVar -> DeBruijnPattern
forall x. PatternInfo -> x -> Pattern' x
VarP (PatOrigin -> [Name] -> PatternInfo
PatternInfo PatOrigin
PatOAbsurd []) (DBPatVar -> DeBruijnPattern)
-> (Int -> DBPatVar) -> Int -> DeBruijnPattern
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> Int -> DBPatVar
DBPatVar String
absurdPatternName
data ConPatternInfo = ConPatternInfo
{ ConPatternInfo -> PatternInfo
conPInfo :: PatternInfo
, ConPatternInfo -> Bool
conPRecord :: Bool
, ConPatternInfo -> Bool
conPFallThrough :: Bool
, ConPatternInfo -> Maybe (Arg Type)
conPType :: Maybe (Arg Type)
, ConPatternInfo -> Bool
conPLazy :: Bool
}
deriving (Typeable ConPatternInfo
DataType
Constr
Typeable ConPatternInfo =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ConPatternInfo -> c ConPatternInfo)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ConPatternInfo)
-> (ConPatternInfo -> Constr)
-> (ConPatternInfo -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ConPatternInfo))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ConPatternInfo))
-> ((forall b. Data b => b -> b)
-> ConPatternInfo -> ConPatternInfo)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ConPatternInfo -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ConPatternInfo -> r)
-> (forall u.
(forall d. Data d => d -> u) -> ConPatternInfo -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> ConPatternInfo -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ConPatternInfo -> m ConPatternInfo)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ConPatternInfo -> m ConPatternInfo)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ConPatternInfo -> m ConPatternInfo)
-> Data ConPatternInfo
ConPatternInfo -> DataType
ConPatternInfo -> Constr
(forall b. Data b => b -> b) -> ConPatternInfo -> ConPatternInfo
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ConPatternInfo -> c ConPatternInfo
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ConPatternInfo
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) -> ConPatternInfo -> u
forall u. (forall d. Data d => d -> u) -> ConPatternInfo -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ConPatternInfo -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ConPatternInfo -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ConPatternInfo -> m ConPatternInfo
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ConPatternInfo -> m ConPatternInfo
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ConPatternInfo
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ConPatternInfo -> c ConPatternInfo
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ConPatternInfo)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ConPatternInfo)
$cConPatternInfo :: Constr
$tConPatternInfo :: DataType
gmapMo :: (forall d. Data d => d -> m d)
-> ConPatternInfo -> m ConPatternInfo
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ConPatternInfo -> m ConPatternInfo
gmapMp :: (forall d. Data d => d -> m d)
-> ConPatternInfo -> m ConPatternInfo
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ConPatternInfo -> m ConPatternInfo
gmapM :: (forall d. Data d => d -> m d)
-> ConPatternInfo -> m ConPatternInfo
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ConPatternInfo -> m ConPatternInfo
gmapQi :: Int -> (forall d. Data d => d -> u) -> ConPatternInfo -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ConPatternInfo -> u
gmapQ :: (forall d. Data d => d -> u) -> ConPatternInfo -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ConPatternInfo -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ConPatternInfo -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ConPatternInfo -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ConPatternInfo -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ConPatternInfo -> r
gmapT :: (forall b. Data b => b -> b) -> ConPatternInfo -> ConPatternInfo
$cgmapT :: (forall b. Data b => b -> b) -> ConPatternInfo -> ConPatternInfo
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ConPatternInfo)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ConPatternInfo)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c ConPatternInfo)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ConPatternInfo)
dataTypeOf :: ConPatternInfo -> DataType
$cdataTypeOf :: ConPatternInfo -> DataType
toConstr :: ConPatternInfo -> Constr
$ctoConstr :: ConPatternInfo -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ConPatternInfo
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ConPatternInfo
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ConPatternInfo -> c ConPatternInfo
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ConPatternInfo -> c ConPatternInfo
$cp1Data :: Typeable ConPatternInfo
Data, Int -> ConPatternInfo -> ShowS
[ConPatternInfo] -> ShowS
ConPatternInfo -> String
(Int -> ConPatternInfo -> ShowS)
-> (ConPatternInfo -> String)
-> ([ConPatternInfo] -> ShowS)
-> Show ConPatternInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConPatternInfo] -> ShowS
$cshowList :: [ConPatternInfo] -> ShowS
show :: ConPatternInfo -> String
$cshow :: ConPatternInfo -> String
showsPrec :: Int -> ConPatternInfo -> ShowS
$cshowsPrec :: Int -> ConPatternInfo -> ShowS
Show)
noConPatternInfo :: ConPatternInfo
noConPatternInfo :: ConPatternInfo
noConPatternInfo = PatternInfo
-> Bool -> Bool -> Maybe (Arg Type) -> Bool -> ConPatternInfo
ConPatternInfo PatternInfo
defaultPatternInfo Bool
False Bool
False Maybe (Arg Type)
forall a. Maybe a
Nothing Bool
False
toConPatternInfo :: ConInfo -> ConPatternInfo
toConPatternInfo :: ConInfo -> ConPatternInfo
toConPatternInfo ConORec = ConPatternInfo
noConPatternInfo{ conPInfo :: PatternInfo
conPInfo = PatOrigin -> [Name] -> PatternInfo
PatternInfo PatOrigin
PatORec [] , conPRecord :: Bool
conPRecord = Bool
True }
toConPatternInfo _ = ConPatternInfo
noConPatternInfo
fromConPatternInfo :: ConPatternInfo -> ConInfo
fromConPatternInfo :: ConPatternInfo -> ConInfo
fromConPatternInfo i :: ConPatternInfo
i
| ConPatternInfo -> Bool
conPRecord ConPatternInfo
i = PatOrigin -> ConInfo
patToConO (PatOrigin -> ConInfo) -> PatOrigin -> ConInfo
forall a b. (a -> b) -> a -> b
$ PatternInfo -> PatOrigin
patOrigin (PatternInfo -> PatOrigin) -> PatternInfo -> PatOrigin
forall a b. (a -> b) -> a -> b
$ ConPatternInfo -> PatternInfo
conPInfo ConPatternInfo
i
| Bool
otherwise = ConInfo
ConOCon
where
patToConO :: PatOrigin -> ConOrigin
patToConO :: PatOrigin -> ConInfo
patToConO = \case
PatOSystem -> ConInfo
ConOSystem
PatOSplit -> ConInfo
ConOSplit
PatOVar{} -> ConInfo
ConOSystem
PatODot -> ConInfo
ConOSystem
PatOWild -> ConInfo
ConOSystem
PatOCon -> ConInfo
ConOCon
PatORec -> ConInfo
ConORec
PatOLit -> ConInfo
forall a. HasCallStack => a
__IMPOSSIBLE__
PatOAbsurd -> ConInfo
ConOSystem
class PatternVars a b | b -> a where
patternVars :: b -> [Arg (Either a Term)]
instance PatternVars a (Arg (Pattern' a)) where
patternVars :: Arg (Pattern' a) -> [Arg (Either a Term)]
patternVars (Arg i :: ArgInfo
i (VarP _ x :: a
x) ) = [ArgInfo -> Either a Term -> Arg (Either a Term)
forall e. ArgInfo -> e -> Arg e
Arg ArgInfo
i (Either a Term -> Arg (Either a Term))
-> Either a Term -> Arg (Either a Term)
forall a b. (a -> b) -> a -> b
$ a -> Either a Term
forall a b. a -> Either a b
Left a
x]
patternVars (Arg i :: ArgInfo
i (DotP _ t :: Term
t) ) = [ArgInfo -> Either a Term -> Arg (Either a Term)
forall e. ArgInfo -> e -> Arg e
Arg ArgInfo
i (Either a Term -> Arg (Either a Term))
-> Either a Term -> Arg (Either a Term)
forall a b. (a -> b) -> a -> b
$ Term -> Either a Term
forall a b. b -> Either a b
Right Term
t]
patternVars (Arg _ (ConP _ _ ps :: [NamedArg (Pattern' a)]
ps)) = [NamedArg (Pattern' a)] -> [Arg (Either a Term)]
forall a b. PatternVars a b => b -> [Arg (Either a Term)]
patternVars [NamedArg (Pattern' a)]
ps
patternVars (Arg _ (DefP _ _ ps :: [NamedArg (Pattern' a)]
ps)) = [NamedArg (Pattern' a)] -> [Arg (Either a Term)]
forall a b. PatternVars a b => b -> [Arg (Either a Term)]
patternVars [NamedArg (Pattern' a)]
ps
patternVars (Arg _ (LitP _ _) ) = []
patternVars (Arg _ ProjP{} ) = []
patternVars (Arg i :: ArgInfo
i (IApplyP _ _ _ x :: a
x)) = [ArgInfo -> Either a Term -> Arg (Either a Term)
forall e. ArgInfo -> e -> Arg e
Arg ArgInfo
i (Either a Term -> Arg (Either a Term))
-> Either a Term -> Arg (Either a Term)
forall a b. (a -> b) -> a -> b
$ a -> Either a Term
forall a b. a -> Either a b
Left a
x]
instance PatternVars a (NamedArg (Pattern' a)) where
patternVars :: NamedArg (Pattern' a) -> [Arg (Either a Term)]
patternVars = Arg (Pattern' a) -> [Arg (Either a Term)]
forall a b. PatternVars a b => b -> [Arg (Either a Term)]
patternVars (Arg (Pattern' a) -> [Arg (Either a Term)])
-> (NamedArg (Pattern' a) -> Arg (Pattern' a))
-> NamedArg (Pattern' a)
-> [Arg (Either a Term)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Named NamedName (Pattern' a) -> Pattern' a)
-> NamedArg (Pattern' a) -> Arg (Pattern' a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Named NamedName (Pattern' a) -> Pattern' a
forall name a. Named name a -> a
namedThing
instance PatternVars a b => PatternVars a [b] where
patternVars :: [b] -> [Arg (Either a Term)]
patternVars = (b -> [Arg (Either a Term)]) -> [b] -> [Arg (Either a Term)]
forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
concatMap b -> [Arg (Either a Term)]
forall a b. PatternVars a b => b -> [Arg (Either a Term)]
patternVars
patternInfo :: Pattern' x -> Maybe PatternInfo
patternInfo :: Pattern' x -> Maybe PatternInfo
patternInfo (VarP i :: PatternInfo
i _) = PatternInfo -> Maybe PatternInfo
forall a. a -> Maybe a
Just PatternInfo
i
patternInfo (DotP i :: PatternInfo
i _) = PatternInfo -> Maybe PatternInfo
forall a. a -> Maybe a
Just PatternInfo
i
patternInfo (LitP i :: PatternInfo
i _) = PatternInfo -> Maybe PatternInfo
forall a. a -> Maybe a
Just PatternInfo
i
patternInfo (ConP _ ci :: ConPatternInfo
ci _) = PatternInfo -> Maybe PatternInfo
forall a. a -> Maybe a
Just (PatternInfo -> Maybe PatternInfo)
-> PatternInfo -> Maybe PatternInfo
forall a b. (a -> b) -> a -> b
$ ConPatternInfo -> PatternInfo
conPInfo ConPatternInfo
ci
patternInfo ProjP{} = Maybe PatternInfo
forall a. Maybe a
Nothing
patternInfo (IApplyP i :: PatternInfo
i _ _ _) = PatternInfo -> Maybe PatternInfo
forall a. a -> Maybe a
Just PatternInfo
i
patternInfo (DefP i :: PatternInfo
i _ _) = PatternInfo -> Maybe PatternInfo
forall a. a -> Maybe a
Just PatternInfo
i
patternOrigin :: Pattern' x -> Maybe PatOrigin
patternOrigin :: Pattern' x -> Maybe PatOrigin
patternOrigin = (PatternInfo -> PatOrigin) -> Maybe PatternInfo -> Maybe PatOrigin
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap PatternInfo -> PatOrigin
patOrigin (Maybe PatternInfo -> Maybe PatOrigin)
-> (Pattern' x -> Maybe PatternInfo)
-> Pattern' x
-> Maybe PatOrigin
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Pattern' x -> Maybe PatternInfo
forall x. Pattern' x -> Maybe PatternInfo
patternInfo
properlyMatching :: Pattern' a -> Bool
properlyMatching :: Pattern' a -> Bool
properlyMatching = Bool -> Bool -> Pattern' a -> Bool
forall a. Bool -> Bool -> Pattern' a -> Bool
properlyMatching' Bool
True Bool
True
properlyMatching'
:: Bool
-> Bool
-> Pattern' a
-> Bool
properlyMatching' :: Bool -> Bool -> Pattern' a -> Bool
properlyMatching' absP :: Bool
absP projP :: Bool
projP = \case
p :: Pattern' a
p | Bool
absP Bool -> Bool -> Bool
&& Pattern' a -> Maybe PatOrigin
forall x. Pattern' x -> Maybe PatOrigin
patternOrigin Pattern' a
p Maybe PatOrigin -> Maybe PatOrigin -> Bool
forall a. Eq a => a -> a -> Bool
== PatOrigin -> Maybe PatOrigin
forall a. a -> Maybe a
Just PatOrigin
PatOAbsurd -> Bool
True
ConP _ ci :: ConPatternInfo
ci ps :: [NamedArg (Pattern' a)]
ps
| ConPatternInfo -> Bool
conPRecord ConPatternInfo
ci -> (NamedArg (Pattern' a) -> Bool) -> [NamedArg (Pattern' a)] -> Bool
forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Bool
List.any (Pattern' a -> Bool
forall a. Pattern' a -> Bool
properlyMatching (Pattern' a -> Bool)
-> (NamedArg (Pattern' a) -> Pattern' a)
-> NamedArg (Pattern' a)
-> Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NamedArg (Pattern' a) -> Pattern' a
forall a. NamedArg a -> a
namedArg) [NamedArg (Pattern' a)]
ps
| Bool
otherwise -> Bool
True
LitP{} -> Bool
True
DefP{} -> Bool
True
ProjP{} -> Bool
projP
VarP{} -> Bool
False
DotP{} -> Bool
False
IApplyP{} -> Bool
False
instance IsProjP (Pattern' a) where
isProjP :: Pattern' a -> Maybe (ProjOrigin, AmbiguousQName)
isProjP = \case
ProjP o :: ProjOrigin
o d :: QName
d -> (ProjOrigin, AmbiguousQName) -> Maybe (ProjOrigin, AmbiguousQName)
forall a. a -> Maybe a
Just (ProjOrigin
o, QName -> AmbiguousQName
unambiguous QName
d)
_ -> Maybe (ProjOrigin, AmbiguousQName)
forall a. Maybe a
Nothing
data Substitution' a
= IdS
| EmptyS Empty
| a :# Substitution' a
| Strengthen Empty (Substitution' a)
| Wk !Int (Substitution' a)
| Lift !Int (Substitution' a)
deriving ( Int -> Substitution' a -> ShowS
[Substitution' a] -> ShowS
Substitution' a -> String
(Int -> Substitution' a -> ShowS)
-> (Substitution' a -> String)
-> ([Substitution' a] -> ShowS)
-> Show (Substitution' a)
forall a. Show a => Int -> Substitution' a -> ShowS
forall a. Show a => [Substitution' a] -> ShowS
forall a. Show a => Substitution' a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Substitution' a] -> ShowS
$cshowList :: forall a. Show a => [Substitution' a] -> ShowS
show :: Substitution' a -> String
$cshow :: forall a. Show a => Substitution' a -> String
showsPrec :: Int -> Substitution' a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> Substitution' a -> ShowS
Show
, a -> Substitution' b -> Substitution' a
(a -> b) -> Substitution' a -> Substitution' b
(forall a b. (a -> b) -> Substitution' a -> Substitution' b)
-> (forall a b. a -> Substitution' b -> Substitution' a)
-> Functor Substitution'
forall a b. a -> Substitution' b -> Substitution' a
forall a b. (a -> b) -> Substitution' a -> Substitution' b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> Substitution' b -> Substitution' a
$c<$ :: forall a b. a -> Substitution' b -> Substitution' a
fmap :: (a -> b) -> Substitution' a -> Substitution' b
$cfmap :: forall a b. (a -> b) -> Substitution' a -> Substitution' b
Functor
, Substitution' a -> Bool
(a -> m) -> Substitution' a -> m
(a -> b -> b) -> b -> Substitution' a -> b
(forall m. Monoid m => Substitution' m -> m)
-> (forall m a. Monoid m => (a -> m) -> Substitution' a -> m)
-> (forall m a. Monoid m => (a -> m) -> Substitution' a -> m)
-> (forall a b. (a -> b -> b) -> b -> Substitution' a -> b)
-> (forall a b. (a -> b -> b) -> b -> Substitution' a -> b)
-> (forall b a. (b -> a -> b) -> b -> Substitution' a -> b)
-> (forall b a. (b -> a -> b) -> b -> Substitution' a -> b)
-> (forall a. (a -> a -> a) -> Substitution' a -> a)
-> (forall a. (a -> a -> a) -> Substitution' a -> a)
-> (forall a. Substitution' a -> [a])
-> (forall a. Substitution' a -> Bool)
-> (forall a. Substitution' a -> Int)
-> (forall a. Eq a => a -> Substitution' a -> Bool)
-> (forall a. Ord a => Substitution' a -> a)
-> (forall a. Ord a => Substitution' a -> a)
-> (forall a. Num a => Substitution' a -> a)
-> (forall a. Num a => Substitution' a -> a)
-> Foldable Substitution'
forall a. Eq a => a -> Substitution' a -> Bool
forall a. Num a => Substitution' a -> a
forall a. Ord a => Substitution' a -> a
forall m. Monoid m => Substitution' m -> m
forall a. Substitution' a -> Bool
forall a. Substitution' a -> Int
forall a. Substitution' a -> [a]
forall a. (a -> a -> a) -> Substitution' a -> a
forall m a. Monoid m => (a -> m) -> Substitution' a -> m
forall b a. (b -> a -> b) -> b -> Substitution' a -> b
forall a b. (a -> b -> b) -> b -> Substitution' a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: Substitution' a -> a
$cproduct :: forall a. Num a => Substitution' a -> a
sum :: Substitution' a -> a
$csum :: forall a. Num a => Substitution' a -> a
minimum :: Substitution' a -> a
$cminimum :: forall a. Ord a => Substitution' a -> a
maximum :: Substitution' a -> a
$cmaximum :: forall a. Ord a => Substitution' a -> a
elem :: a -> Substitution' a -> Bool
$celem :: forall a. Eq a => a -> Substitution' a -> Bool
length :: Substitution' a -> Int
$clength :: forall a. Substitution' a -> Int
null :: Substitution' a -> Bool
$cnull :: forall a. Substitution' a -> Bool
toList :: Substitution' a -> [a]
$ctoList :: forall a. Substitution' a -> [a]
foldl1 :: (a -> a -> a) -> Substitution' a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> Substitution' a -> a
foldr1 :: (a -> a -> a) -> Substitution' a -> a
$cfoldr1 :: forall a. (a -> a -> a) -> Substitution' a -> a
foldl' :: (b -> a -> b) -> b -> Substitution' a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> Substitution' a -> b
foldl :: (b -> a -> b) -> b -> Substitution' a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> Substitution' a -> b
foldr' :: (a -> b -> b) -> b -> Substitution' a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> Substitution' a -> b
foldr :: (a -> b -> b) -> b -> Substitution' a -> b
$cfoldr :: forall a b. (a -> b -> b) -> b -> Substitution' a -> b
foldMap' :: (a -> m) -> Substitution' a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> Substitution' a -> m
foldMap :: (a -> m) -> Substitution' a -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> Substitution' a -> m
fold :: Substitution' m -> m
$cfold :: forall m. Monoid m => Substitution' m -> m
Foldable
, Functor Substitution'
Foldable Substitution'
(Functor Substitution', Foldable Substitution') =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Substitution' a -> f (Substitution' b))
-> (forall (f :: * -> *) a.
Applicative f =>
Substitution' (f a) -> f (Substitution' a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Substitution' a -> m (Substitution' b))
-> (forall (m :: * -> *) a.
Monad m =>
Substitution' (m a) -> m (Substitution' a))
-> Traversable Substitution'
(a -> f b) -> Substitution' a -> f (Substitution' b)
forall (t :: * -> *).
(Functor t, Foldable t) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a.
Monad m =>
Substitution' (m a) -> m (Substitution' a)
forall (f :: * -> *) a.
Applicative f =>
Substitution' (f a) -> f (Substitution' a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Substitution' a -> m (Substitution' b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Substitution' a -> f (Substitution' b)
sequence :: Substitution' (m a) -> m (Substitution' a)
$csequence :: forall (m :: * -> *) a.
Monad m =>
Substitution' (m a) -> m (Substitution' a)
mapM :: (a -> m b) -> Substitution' a -> m (Substitution' b)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Substitution' a -> m (Substitution' b)
sequenceA :: Substitution' (f a) -> f (Substitution' a)
$csequenceA :: forall (f :: * -> *) a.
Applicative f =>
Substitution' (f a) -> f (Substitution' a)
traverse :: (a -> f b) -> Substitution' a -> f (Substitution' b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Substitution' a -> f (Substitution' b)
$cp2Traversable :: Foldable Substitution'
$cp1Traversable :: Functor Substitution'
Traversable
, Typeable (Substitution' a)
DataType
Constr
Typeable (Substitution' a) =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Substitution' a -> c (Substitution' a))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Substitution' a))
-> (Substitution' a -> Constr)
-> (Substitution' a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Substitution' a)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Substitution' a)))
-> ((forall b. Data b => b -> b)
-> Substitution' a -> Substitution' a)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Substitution' a -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Substitution' a -> r)
-> (forall u.
(forall d. Data d => d -> u) -> Substitution' a -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> Substitution' a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> Substitution' a -> m (Substitution' a))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> Substitution' a -> m (Substitution' a))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> Substitution' a -> m (Substitution' a))
-> Data (Substitution' a)
Substitution' a -> DataType
Substitution' a -> Constr
(forall d. Data d => c (t d)) -> Maybe (c (Substitution' a))
(forall b. Data b => b -> b) -> Substitution' a -> Substitution' a
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Substitution' a -> c (Substitution' a)
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Substitution' a)
forall a. Data a => Typeable (Substitution' a)
forall a. Data a => Substitution' a -> DataType
forall a. Data a => Substitution' a -> Constr
forall a.
Data a =>
(forall b. Data b => b -> b) -> Substitution' a -> Substitution' a
forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> Substitution' a -> u
forall a u.
Data a =>
(forall d. Data d => d -> u) -> Substitution' a -> [u]
forall a r r'.
Data a =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Substitution' a -> r
forall a r r'.
Data a =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Substitution' a -> r
forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d)
-> Substitution' a -> m (Substitution' a)
forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> Substitution' a -> m (Substitution' a)
forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Substitution' a)
forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Substitution' a -> c (Substitution' a)
forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Substitution' a))
forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Substitution' 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) -> Substitution' a -> u
forall u. (forall d. Data d => d -> u) -> Substitution' a -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Substitution' a -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Substitution' a -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> Substitution' a -> m (Substitution' a)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> Substitution' a -> m (Substitution' a)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Substitution' a)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Substitution' a -> c (Substitution' a)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Substitution' a))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Substitution' a))
$cLift :: Constr
$cWk :: Constr
$cStrengthen :: Constr
$c:# :: Constr
$cEmptyS :: Constr
$cIdS :: Constr
$tSubstitution' :: DataType
gmapMo :: (forall d. Data d => d -> m d)
-> Substitution' a -> m (Substitution' a)
$cgmapMo :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> Substitution' a -> m (Substitution' a)
gmapMp :: (forall d. Data d => d -> m d)
-> Substitution' a -> m (Substitution' a)
$cgmapMp :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> Substitution' a -> m (Substitution' a)
gmapM :: (forall d. Data d => d -> m d)
-> Substitution' a -> m (Substitution' a)
$cgmapM :: forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d)
-> Substitution' a -> m (Substitution' a)
gmapQi :: Int -> (forall d. Data d => d -> u) -> Substitution' a -> u
$cgmapQi :: forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> Substitution' a -> u
gmapQ :: (forall d. Data d => d -> u) -> Substitution' a -> [u]
$cgmapQ :: forall a u.
Data a =>
(forall d. Data d => d -> u) -> Substitution' a -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Substitution' a -> r
$cgmapQr :: forall a r r'.
Data a =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Substitution' a -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Substitution' a -> r
$cgmapQl :: forall a r r'.
Data a =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Substitution' a -> r
gmapT :: (forall b. Data b => b -> b) -> Substitution' a -> Substitution' a
$cgmapT :: forall a.
Data a =>
(forall b. Data b => b -> b) -> Substitution' a -> Substitution' a
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Substitution' a))
$cdataCast2 :: forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Substitution' a))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (Substitution' a))
$cdataCast1 :: forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Substitution' a))
dataTypeOf :: Substitution' a -> DataType
$cdataTypeOf :: forall a. Data a => Substitution' a -> DataType
toConstr :: Substitution' a -> Constr
$ctoConstr :: forall a. Data a => Substitution' a -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Substitution' a)
$cgunfold :: forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Substitution' a)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Substitution' a -> c (Substitution' a)
$cgfoldl :: forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Substitution' a -> c (Substitution' a)
$cp1Data :: forall a. Data a => Typeable (Substitution' a)
Data
)
type Substitution = Substitution' Term
type PatternSubstitution = Substitution' DeBruijnPattern
infixr 4 :#
instance Null (Substitution' a) where
empty :: Substitution' a
empty = Substitution' a
forall a. Substitution' a
IdS
null :: Substitution' a -> Bool
null IdS = Bool
True
null _ = Bool
False
data EqualityView
= EqualityType
{ EqualityView -> Sort
eqtSort :: Sort
, EqualityView -> QName
eqtName :: QName
, EqualityView -> [Arg Term]
eqtParams :: [Arg Term]
, EqualityView -> Arg Term
eqtType :: Arg Term
, EqualityView -> Arg Term
eqtLhs :: Arg Term
, EqualityView -> Arg Term
eqtRhs :: Arg Term
}
| OtherType Type
isEqualityType :: EqualityView -> Bool
isEqualityType :: EqualityView -> Bool
isEqualityType EqualityType{} = Bool
True
isEqualityType OtherType{} = Bool
False
data PathView
= PathType
{ PathView -> Sort
pathSort :: Sort
, PathView -> QName
pathName :: QName
, PathView -> Arg Term
pathLevel :: Arg Term
, PathView -> Arg Term
pathType :: Arg Term
, PathView -> Arg Term
pathLhs :: Arg Term
, PathView -> Arg Term
pathRhs :: Arg Term
}
| OType Type
isPathType :: PathView -> Bool
isPathType :: PathView -> Bool
isPathType PathType{} = Bool
True
isPathType OType{} = Bool
False
data IntervalView
= IZero
| IOne
| IMin (Arg Term) (Arg Term)
| IMax (Arg Term) (Arg Term)
| INeg (Arg Term)
| OTerm Term
deriving Int -> IntervalView -> ShowS
[IntervalView] -> ShowS
IntervalView -> String
(Int -> IntervalView -> ShowS)
-> (IntervalView -> String)
-> ([IntervalView] -> ShowS)
-> Show IntervalView
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IntervalView] -> ShowS
$cshowList :: [IntervalView] -> ShowS
show :: IntervalView -> String
$cshow :: IntervalView -> String
showsPrec :: Int -> IntervalView -> ShowS
$cshowsPrec :: Int -> IntervalView -> ShowS
Show
isIOne :: IntervalView -> Bool
isIOne :: IntervalView -> Bool
isIOne IOne = Bool
True
isIOne _ = Bool
False
absurdBody :: Abs Term
absurdBody :: Abs Term
absurdBody = String -> Term -> Abs Term
forall a. String -> a -> Abs a
Abs String
absurdPatternName (Term -> Abs Term) -> Term -> Abs Term
forall a b. (a -> b) -> a -> b
$ Int -> Elims -> Term
Var 0 []
isAbsurdBody :: Abs Term -> Bool
isAbsurdBody :: Abs Term -> Bool
isAbsurdBody (Abs x :: String
x (Var 0 [])) = String -> Bool
isAbsurdPatternName String
x
isAbsurdBody _ = Bool
False
absurdPatternName :: PatVarName
absurdPatternName :: String
absurdPatternName = "()"
isAbsurdPatternName :: PatVarName -> Bool
isAbsurdPatternName :: String -> Bool
isAbsurdPatternName x :: String
x = String
x String -> String -> Bool
forall a. Eq a => a -> a -> Bool
== String
absurdPatternName
var :: Nat -> Term
var :: Int -> Term
var i :: Int
i | Int
i Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 0 = Int -> Elims -> Term
Var Int
i []
| Bool
otherwise = Term
forall a. HasCallStack => a
__IMPOSSIBLE__
dontCare :: Term -> Term
dontCare :: Term -> Term
dontCare v :: Term
v =
case Term
v of
DontCare{} -> Term
v
_ -> Term -> Term
DontCare Term
v
dummyTerm' :: String -> Int -> Term
dummyTerm' :: String -> Int -> Term
dummyTerm' file :: String
file line :: Int
line = (String -> Elims -> Term) -> Elims -> String -> Term
forall a b c. (a -> b -> c) -> b -> a -> c
flip String -> Elims -> Term
Dummy [] (String -> Term) -> String -> Term
forall a b. (a -> b) -> a -> b
$ String
file String -> ShowS
forall a. [a] -> [a] -> [a]
++ ":" String -> ShowS
forall a. [a] -> [a] -> [a]
++ Int -> String
forall a. Show a => a -> String
show Int
line
dummyLevel' :: String -> Int -> Level
dummyLevel' :: String -> Int -> Level
dummyLevel' file :: String
file line :: Int
line = Term -> Level
unreducedLevel (Term -> Level) -> Term -> Level
forall a b. (a -> b) -> a -> b
$ String -> Int -> Term
dummyTerm' String
file Int
line
dummyTerm :: String -> Int -> Term
dummyTerm :: String -> Int -> Term
dummyTerm file :: String
file = String -> Int -> Term
dummyTerm' ("dummyTerm: " String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
file)
__DUMMY_TERM__ :: HasCallStack => Term
__DUMMY_TERM__ :: Term
__DUMMY_TERM__ = CallStack -> (String -> Int -> Term) -> Term
forall a b. Integral a => CallStack -> (String -> a -> b) -> b
withFileAndLine' (CallStack -> CallStack
freezeCallStack CallStack
HasCallStack => CallStack
callStack) String -> Int -> Term
dummyTerm
dummyLevel :: String -> Int -> Level
dummyLevel :: String -> Int -> Level
dummyLevel file :: String
file = String -> Int -> Level
dummyLevel' ("dummyLevel: " String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
file)
__DUMMY_LEVEL__ :: HasCallStack => Level
__DUMMY_LEVEL__ :: Level
__DUMMY_LEVEL__ = CallStack -> (String -> Int -> Level) -> Level
forall a b. Integral a => CallStack -> (String -> a -> b) -> b
withFileAndLine' (CallStack -> CallStack
freezeCallStack CallStack
HasCallStack => CallStack
callStack) String -> Int -> Level
dummyLevel
dummySort :: String -> Int -> Sort
dummySort :: String -> Int -> Sort
dummySort file :: String
file line :: Int
line = String -> Sort
forall t. String -> Sort' t
DummyS (String -> Sort) -> String -> Sort
forall a b. (a -> b) -> a -> b
$ String
file String -> ShowS
forall a. [a] -> [a] -> [a]
++ ":" String -> ShowS
forall a. [a] -> [a] -> [a]
++ Int -> String
forall a. Show a => a -> String
show Int
line
__DUMMY_SORT__ :: HasCallStack => Sort
__DUMMY_SORT__ :: Sort
__DUMMY_SORT__ = CallStack -> (String -> Int -> Sort) -> Sort
forall a b. Integral a => CallStack -> (String -> a -> b) -> b
withFileAndLine' (CallStack -> CallStack
freezeCallStack CallStack
HasCallStack => CallStack
callStack) String -> Int -> Sort
dummySort
dummyType :: String -> Int -> Type
dummyType :: String -> Int -> Type
dummyType file :: String
file line :: Int
line = Sort -> Term -> Type
forall t a. Sort' t -> a -> Type'' t a
El (String -> Int -> Sort
dummySort String
file Int
line) (Term -> Type) -> Term -> Type
forall a b. (a -> b) -> a -> b
$ String -> Int -> Term
dummyTerm' ("dummyType: " String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
file) Int
line
__DUMMY_TYPE__ :: HasCallStack => Type
__DUMMY_TYPE__ :: Type
__DUMMY_TYPE__ = CallStack -> (String -> Int -> Type) -> Type
forall a b. Integral a => CallStack -> (String -> a -> b) -> b
withFileAndLine' (CallStack -> CallStack
freezeCallStack CallStack
HasCallStack => CallStack
callStack) String -> Int -> Type
dummyType
dummyDom :: String -> Int -> Dom Type
dummyDom :: String -> Int -> Dom Type
dummyDom file :: String
file line :: Int
line = Type -> Dom Type
forall a. a -> Dom a
defaultDom (Type -> Dom Type) -> Type -> Dom Type
forall a b. (a -> b) -> a -> b
$ String -> Int -> Type
dummyType String
file Int
line
__DUMMY_DOM__ :: HasCallStack => Dom Type
__DUMMY_DOM__ :: Dom Type
__DUMMY_DOM__ = CallStack -> (String -> Int -> Dom Type) -> Dom Type
forall a b. Integral a => CallStack -> (String -> a -> b) -> b
withFileAndLine' (CallStack -> CallStack
freezeCallStack CallStack
HasCallStack => CallStack
callStack) String -> Int -> Dom Type
dummyDom
pattern ClosedLevel :: Integer -> Level
pattern $bClosedLevel :: Integer -> Level
$mClosedLevel :: forall r. Level -> (Integer -> r) -> (Void# -> r) -> r
ClosedLevel n = Max n []
atomicLevel :: LevelAtom -> Level
atomicLevel :: LevelAtom -> Level
atomicLevel a :: LevelAtom
a = Integer -> [PlusLevel' Term] -> Level
forall t. Integer -> [PlusLevel' t] -> Level' t
Max 0 [ Integer -> LevelAtom -> PlusLevel' Term
forall t. Integer -> LevelAtom' t -> PlusLevel' t
Plus 0 LevelAtom
a ]
unreducedLevel :: Term -> Level
unreducedLevel :: Term -> Level
unreducedLevel v :: Term
v = LevelAtom -> Level
atomicLevel (LevelAtom -> Level) -> LevelAtom -> Level
forall a b. (a -> b) -> a -> b
$ Term -> LevelAtom
forall t. t -> LevelAtom' t
UnreducedLevel Term
v
topSort :: Type
topSort :: Type
topSort = Sort -> Type
sort Sort
forall t. Sort' t
Inf
sort :: Sort -> Type
sort :: Sort -> Type
sort s :: Sort
s = Sort -> Term -> Type
forall t a. Sort' t -> a -> Type'' t a
El (Sort -> Sort
forall t. Sort' t -> Sort' t
UnivSort Sort
s) (Term -> Type) -> Term -> Type
forall a b. (a -> b) -> a -> b
$ Sort -> Term
Sort Sort
s
varSort :: Int -> Sort
varSort :: Int -> Sort
varSort n :: Int
n = Level -> Sort
forall t. Level' t -> Sort' t
Type (Level -> Sort) -> Level -> Sort
forall a b. (a -> b) -> a -> b
$ LevelAtom -> Level
atomicLevel (LevelAtom -> Level) -> LevelAtom -> Level
forall a b. (a -> b) -> a -> b
$ NotBlocked -> Term -> LevelAtom
forall t. NotBlocked -> t -> LevelAtom' t
NeutralLevel NotBlocked
forall a. Monoid a => a
mempty (Term -> LevelAtom) -> Term -> LevelAtom
forall a b. (a -> b) -> a -> b
$ Int -> Term
var Int
n
tmSort :: Term -> Sort
tmSort :: Term -> Sort
tmSort t :: Term
t = Level -> Sort
forall t. Level' t -> Sort' t
Type (Level -> Sort) -> Level -> Sort
forall a b. (a -> b) -> a -> b
$ Term -> Level
unreducedLevel Term
t
levelPlus :: Integer -> Level -> Level
levelPlus :: Integer -> Level -> Level
levelPlus m :: Integer
m (Max n :: Integer
n as :: [PlusLevel' Term]
as) = Integer -> [PlusLevel' Term] -> Level
forall t. Integer -> [PlusLevel' t] -> Level' t
Max (Integer
m Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
+ Integer
n) ([PlusLevel' Term] -> Level) -> [PlusLevel' Term] -> Level
forall a b. (a -> b) -> a -> b
$ (PlusLevel' Term -> PlusLevel' Term)
-> [PlusLevel' Term] -> [PlusLevel' Term]
forall a b. (a -> b) -> [a] -> [b]
map PlusLevel' Term -> PlusLevel' Term
forall t. PlusLevel' t -> PlusLevel' t
pplus [PlusLevel' Term]
as
where pplus :: PlusLevel' t -> PlusLevel' t
pplus (Plus n :: Integer
n l :: LevelAtom' t
l) = Integer -> LevelAtom' t -> PlusLevel' t
forall t. Integer -> LevelAtom' t -> PlusLevel' t
Plus (Integer
m Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
+ Integer
n) LevelAtom' t
l
levelSuc :: Level -> Level
levelSuc :: Level -> Level
levelSuc = Integer -> Level -> Level
levelPlus 1
mkType :: Integer -> Sort
mkType :: Integer -> Sort
mkType n :: Integer
n = Level -> Sort
forall t. Level' t -> Sort' t
Type (Level -> Sort) -> Level -> Sort
forall a b. (a -> b) -> a -> b
$ Integer -> Level
ClosedLevel Integer
n
mkProp :: Integer -> Sort
mkProp :: Integer -> Sort
mkProp n :: Integer
n = Level -> Sort
forall t. Level' t -> Sort' t
Prop (Level -> Sort) -> Level -> Sort
forall a b. (a -> b) -> a -> b
$ Integer -> Level
ClosedLevel Integer
n
isSort :: Term -> Maybe Sort
isSort :: Term -> Maybe Sort
isSort v :: Term
v = case Term
v of
Sort s :: Sort
s -> Sort -> Maybe Sort
forall a. a -> Maybe a
Just Sort
s
_ -> Maybe Sort
forall a. Maybe a
Nothing
impossibleTerm :: String -> Int -> Term
impossibleTerm :: String -> Int -> Term
impossibleTerm file :: String
file line :: Int
line = (String -> Elims -> Term) -> Elims -> String -> Term
forall a b c. (a -> b -> c) -> b -> a -> c
flip String -> Elims -> Term
Dummy [] (String -> Term) -> String -> Term
forall a b. (a -> b) -> a -> b
$ [String] -> String
unlines
[ "An internal error has occurred. Please report this as a bug."
, "Location of the error: " String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
file String -> ShowS
forall a. [a] -> [a] -> [a]
++ ":" String -> ShowS
forall a. [a] -> [a] -> [a]
++ Int -> String
forall a. Show a => a -> String
show Int
line
]
mapAbsNamesM :: Applicative m => (ArgName -> m ArgName) -> Tele a -> m (Tele a)
mapAbsNamesM :: (String -> m String) -> Tele a -> m (Tele a)
mapAbsNamesM f :: String -> m String
f EmptyTel = Tele a -> m (Tele a)
forall (f :: * -> *) a. Applicative f => a -> f a
pure Tele a
forall a. Tele a
EmptyTel
mapAbsNamesM f :: String -> m String
f (ExtendTel a :: a
a ( Abs x :: String
x b :: Tele a
b)) = a -> Abs (Tele a) -> Tele a
forall a. a -> Abs (Tele a) -> Tele a
ExtendTel a
a (Abs (Tele a) -> Tele a) -> m (Abs (Tele a)) -> m (Tele a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ( String -> Tele a -> Abs (Tele a)
forall a. String -> a -> Abs a
Abs (String -> Tele a -> Abs (Tele a))
-> m String -> m (Tele a -> Abs (Tele a))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> String -> m String
f String
x m (Tele a -> Abs (Tele a)) -> m (Tele a) -> m (Abs (Tele a))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (String -> m String) -> Tele a -> m (Tele a)
forall (m :: * -> *) a.
Applicative m =>
(String -> m String) -> Tele a -> m (Tele a)
mapAbsNamesM String -> m String
f Tele a
b)
mapAbsNamesM f :: String -> m String
f (ExtendTel a :: a
a (NoAbs x :: String
x b :: Tele a
b)) = a -> Abs (Tele a) -> Tele a
forall a. a -> Abs (Tele a) -> Tele a
ExtendTel a
a (Abs (Tele a) -> Tele a) -> m (Abs (Tele a)) -> m (Tele a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (String -> Tele a -> Abs (Tele a)
forall a. String -> a -> Abs a
NoAbs (String -> Tele a -> Abs (Tele a))
-> m String -> m (Tele a -> Abs (Tele a))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> String -> m String
f String
x m (Tele a -> Abs (Tele a)) -> m (Tele a) -> m (Abs (Tele a))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (String -> m String) -> Tele a -> m (Tele a)
forall (m :: * -> *) a.
Applicative m =>
(String -> m String) -> Tele a -> m (Tele a)
mapAbsNamesM String -> m String
f Tele a
b)
mapAbsNames :: (ArgName -> ArgName) -> Tele a -> Tele a
mapAbsNames :: ShowS -> Tele a -> Tele a
mapAbsNames f :: ShowS
f = Identity (Tele a) -> Tele a
forall a. Identity a -> a
runIdentity (Identity (Tele a) -> Tele a)
-> (Tele a -> Identity (Tele a)) -> Tele a -> Tele a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (String -> Identity String) -> Tele a -> Identity (Tele a)
forall (m :: * -> *) a.
Applicative m =>
(String -> m String) -> Tele a -> m (Tele a)
mapAbsNamesM (String -> Identity String
forall a. a -> Identity a
Identity (String -> Identity String) -> ShowS -> String -> Identity String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ShowS
f)
replaceEmptyName :: ArgName -> Tele a -> Tele a
replaceEmptyName :: String -> Tele a -> Tele a
replaceEmptyName x :: String
x = ShowS -> Tele a -> Tele a
forall a. ShowS -> Tele a -> Tele a
mapAbsNames (ShowS -> Tele a -> Tele a) -> ShowS -> Tele a -> Tele a
forall a b. (a -> b) -> a -> b
$ \ y :: String
y -> if String -> Bool
forall a. Null a => a -> Bool
null String
y then String
x else String
y
type ListTel' a = [Dom (a, Type)]
type ListTel = ListTel' ArgName
telFromList' :: (a -> ArgName) -> ListTel' a -> Telescope
telFromList' :: (a -> String) -> ListTel' a -> Telescope
telFromList' f :: a -> String
f = (Dom' Term (a, Type) -> Telescope -> Telescope)
-> Telescope -> ListTel' a -> Telescope
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
List.foldr Dom' Term (a, Type) -> Telescope -> Telescope
forall t e. Dom' t (a, e) -> Tele (Dom' t e) -> Tele (Dom' t e)
extTel Telescope
forall a. Tele a
EmptyTel
where
extTel :: Dom' t (a, e) -> Tele (Dom' t e) -> Tele (Dom' t e)
extTel dom :: Dom' t (a, e)
dom@Dom{unDom :: forall t e. Dom' t e -> e
unDom = (x :: a
x, a :: e
a)} = Dom' t e -> Abs (Tele (Dom' t e)) -> Tele (Dom' t e)
forall a. a -> Abs (Tele a) -> Tele a
ExtendTel (Dom' t (a, e)
dom{unDom :: e
unDom = e
a}) (Abs (Tele (Dom' t e)) -> Tele (Dom' t e))
-> (Tele (Dom' t e) -> Abs (Tele (Dom' t e)))
-> Tele (Dom' t e)
-> Tele (Dom' t e)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> Tele (Dom' t e) -> Abs (Tele (Dom' t e))
forall a. String -> a -> Abs a
Abs (a -> String
f a
x)
telFromList :: ListTel -> Telescope
telFromList :: ListTel -> Telescope
telFromList = ShowS -> ListTel -> Telescope
forall a. (a -> String) -> ListTel' a -> Telescope
telFromList' ShowS
forall a. a -> a
id
telToList :: Tele (Dom t) -> [Dom (ArgName,t)]
telToList :: Tele (Dom t) -> [Dom (String, t)]
telToList EmptyTel = []
telToList (ExtendTel arg :: Dom t
arg (Abs x :: String
x tel :: Tele (Dom t)
tel)) = (t -> (String, t)) -> Dom t -> Dom (String, t)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (String
x,) Dom t
arg Dom (String, t) -> [Dom (String, t)] -> [Dom (String, t)]
forall a. a -> [a] -> [a]
: Tele (Dom t) -> [Dom (String, t)]
forall t. Tele (Dom t) -> [Dom (String, t)]
telToList Tele (Dom t)
tel
telToList (ExtendTel _ NoAbs{} ) = [Dom (String, t)]
forall a. HasCallStack => a
__IMPOSSIBLE__
listTel :: Lens' ListTel Telescope
listTel :: (ListTel -> f ListTel) -> Telescope -> f Telescope
listTel f :: ListTel -> f ListTel
f = (ListTel -> Telescope) -> f ListTel -> f Telescope
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ListTel -> Telescope
telFromList (f ListTel -> f Telescope)
-> (Telescope -> f ListTel) -> Telescope -> f Telescope
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ListTel -> f ListTel
f (ListTel -> f ListTel)
-> (Telescope -> ListTel) -> Telescope -> f ListTel
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Telescope -> ListTel
forall t. Tele (Dom t) -> [Dom (String, t)]
telToList
class TelToArgs a where
telToArgs :: a -> [Arg ArgName]
instance TelToArgs ListTel where
telToArgs :: ListTel -> [Arg String]
telToArgs = (Dom' Term (String, Type) -> Arg String) -> ListTel -> [Arg String]
forall a b. (a -> b) -> [a] -> [b]
map ((Dom' Term (String, Type) -> Arg String)
-> ListTel -> [Arg String])
-> (Dom' Term (String, Type) -> Arg String)
-> ListTel
-> [Arg String]
forall a b. (a -> b) -> a -> b
$ \ dom :: Dom' Term (String, Type)
dom -> ArgInfo -> String -> Arg String
forall e. ArgInfo -> e -> Arg e
Arg (Dom' Term (String, Type) -> ArgInfo
forall t e. Dom' t e -> ArgInfo
domInfo Dom' Term (String, Type)
dom) ((String, Type) -> String
forall a b. (a, b) -> a
fst ((String, Type) -> String) -> (String, Type) -> String
forall a b. (a -> b) -> a -> b
$ Dom' Term (String, Type) -> (String, Type)
forall t e. Dom' t e -> e
unDom Dom' Term (String, Type)
dom)
instance TelToArgs Telescope where
telToArgs :: Telescope -> [Arg String]
telToArgs = ListTel -> [Arg String]
forall a. TelToArgs a => a -> [Arg String]
telToArgs (ListTel -> [Arg String])
-> (Telescope -> ListTel) -> Telescope -> [Arg String]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Telescope -> ListTel
forall t. Tele (Dom t) -> [Dom (String, t)]
telToList
class SgTel a where
sgTel :: a -> Telescope
instance SgTel (ArgName, Dom Type) where
sgTel :: (String, Dom Type) -> Telescope
sgTel (x :: String
x, !Dom Type
dom) = Dom Type -> Abs Telescope -> Telescope
forall a. a -> Abs (Tele a) -> Tele a
ExtendTel Dom Type
dom (Abs Telescope -> Telescope) -> Abs Telescope -> Telescope
forall a b. (a -> b) -> a -> b
$ String -> Telescope -> Abs Telescope
forall a. String -> a -> Abs a
Abs String
x Telescope
forall a. Tele a
EmptyTel
instance SgTel (Dom (ArgName, Type)) where
sgTel :: Dom' Term (String, Type) -> Telescope
sgTel dom :: Dom' Term (String, Type)
dom = Dom Type -> Abs Telescope -> Telescope
forall a. a -> Abs (Tele a) -> Tele a
ExtendTel ((String, Type) -> Type
forall a b. (a, b) -> b
snd ((String, Type) -> Type) -> Dom' Term (String, Type) -> Dom Type
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Dom' Term (String, Type)
dom) (Abs Telescope -> Telescope) -> Abs Telescope -> Telescope
forall a b. (a -> b) -> a -> b
$ String -> Telescope -> Abs Telescope
forall a. String -> a -> Abs a
Abs ((String, Type) -> String
forall a b. (a, b) -> a
fst ((String, Type) -> String) -> (String, Type) -> String
forall a b. (a -> b) -> a -> b
$ Dom' Term (String, Type) -> (String, Type)
forall t e. Dom' t e -> e
unDom Dom' Term (String, Type)
dom) Telescope
forall a. Tele a
EmptyTel
instance SgTel (Dom Type) where
sgTel :: Dom Type -> Telescope
sgTel dom :: Dom Type
dom = (String, Dom Type) -> Telescope
forall a. SgTel a => a -> Telescope
sgTel (ShowS
stringToArgName "_", Dom Type
dom)
blockingMeta :: Blocked t -> Maybe MetaId
blockingMeta :: Blocked t -> Maybe MetaId
blockingMeta (Blocked m :: MetaId
m _) = MetaId -> Maybe MetaId
forall a. a -> Maybe a
Just MetaId
m
blockingMeta NotBlocked{} = Maybe MetaId
forall a. Maybe a
Nothing
blocked :: MetaId -> a -> Blocked a
blocked :: MetaId -> a -> Blocked a
blocked = MetaId -> a -> Blocked a
forall t. MetaId -> t -> Blocked t
Blocked
notBlocked :: a -> Blocked a
notBlocked :: a -> Blocked a
notBlocked = NotBlocked -> a -> Blocked a
forall t. NotBlocked -> t -> Blocked t
NotBlocked NotBlocked
ReallyNotBlocked
blocked_ :: MetaId -> Blocked_
blocked_ :: MetaId -> Blocked ()
blocked_ x :: MetaId
x = MetaId -> () -> Blocked ()
forall t. MetaId -> t -> Blocked t
blocked MetaId
x ()
notBlocked_ :: Blocked_
notBlocked_ :: Blocked ()
notBlocked_ = () -> Blocked ()
forall a. a -> Blocked a
notBlocked ()
stripDontCare :: Term -> Term
stripDontCare :: Term -> Term
stripDontCare v :: Term
v = case Term
v of
DontCare v :: Term
v -> Term
v
_ -> Term
v
arity :: Type -> Nat
arity :: Type -> Int
arity t :: Type
t = case Type -> Term
forall t a. Type'' t a -> a
unEl Type
t of
Pi _ b :: Abs Type
b -> 1 Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Type -> Int
arity (Abs Type -> Type
forall a. Abs a -> a
unAbs Abs Type
b)
_ -> 0
class Suggest a where
suggestName :: a -> Maybe String
instance Suggest String where
suggestName :: String -> Maybe String
suggestName "_" = Maybe String
forall a. Maybe a
Nothing
suggestName x :: String
x = String -> Maybe String
forall a. a -> Maybe a
Just String
x
instance Suggest (Abs b) where
suggestName :: Abs b -> Maybe String
suggestName = String -> Maybe String
forall a. Suggest a => a -> Maybe String
suggestName (String -> Maybe String)
-> (Abs b -> String) -> Abs b -> Maybe String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Abs b -> String
forall a. Abs a -> String
absName
instance Suggest Name where
suggestName :: Name -> Maybe String
suggestName = String -> Maybe String
forall a. Suggest a => a -> Maybe String
suggestName (String -> Maybe String)
-> (Name -> String) -> Name -> Maybe String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Name -> String
nameToArgName
instance Suggest Term where
suggestName :: Term -> Maybe String
suggestName (Lam _ v :: Abs Term
v) = Abs Term -> Maybe String
forall a. Suggest a => a -> Maybe String
suggestName Abs Term
v
suggestName _ = Maybe String
forall a. Maybe a
Nothing
data Suggestion = forall a. Suggest a => Suggestion a
suggests :: [Suggestion] -> String
suggests :: [Suggestion] -> String
suggests [] = "x"
suggests (Suggestion x :: a
x : xs :: [Suggestion]
xs) = String -> Maybe String -> String
forall a. a -> Maybe a -> a
fromMaybe ([Suggestion] -> String
suggests [Suggestion]
xs) (Maybe String -> String) -> Maybe String -> String
forall a b. (a -> b) -> a -> b
$ a -> Maybe String
forall a. Suggest a => a -> Maybe String
suggestName a
x
unSpine :: Term -> Term
unSpine :: Term -> Term
unSpine = (ProjOrigin -> Bool) -> Term -> Term
unSpine' ((ProjOrigin -> Bool) -> Term -> Term)
-> (ProjOrigin -> Bool) -> Term -> Term
forall a b. (a -> b) -> a -> b
$ Bool -> ProjOrigin -> Bool
forall a b. a -> b -> a
const Bool
True
unSpine' :: (ProjOrigin -> Bool) -> Term -> Term
unSpine' :: (ProjOrigin -> Bool) -> Term -> Term
unSpine' p :: ProjOrigin -> Bool
p v :: Term
v =
case Term -> Maybe (Elims -> Term, Elims)
hasElims Term
v of
Just (h :: Elims -> Term
h, es :: Elims
es) -> (Elims -> Term) -> Elims -> Elims -> Term
loop Elims -> Term
h [] Elims
es
Nothing -> Term
v
where
loop :: (Elims -> Term) -> Elims -> Elims -> Term
loop :: (Elims -> Term) -> Elims -> Elims -> Term
loop h :: Elims -> Term
h res :: Elims
res es :: Elims
es =
case Elims
es of
[] -> Term
v
Proj o :: ProjOrigin
o f :: QName
f : es' :: Elims
es' | ProjOrigin -> Bool
p ProjOrigin
o -> (Elims -> Term) -> Elims -> Elims -> Term
loop (QName -> Elims -> Term
Def QName
f) [Arg Term -> Elim
forall a. Arg a -> Elim' a
Apply (Term -> Arg Term
forall a. a -> Arg a
defaultArg Term
v)] Elims
es'
e :: Elim
e : es' :: Elims
es' -> (Elims -> Term) -> Elims -> Elims -> Term
loop Elims -> Term
h (Elim
e Elim -> Elims -> Elims
forall a. a -> [a] -> [a]
: Elims
res) Elims
es'
where v :: Term
v = Elims -> Term
h (Elims -> Term) -> Elims -> Term
forall a b. (a -> b) -> a -> b
$ Elims -> Elims
forall a. [a] -> [a]
reverse Elims
res
hasElims :: Term -> Maybe (Elims -> Term, Elims)
hasElims :: Term -> Maybe (Elims -> Term, Elims)
hasElims v :: Term
v =
case Term
v of
Var i :: Int
i es :: Elims
es -> (Elims -> Term, Elims) -> Maybe (Elims -> Term, Elims)
forall a. a -> Maybe a
Just (Int -> Elims -> Term
Var Int
i, Elims
es)
Def f :: QName
f es :: Elims
es -> (Elims -> Term, Elims) -> Maybe (Elims -> Term, Elims)
forall a. a -> Maybe a
Just (QName -> Elims -> Term
Def QName
f, Elims
es)
MetaV x :: MetaId
x es :: Elims
es -> (Elims -> Term, Elims) -> Maybe (Elims -> Term, Elims)
forall a. a -> Maybe a
Just (MetaId -> Elims -> Term
MetaV MetaId
x, Elims
es)
Con{} -> Maybe (Elims -> Term, Elims)
forall a. Maybe a
Nothing
Lit{} -> Maybe (Elims -> Term, Elims)
forall a. Maybe a
Nothing
Lam _ (Abs _ v :: Term
v) -> case Term
v of
Var 0 [Proj _o :: ProjOrigin
_o f :: QName
f] -> (Elims -> Term, Elims) -> Maybe (Elims -> Term, Elims)
forall a. a -> Maybe a
Just (QName -> Elims -> Term
Def QName
f, [])
_ -> Maybe (Elims -> Term, Elims)
forall a. Maybe a
Nothing
Lam{} -> Maybe (Elims -> Term, Elims)
forall a. Maybe a
Nothing
Pi{} -> Maybe (Elims -> Term, Elims)
forall a. Maybe a
Nothing
Sort{} -> Maybe (Elims -> Term, Elims)
forall a. Maybe a
Nothing
Level{} -> Maybe (Elims -> Term, Elims)
forall a. Maybe a
Nothing
DontCare{} -> Maybe (Elims -> Term, Elims)
forall a. Maybe a
Nothing
Dummy{} -> Maybe (Elims -> Term, Elims)
forall a. Maybe a
Nothing
isApplyElim :: Elim' a -> Maybe (Arg a)
isApplyElim :: Elim' a -> Maybe (Arg a)
isApplyElim (Apply u :: Arg a
u) = Arg a -> Maybe (Arg a)
forall a. a -> Maybe a
Just Arg a
u
isApplyElim Proj{} = Maybe (Arg a)
forall a. Maybe a
Nothing
isApplyElim (IApply _ _ r :: a
r) = Arg a -> Maybe (Arg a)
forall a. a -> Maybe a
Just (a -> Arg a
forall a. a -> Arg a
defaultArg a
r)
isApplyElim' :: Empty -> Elim' a -> Arg a
isApplyElim' :: Empty -> Elim' a -> Arg a
isApplyElim' e :: Empty
e = Arg a -> Maybe (Arg a) -> Arg a
forall a. a -> Maybe a -> a
fromMaybe (Empty -> Arg a
forall a. Empty -> a
absurd Empty
e) (Maybe (Arg a) -> Arg a)
-> (Elim' a -> Maybe (Arg a)) -> Elim' a -> Arg a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Elim' a -> Maybe (Arg a)
forall a. Elim' a -> Maybe (Arg a)
isApplyElim
allApplyElims :: [Elim' a] -> Maybe [Arg a]
allApplyElims :: [Elim' a] -> Maybe [Arg a]
allApplyElims = (Elim' a -> Maybe (Arg a)) -> [Elim' a] -> Maybe [Arg a]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM Elim' a -> Maybe (Arg a)
forall a. Elim' a -> Maybe (Arg a)
isApplyElim
splitApplyElims :: [Elim' a] -> ([Arg a], [Elim' a])
splitApplyElims :: [Elim' a] -> ([Arg a], [Elim' a])
splitApplyElims (Apply u :: Arg a
u : es :: [Elim' a]
es) = ([Arg a] -> [Arg a])
-> ([Arg a], [Elim' a]) -> ([Arg a], [Elim' a])
forall a c b. (a -> c) -> (a, b) -> (c, b)
mapFst (Arg a
u Arg a -> [Arg a] -> [Arg a]
forall a. a -> [a] -> [a]
:) (([Arg a], [Elim' a]) -> ([Arg a], [Elim' a]))
-> ([Arg a], [Elim' a]) -> ([Arg a], [Elim' a])
forall a b. (a -> b) -> a -> b
$ [Elim' a] -> ([Arg a], [Elim' a])
forall a. [Elim' a] -> ([Arg a], [Elim' a])
splitApplyElims [Elim' a]
es
splitApplyElims es :: [Elim' a]
es = ([], [Elim' a]
es)
class IsProjElim e where
isProjElim :: e -> Maybe (ProjOrigin, QName)
instance IsProjElim (Elim' a) where
isProjElim :: Elim' a -> Maybe (ProjOrigin, QName)
isProjElim (Proj o :: ProjOrigin
o d :: QName
d) = (ProjOrigin, QName) -> Maybe (ProjOrigin, QName)
forall a. a -> Maybe a
Just (ProjOrigin
o, QName
d)
isProjElim Apply{} = Maybe (ProjOrigin, QName)
forall a. Maybe a
Nothing
isProjElim IApply{} = Maybe (ProjOrigin, QName)
forall a. Maybe a
Nothing
argsFromElims :: Elims -> Args
argsFromElims :: Elims -> [Arg Term]
argsFromElims = (Elim -> Maybe (Arg Term)) -> Elims -> [Arg Term]
forall a b. (a -> Maybe b) -> [a] -> [b]
mapMaybe Elim -> Maybe (Arg Term)
forall a. Elim' a -> Maybe (Arg a)
isApplyElim
allProjElims :: Elims -> Maybe [(ProjOrigin, QName)]
allProjElims :: Elims -> Maybe [(ProjOrigin, QName)]
allProjElims = (Elim -> Maybe (ProjOrigin, QName))
-> Elims -> Maybe [(ProjOrigin, QName)]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM Elim -> Maybe (ProjOrigin, QName)
forall e. IsProjElim e => e -> Maybe (ProjOrigin, QName)
isProjElim
instance Null (Tele a) where
empty :: Tele a
empty = Tele a
forall a. Tele a
EmptyTel
null :: Tele a -> Bool
null EmptyTel = Bool
True
null ExtendTel{} = Bool
False
instance Null Clause where
empty :: Clause
empty = Range
-> Range
-> Telescope
-> NAPs
-> Maybe Term
-> Maybe (Arg Type)
-> Bool
-> Maybe Bool
-> Maybe Bool
-> ExpandedEllipsis
-> Clause
Clause Range
forall a. Null a => a
empty Range
forall a. Null a => a
empty Telescope
forall a. Null a => a
empty NAPs
forall a. Null a => a
empty Maybe Term
forall a. Null a => a
empty Maybe (Arg Type)
forall a. Null a => a
empty Bool
False Maybe Bool
forall a. Maybe a
Nothing Maybe Bool
forall a. Maybe a
Nothing ExpandedEllipsis
forall a. Null a => a
empty
null :: Clause -> Bool
null (Clause _ _ tel :: Telescope
tel pats :: NAPs
pats body :: Maybe Term
body _ _ _ _ _)
= Telescope -> Bool
forall a. Null a => a -> Bool
null Telescope
tel
Bool -> Bool -> Bool
&& NAPs -> Bool
forall a. Null a => a -> Bool
null NAPs
pats
Bool -> Bool -> Bool
&& Maybe Term -> Bool
forall a. Null a => a -> Bool
null Maybe Term
body
instance Show a => Show (Abs a) where
showsPrec :: Int -> Abs a -> ShowS
showsPrec p :: Int
p (Abs x :: String
x a :: a
a) = Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> 0) (ShowS -> ShowS) -> ShowS -> ShowS
forall a b. (a -> b) -> a -> b
$
String -> ShowS
showString "Abs " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> ShowS
forall a. Show a => a -> ShowS
shows String
x ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> ShowS
showString " " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> a -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 10 a
a
showsPrec p :: Int
p (NoAbs x :: String
x a :: a
a) = Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> 0) (ShowS -> ShowS) -> ShowS -> ShowS
forall a b. (a -> b) -> a -> b
$
String -> ShowS
showString "NoAbs " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> ShowS
forall a. Show a => a -> ShowS
shows String
x ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> ShowS
showString " " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> a -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 10 a
a
instance Sized (Tele a) where
size :: Tele a -> Int
size EmptyTel = 0
size (ExtendTel _ tel :: Abs (Tele a)
tel) = 1 Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Abs (Tele a) -> Int
forall a. Sized a => a -> Int
size Abs (Tele a)
tel
instance Sized a => Sized (Abs a) where
size :: Abs a -> Int
size = a -> Int
forall a. Sized a => a -> Int
size (a -> Int) -> (Abs a -> a) -> Abs a -> Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Abs a -> a
forall a. Abs a -> a
unAbs
class TermSize a where
termSize :: a -> Int
termSize = Sum Int -> Int
forall a. Sum a -> a
getSum (Sum Int -> Int) -> (a -> Sum Int) -> a -> Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize
tsize :: a -> Sum Int
instance {-# OVERLAPPABLE #-} (Foldable t, TermSize a) => TermSize (t a) where
tsize :: t a -> Sum Int
tsize = (a -> Sum Int) -> t a -> Sum Int
forall (t :: * -> *) m a.
(Foldable t, Monoid m) =>
(a -> m) -> t a -> m
foldMap a -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize
instance TermSize Term where
tsize :: Term -> Sum Int
tsize v :: Term
v = case Term
v of
Var _ vs :: Elims
vs -> 1 Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Elims -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Elims
vs
Def _ vs :: Elims
vs -> 1 Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Elims -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Elims
vs
Con _ _ vs :: Elims
vs -> 1 Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Elims -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Elims
vs
MetaV _ vs :: Elims
vs -> 1 Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Elims -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Elims
vs
Level l :: Level
l -> Level -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Level
l
Lam _ f :: Abs Term
f -> 1 Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Abs Term -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Abs Term
f
Lit _ -> 1
Pi a :: Dom Type
a b :: Abs Type
b -> 1 Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Dom Type -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Dom Type
a Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Abs Type -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Abs Type
b
Sort s :: Sort
s -> Sort -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Sort
s
DontCare mv :: Term
mv -> Term -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Term
mv
Dummy{} -> 1
instance TermSize Sort where
tsize :: Sort -> Sum Int
tsize s :: Sort
s = case Sort
s of
Type l :: Level
l -> 1 Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Level -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Level
l
Prop l :: Level
l -> 1 Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Level -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Level
l
Inf -> 1
SizeUniv -> 1
PiSort a :: Dom Type
a s :: Abs Sort
s -> 1 Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Dom Type -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Dom Type
a Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Abs Sort -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Abs Sort
s
FunSort s1 :: Sort
s1 s2 :: Sort
s2 -> 1 Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Sort -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Sort
s1 Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Sort -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Sort
s2
UnivSort s :: Sort
s -> 1 Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Sort -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Sort
s
MetaS _ es :: Elims
es -> 1 Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Elims -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Elims
es
DefS _ es :: Elims
es -> 1 Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Elims -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Elims
es
DummyS{} -> 1
instance TermSize Level where
tsize :: Level -> Sum Int
tsize (Max _ as :: [PlusLevel' Term]
as) = 1 Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ [PlusLevel' Term] -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize [PlusLevel' Term]
as
instance TermSize PlusLevel where
tsize :: PlusLevel' Term -> Sum Int
tsize (Plus _ a :: LevelAtom
a) = LevelAtom -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize LevelAtom
a
instance TermSize LevelAtom where
tsize :: LevelAtom -> Sum Int
tsize (MetaLevel _ vs :: Elims
vs) = 1 Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Elims -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Elims
vs
tsize (BlockedLevel _ v :: Term
v) = Term -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Term
v
tsize (NeutralLevel _ v :: Term
v) = Term -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Term
v
tsize (UnreducedLevel v :: Term
v) = Term -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Term
v
instance TermSize a => TermSize (Substitution' a) where
tsize :: Substitution' a -> Sum Int
tsize IdS = 1
tsize (EmptyS _) = 1
tsize (Wk _ rho :: Substitution' a
rho) = 1 Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Substitution' a -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Substitution' a
rho
tsize (t :: a
t :# rho :: Substitution' a
rho) = 1 Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ a -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize a
t Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Substitution' a -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Substitution' a
rho
tsize (Strengthen _ rho :: Substitution' a
rho) = 1 Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Substitution' a -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Substitution' a
rho
tsize (Lift _ rho :: Substitution' a
rho) = 1 Sum Int -> Sum Int -> Sum Int
forall a. Num a => a -> a -> a
+ Substitution' a -> Sum Int
forall a. TermSize a => a -> Sum Int
tsize Substitution' a
rho
instance KillRange ConHead where
killRange :: ConHead -> ConHead
killRange (ConHead c :: QName
c i :: Induction
i fs :: [Arg QName]
fs) = (QName -> Induction -> [Arg QName] -> ConHead)
-> QName -> Induction -> [Arg QName] -> ConHead
forall a b c d.
(KillRange a, KillRange b, KillRange c) =>
(a -> b -> c -> d) -> a -> b -> c -> d
killRange3 QName -> Induction -> [Arg QName] -> ConHead
ConHead QName
c Induction
i [Arg QName]
fs
instance KillRange Term where
killRange :: Term -> Term
killRange v :: Term
v = case Term
v of
Var i :: Int
i vs :: Elims
vs -> (Elims -> Term) -> Elims -> Term
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 (Int -> Elims -> Term
Var Int
i) Elims
vs
Def c :: QName
c vs :: Elims
vs -> (QName -> Elims -> Term) -> QName -> Elims -> Term
forall a b c.
(KillRange a, KillRange b) =>
(a -> b -> c) -> a -> b -> c
killRange2 QName -> Elims -> Term
Def QName
c Elims
vs
Con c :: ConHead
c ci :: ConInfo
ci vs :: Elims
vs -> (ConHead -> ConInfo -> Elims -> Term)
-> ConHead -> ConInfo -> Elims -> Term
forall a b c d.
(KillRange a, KillRange b, KillRange c) =>
(a -> b -> c -> d) -> a -> b -> c -> d
killRange3 ConHead -> ConInfo -> Elims -> Term
Con ConHead
c ConInfo
ci Elims
vs
MetaV m :: MetaId
m vs :: Elims
vs -> (Elims -> Term) -> Elims -> Term
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 (MetaId -> Elims -> Term
MetaV MetaId
m) Elims
vs
Lam i :: ArgInfo
i f :: Abs Term
f -> (ArgInfo -> Abs Term -> Term) -> ArgInfo -> Abs Term -> Term
forall a b c.
(KillRange a, KillRange b) =>
(a -> b -> c) -> a -> b -> c
killRange2 ArgInfo -> Abs Term -> Term
Lam ArgInfo
i Abs Term
f
Lit l :: Literal
l -> (Literal -> Term) -> Literal -> Term
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 Literal -> Term
Lit Literal
l
Level l :: Level
l -> (Level -> Term) -> Level -> Term
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 Level -> Term
Level Level
l
Pi a :: Dom Type
a b :: Abs Type
b -> (Dom Type -> Abs Type -> Term) -> Dom Type -> Abs Type -> Term
forall a b c.
(KillRange a, KillRange b) =>
(a -> b -> c) -> a -> b -> c
killRange2 Dom Type -> Abs Type -> Term
Pi Dom Type
a Abs Type
b
Sort s :: Sort
s -> (Sort -> Term) -> Sort -> Term
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 Sort -> Term
Sort Sort
s
DontCare mv :: Term
mv -> (Term -> Term) -> Term -> Term
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 Term -> Term
DontCare Term
mv
Dummy{} -> Term
v
instance KillRange Level where
killRange :: Level -> Level
killRange (Max n :: Integer
n as :: [PlusLevel' Term]
as) = ([PlusLevel' Term] -> Level) -> [PlusLevel' Term] -> Level
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 (Integer -> [PlusLevel' Term] -> Level
forall t. Integer -> [PlusLevel' t] -> Level' t
Max Integer
n) [PlusLevel' Term]
as
instance KillRange PlusLevel where
killRange :: PlusLevel' Term -> PlusLevel' Term
killRange (Plus n :: Integer
n l :: LevelAtom
l) = (LevelAtom -> PlusLevel' Term) -> LevelAtom -> PlusLevel' Term
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 (Integer -> LevelAtom -> PlusLevel' Term
forall t. Integer -> LevelAtom' t -> PlusLevel' t
Plus Integer
n) LevelAtom
l
instance KillRange LevelAtom where
killRange :: KillRangeT LevelAtom
killRange (MetaLevel n :: MetaId
n as :: Elims
as) = (Elims -> LevelAtom) -> Elims -> LevelAtom
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 (MetaId -> Elims -> LevelAtom
forall t. MetaId -> [Elim' t] -> LevelAtom' t
MetaLevel MetaId
n) Elims
as
killRange (BlockedLevel m :: MetaId
m v :: Term
v) = (Term -> LevelAtom) -> Term -> LevelAtom
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 (MetaId -> Term -> LevelAtom
forall t. MetaId -> t -> LevelAtom' t
BlockedLevel MetaId
m) Term
v
killRange (NeutralLevel r :: NotBlocked
r v :: Term
v) = (Term -> LevelAtom) -> Term -> LevelAtom
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 (NotBlocked -> Term -> LevelAtom
forall t. NotBlocked -> t -> LevelAtom' t
NeutralLevel NotBlocked
r) Term
v
killRange (UnreducedLevel v :: Term
v) = (Term -> LevelAtom) -> Term -> LevelAtom
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 Term -> LevelAtom
forall t. t -> LevelAtom' t
UnreducedLevel Term
v
instance (KillRange a) => KillRange (Type' a) where
killRange :: KillRangeT (Type' a)
killRange (El s :: Sort
s v :: a
v) = (Sort -> a -> Type' a) -> Sort -> a -> Type' a
forall a b c.
(KillRange a, KillRange b) =>
(a -> b -> c) -> a -> b -> c
killRange2 Sort -> a -> Type' a
forall t a. Sort' t -> a -> Type'' t a
El Sort
s a
v
instance KillRange Sort where
killRange :: Sort -> Sort
killRange s :: Sort
s = case Sort
s of
Inf -> Sort
forall t. Sort' t
Inf
SizeUniv -> Sort
forall t. Sort' t
SizeUniv
Type a :: Level
a -> (Level -> Sort) -> Level -> Sort
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 Level -> Sort
forall t. Level' t -> Sort' t
Type Level
a
Prop a :: Level
a -> (Level -> Sort) -> Level -> Sort
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 Level -> Sort
forall t. Level' t -> Sort' t
Prop Level
a
PiSort a :: Dom Type
a s :: Abs Sort
s -> (Dom Type -> Abs Sort -> Sort) -> Dom Type -> Abs Sort -> Sort
forall a b c.
(KillRange a, KillRange b) =>
(a -> b -> c) -> a -> b -> c
killRange2 Dom Type -> Abs Sort -> Sort
forall t. Dom' t (Type'' t t) -> Abs (Sort' t) -> Sort' t
PiSort Dom Type
a Abs Sort
s
FunSort s1 :: Sort
s1 s2 :: Sort
s2 -> (Sort -> Sort -> Sort) -> Sort -> Sort -> Sort
forall a b c.
(KillRange a, KillRange b) =>
(a -> b -> c) -> a -> b -> c
killRange2 Sort -> Sort -> Sort
forall t. Sort' t -> Sort' t -> Sort' t
FunSort Sort
s1 Sort
s2
UnivSort s :: Sort
s -> (Sort -> Sort) -> Sort -> Sort
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 Sort -> Sort
forall t. Sort' t -> Sort' t
UnivSort Sort
s
MetaS x :: MetaId
x es :: Elims
es -> (Elims -> Sort) -> Elims -> Sort
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 (MetaId -> Elims -> Sort
forall t. MetaId -> [Elim' t] -> Sort' t
MetaS MetaId
x) Elims
es
DefS d :: QName
d es :: Elims
es -> (QName -> Elims -> Sort) -> QName -> Elims -> Sort
forall a b c.
(KillRange a, KillRange b) =>
(a -> b -> c) -> a -> b -> c
killRange2 QName -> Elims -> Sort
forall t. QName -> [Elim' t] -> Sort' t
DefS QName
d Elims
es
DummyS{} -> Sort
s
instance KillRange Substitution where
killRange :: KillRangeT Substitution
killRange IdS = Substitution
forall a. Substitution' a
IdS
killRange (EmptyS err :: Empty
err) = Empty -> Substitution
forall a. Empty -> Substitution' a
EmptyS Empty
err
killRange (Wk n :: Int
n rho :: Substitution
rho) = KillRangeT Substitution -> KillRangeT Substitution
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 (Int -> KillRangeT Substitution
forall a. Int -> Substitution' a -> Substitution' a
Wk Int
n) Substitution
rho
killRange (t :: Term
t :# rho :: Substitution
rho) = (Term -> KillRangeT Substitution)
-> Term -> KillRangeT Substitution
forall a b c.
(KillRange a, KillRange b) =>
(a -> b -> c) -> a -> b -> c
killRange2 Term -> KillRangeT Substitution
forall a. a -> Substitution' a -> Substitution' a
(:#) Term
t Substitution
rho
killRange (Strengthen err :: Empty
err rho :: Substitution
rho) = KillRangeT Substitution -> KillRangeT Substitution
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 (Empty -> KillRangeT Substitution
forall a. Empty -> Substitution' a -> Substitution' a
Strengthen Empty
err) Substitution
rho
killRange (Lift n :: Int
n rho :: Substitution
rho) = KillRangeT Substitution -> KillRangeT Substitution
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 (Int -> KillRangeT Substitution
forall a. Int -> Substitution' a -> Substitution' a
Lift Int
n) Substitution
rho
instance KillRange PatOrigin where
killRange :: PatOrigin -> PatOrigin
killRange = PatOrigin -> PatOrigin
forall a. a -> a
id
instance KillRange PatternInfo where
killRange :: PatternInfo -> PatternInfo
killRange (PatternInfo o :: PatOrigin
o xs :: [Name]
xs) = (PatOrigin -> [Name] -> PatternInfo)
-> PatOrigin -> [Name] -> PatternInfo
forall a b c.
(KillRange a, KillRange b) =>
(a -> b -> c) -> a -> b -> c
killRange2 PatOrigin -> [Name] -> PatternInfo
PatternInfo PatOrigin
o [Name]
xs
instance KillRange ConPatternInfo where
killRange :: ConPatternInfo -> ConPatternInfo
killRange (ConPatternInfo i :: PatternInfo
i mr :: Bool
mr b :: Bool
b mt :: Maybe (Arg Type)
mt lz :: Bool
lz) = (Maybe (Arg Type) -> Bool -> ConPatternInfo)
-> Maybe (Arg Type) -> Bool -> ConPatternInfo
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 (PatternInfo
-> Bool -> Bool -> Maybe (Arg Type) -> Bool -> ConPatternInfo
ConPatternInfo PatternInfo
i Bool
mr Bool
b) Maybe (Arg Type)
mt Bool
lz
instance KillRange DBPatVar where
killRange :: DBPatVar -> DBPatVar
killRange (DBPatVar x :: String
x i :: Int
i) = (String -> Int -> DBPatVar) -> String -> Int -> DBPatVar
forall a b c.
(KillRange a, KillRange b) =>
(a -> b -> c) -> a -> b -> c
killRange2 String -> Int -> DBPatVar
DBPatVar String
x Int
i
instance KillRange a => KillRange (Pattern' a) where
killRange :: KillRangeT (Pattern' a)
killRange p :: Pattern' a
p =
case Pattern' a
p of
VarP o :: PatternInfo
o x :: a
x -> (PatternInfo -> a -> Pattern' a) -> PatternInfo -> a -> Pattern' a
forall a b c.
(KillRange a, KillRange b) =>
(a -> b -> c) -> a -> b -> c
killRange2 PatternInfo -> a -> Pattern' a
forall x. PatternInfo -> x -> Pattern' x
VarP PatternInfo
o a
x
DotP o :: PatternInfo
o v :: Term
v -> (PatternInfo -> Term -> Pattern' a)
-> PatternInfo -> Term -> Pattern' a
forall a b c.
(KillRange a, KillRange b) =>
(a -> b -> c) -> a -> b -> c
killRange2 PatternInfo -> Term -> Pattern' a
forall x. PatternInfo -> Term -> Pattern' x
DotP PatternInfo
o Term
v
ConP con :: ConHead
con info :: ConPatternInfo
info ps :: [NamedArg (Pattern' a)]
ps -> (ConHead
-> ConPatternInfo -> [NamedArg (Pattern' a)] -> Pattern' a)
-> ConHead
-> ConPatternInfo
-> [NamedArg (Pattern' a)]
-> Pattern' a
forall a b c d.
(KillRange a, KillRange b, KillRange c) =>
(a -> b -> c -> d) -> a -> b -> c -> d
killRange3 ConHead -> ConPatternInfo -> [NamedArg (Pattern' a)] -> Pattern' a
forall x.
ConHead -> ConPatternInfo -> [NamedArg (Pattern' x)] -> Pattern' x
ConP ConHead
con ConPatternInfo
info [NamedArg (Pattern' a)]
ps
LitP o :: PatternInfo
o l :: Literal
l -> (PatternInfo -> Literal -> Pattern' a)
-> PatternInfo -> Literal -> Pattern' a
forall a b c.
(KillRange a, KillRange b) =>
(a -> b -> c) -> a -> b -> c
killRange2 PatternInfo -> Literal -> Pattern' a
forall x. PatternInfo -> Literal -> Pattern' x
LitP PatternInfo
o Literal
l
ProjP o :: ProjOrigin
o q :: QName
q -> (QName -> Pattern' a) -> QName -> Pattern' a
forall a b. KillRange a => (a -> b) -> a -> b
killRange1 (ProjOrigin -> QName -> Pattern' a
forall x. ProjOrigin -> QName -> Pattern' x
ProjP ProjOrigin
o) QName
q
IApplyP o :: PatternInfo
o u :: Term
u t :: Term
t x :: a
x -> (Term -> Term -> a -> Pattern' a)
-> Term -> Term -> a -> Pattern' a
forall a b c d.
(KillRange a, KillRange b, KillRange c) =>
(a -> b -> c -> d) -> a -> b -> c -> d
killRange3 (PatternInfo -> Term -> Term -> a -> Pattern' a
forall x. PatternInfo -> Term -> Term -> x -> Pattern' x
IApplyP PatternInfo
o) Term
u Term
t a
x
DefP o :: PatternInfo
o q :: QName
q ps :: [NamedArg (Pattern' a)]
ps -> (QName -> [NamedArg (Pattern' a)] -> Pattern' a)
-> QName -> [NamedArg (Pattern' a)] -> Pattern' a
forall a b c.
(KillRange a, KillRange b) =>
(a -> b -> c) -> a -> b -> c
killRange2 (PatternInfo -> QName -> [NamedArg (Pattern' a)] -> Pattern' a
forall x.
PatternInfo -> QName -> [NamedArg (Pattern' x)] -> Pattern' x
DefP PatternInfo
o) QName
q [NamedArg (Pattern' a)]
ps
instance KillRange Clause where
killRange :: Clause -> Clause
killRange (Clause rl :: Range
rl rf :: Range
rf tel :: Telescope
tel ps :: NAPs
ps body :: Maybe Term
body t :: Maybe (Arg Type)
t catchall :: Bool
catchall recursive :: Maybe Bool
recursive unreachable :: Maybe Bool
unreachable ell :: ExpandedEllipsis
ell) =
(Range
-> Range
-> Telescope
-> NAPs
-> Maybe Term
-> Maybe (Arg Type)
-> Bool
-> Maybe Bool
-> Maybe Bool
-> ExpandedEllipsis
-> Clause)
-> Range
-> Range
-> Telescope
-> NAPs
-> Maybe Term
-> Maybe (Arg Type)
-> Bool
-> Maybe Bool
-> Maybe Bool
-> ExpandedEllipsis
-> Clause
forall a b c d e f g h i j k.
(KillRange a, KillRange b, KillRange c, KillRange d, KillRange e,
KillRange f, KillRange g, KillRange h, KillRange i, KillRange j) =>
(a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k)
-> a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k
killRange10 Range
-> Range
-> Telescope
-> NAPs
-> Maybe Term
-> Maybe (Arg Type)
-> Bool
-> Maybe Bool
-> Maybe Bool
-> ExpandedEllipsis
-> Clause
Clause Range
rl Range
rf Telescope
tel NAPs
ps Maybe Term
body Maybe (Arg Type)
t Bool
catchall Maybe Bool
recursive Maybe Bool
unreachable ExpandedEllipsis
ell
instance KillRange a => KillRange (Tele a) where
killRange :: KillRangeT (Tele a)
killRange = (a -> a) -> KillRangeT (Tele a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap a -> a
forall a. KillRange a => KillRangeT a
killRange
instance KillRange a => KillRange (Blocked a) where
killRange :: KillRangeT (Blocked a)
killRange = (a -> a) -> KillRangeT (Blocked a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap a -> a
forall a. KillRange a => KillRangeT a
killRange
instance KillRange a => KillRange (Abs a) where
killRange :: KillRangeT (Abs a)
killRange = (a -> a) -> KillRangeT (Abs a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap a -> a
forall a. KillRange a => KillRangeT a
killRange
instance KillRange a => KillRange (Elim' a) where
killRange :: KillRangeT (Elim' a)
killRange = (a -> a) -> KillRangeT (Elim' a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap a -> a
forall a. KillRange a => KillRangeT a
killRange
instance Pretty a => Pretty (Substitution' a) where
prettyPrec :: Int -> Substitution' a -> Doc
prettyPrec = Int -> Substitution' a -> Doc
forall t a. (Ord t, Num t, Pretty a) => t -> Substitution' a -> Doc
pr
where
pr :: t -> Substitution' a -> Doc
pr p :: t
p rho :: Substitution' a
rho = case Substitution' a
rho of
IdS -> "idS"
EmptyS err :: Empty
err -> "emptyS"
t :: a
t :# rho :: Substitution' a
rho -> Bool -> Doc -> Doc
mparens (t
p t -> t -> Bool
forall a. Ord a => a -> a -> Bool
> 2) (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$ [Doc] -> Doc
sep [ t -> Substitution' a -> Doc
pr 2 Substitution' a
rho Doc -> Doc -> Doc
forall a. Semigroup a => a -> a -> a
<> ",", Int -> a -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec 3 a
t ]
Strengthen _ rho :: Substitution' a
rho -> Bool -> Doc -> Doc
mparens (t
p t -> t -> Bool
forall a. Ord a => a -> a -> Bool
> 9) (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$ "strS" Doc -> Doc -> Doc
<+> t -> Substitution' a -> Doc
pr 10 Substitution' a
rho
Wk n :: Int
n rho :: Substitution' a
rho -> Bool -> Doc -> Doc
mparens (t
p t -> t -> Bool
forall a. Ord a => a -> a -> Bool
> 9) (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$ String -> Doc
text ("wkS " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Int -> String
forall a. Show a => a -> String
show Int
n) Doc -> Doc -> Doc
<+> t -> Substitution' a -> Doc
pr 10 Substitution' a
rho
Lift n :: Int
n rho :: Substitution' a
rho -> Bool -> Doc -> Doc
mparens (t
p t -> t -> Bool
forall a. Ord a => a -> a -> Bool
> 9) (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$ String -> Doc
text ("liftS " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Int -> String
forall a. Show a => a -> String
show Int
n) Doc -> Doc -> Doc
<+> t -> Substitution' a -> Doc
pr 10 Substitution' a
rho
instance Pretty Term where
prettyPrec :: Int -> Term -> Doc
prettyPrec p :: Int
p v :: Term
v =
case Term
v of
Var x :: Int
x els :: Elims
els -> String -> Doc
text ("@" String -> ShowS
forall a. [a] -> [a] -> [a]
++ Int -> String
forall a. Show a => a -> String
show Int
x) Doc -> Elims -> Doc
forall a. Pretty a => Doc -> [a] -> Doc
`pApp` Elims
els
Lam ai :: ArgInfo
ai b :: Abs Term
b ->
Bool -> Doc -> Doc
mparens (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> 0) (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$
[Doc] -> Doc
sep [ "λ" Doc -> Doc -> Doc
<+> ArgInfo -> (Doc -> Doc) -> Doc -> Doc
forall a. LensHiding a => a -> (Doc -> Doc) -> Doc -> Doc
prettyHiding ArgInfo
ai Doc -> Doc
forall a. a -> a
id (String -> Doc
text (String -> Doc) -> (Abs Term -> String) -> Abs Term -> Doc
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Abs Term -> String
forall a. Abs a -> String
absName (Abs Term -> Doc) -> Abs Term -> Doc
forall a b. (a -> b) -> a -> b
$ Abs Term
b) Doc -> Doc -> Doc
<+> "->"
, Int -> Doc -> Doc
nest 2 (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$ Term -> Doc
forall a. Pretty a => a -> Doc
pretty (Abs Term -> Term
forall a. Abs a -> a
unAbs Abs Term
b) ]
Lit l :: Literal
l -> Literal -> Doc
forall a. Pretty a => a -> Doc
pretty Literal
l
Def q :: QName
q els :: Elims
els -> QName -> Doc
forall a. Pretty a => a -> Doc
pretty QName
q Doc -> Elims -> Doc
forall a. Pretty a => Doc -> [a] -> Doc
`pApp` Elims
els
Con c :: ConHead
c ci :: ConInfo
ci vs :: Elims
vs -> QName -> Doc
forall a. Pretty a => a -> Doc
pretty (ConHead -> QName
conName ConHead
c) Doc -> Elims -> Doc
forall a. Pretty a => Doc -> [a] -> Doc
`pApp` Elims
vs
Pi a :: Dom Type
a (NoAbs _ b :: Type
b) -> Bool -> Doc -> Doc
mparens (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> 0) (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$
[Doc] -> Doc
sep [ Int -> Type -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec 1 (Dom Type -> Type
forall t e. Dom' t e -> e
unDom Dom Type
a) Doc -> Doc -> Doc
<+> "->"
, Int -> Doc -> Doc
nest 2 (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$ Type -> Doc
forall a. Pretty a => a -> Doc
pretty Type
b ]
Pi a :: Dom Type
a b :: Abs Type
b -> Bool -> Doc -> Doc
mparens (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> 0) (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$
[Doc] -> Doc
sep [ ArgInfo -> Doc -> Doc
forall a. LensHiding a => a -> Doc -> Doc
pDom (Dom Type -> ArgInfo
forall t e. Dom' t e -> ArgInfo
domInfo Dom Type
a) (String -> Doc
text (Abs Type -> String
forall a. Abs a -> String
absName Abs Type
b) Doc -> Doc -> Doc
<+> ":" Doc -> Doc -> Doc
<+> Type -> Doc
forall a. Pretty a => a -> Doc
pretty (Dom Type -> Type
forall t e. Dom' t e -> e
unDom Dom Type
a)) Doc -> Doc -> Doc
<+> "->"
, Int -> Doc -> Doc
nest 2 (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$ Type -> Doc
forall a. Pretty a => a -> Doc
pretty (Abs Type -> Type
forall a. Abs a -> a
unAbs Abs Type
b) ]
Sort s :: Sort
s -> Int -> Sort -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec Int
p Sort
s
Level l :: Level
l -> Int -> Level -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec Int
p Level
l
MetaV x :: MetaId
x els :: Elims
els -> MetaId -> Doc
forall a. Pretty a => a -> Doc
pretty MetaId
x Doc -> Elims -> Doc
forall a. Pretty a => Doc -> [a] -> Doc
`pApp` Elims
els
DontCare v :: Term
v -> Int -> Term -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec Int
p Term
v
Dummy s :: String
s es :: Elims
es -> Doc -> Doc
parens (String -> Doc
text String
s) Doc -> Elims -> Doc
forall a. Pretty a => Doc -> [a] -> Doc
`pApp` Elims
es
where
pApp :: Doc -> [a] -> Doc
pApp d :: Doc
d els :: [a]
els = Bool -> Doc -> Doc
mparens (Bool -> Bool
not ([a] -> Bool
forall a. Null a => a -> Bool
null [a]
els) Bool -> Bool -> Bool
&& Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> 9) (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$
[Doc] -> Doc
sep [Doc
d, Int -> Doc -> Doc
nest 2 (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$ [Doc] -> Doc
fsep ((a -> Doc) -> [a] -> [Doc]
forall a b. (a -> b) -> [a] -> [b]
map (Int -> a -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec 10) [a]
els)]
instance (Pretty t, Pretty e) => Pretty (Dom' t e) where
pretty :: Dom' t e -> Doc
pretty dom :: Dom' t e
dom = Doc
pTac Doc -> Doc -> Doc
<+> Dom' t e -> Doc -> Doc
forall a. LensHiding a => a -> Doc -> Doc
pDom Dom' t e
dom (e -> Doc
forall a. Pretty a => a -> Doc
pretty (e -> Doc) -> e -> Doc
forall a b. (a -> b) -> a -> b
$ Dom' t e -> e
forall t e. Dom' t e -> e
unDom Dom' t e
dom)
where
pTac :: Doc
pTac | Just t :: t
t <- Dom' t e -> Maybe t
forall t e. Dom' t e -> Maybe t
domTactic Dom' t e
dom = "@" Doc -> Doc -> Doc
forall a. Semigroup a => a -> a -> a
<> Doc -> Doc
parens ("tactic" Doc -> Doc -> Doc
<+> t -> Doc
forall a. Pretty a => a -> Doc
pretty t
t)
| Bool
otherwise = Doc
forall a. Null a => a
empty
pDom :: LensHiding a => a -> Doc -> Doc
pDom :: a -> Doc -> Doc
pDom i :: a
i =
case a -> Hiding
forall a. LensHiding a => a -> Hiding
getHiding a
i of
NotHidden -> Doc -> Doc
parens
Hidden -> Doc -> Doc
braces
Instance{} -> Doc -> Doc
braces (Doc -> Doc) -> (Doc -> Doc) -> Doc -> Doc
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Doc -> Doc
braces
instance Pretty Clause where
pretty :: Clause -> Doc
pretty Clause{clauseTel :: Clause -> Telescope
clauseTel = Telescope
tel, namedClausePats :: Clause -> NAPs
namedClausePats = NAPs
ps, clauseBody :: Clause -> Maybe Term
clauseBody = Maybe Term
b, clauseType :: Clause -> Maybe (Arg Type)
clauseType = Maybe (Arg Type)
t} =
[Doc] -> Doc
sep [ Telescope -> Doc
forall a. Pretty a => a -> Doc
pretty Telescope
tel Doc -> Doc -> Doc
<+> "|-"
, Int -> Doc -> Doc
nest 2 (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$ [Doc] -> Doc
sep [ [Doc] -> Doc
fsep ((Arg (Named NamedName DeBruijnPattern) -> Doc) -> NAPs -> [Doc]
forall a b. (a -> b) -> [a] -> [b]
map (Int -> Arg (Named NamedName DeBruijnPattern) -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec 10) NAPs
ps) Doc -> Doc -> Doc
<+> "="
, Int -> Doc -> Doc
nest 2 (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$ Maybe Term -> Maybe (Arg Type) -> Doc
forall a a. (Pretty a, Pretty a) => Maybe a -> Maybe a -> Doc
pBody Maybe Term
b Maybe (Arg Type)
t ] ]
where
pBody :: Maybe a -> Maybe a -> Doc
pBody Nothing _ = "(absurd)"
pBody (Just b :: a
b) Nothing = a -> Doc
forall a. Pretty a => a -> Doc
pretty a
b
pBody (Just b :: a
b) (Just t :: a
t) = [Doc] -> Doc
sep [ a -> Doc
forall a. Pretty a => a -> Doc
pretty a
b Doc -> Doc -> Doc
<+> ":", Int -> Doc -> Doc
nest 2 (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$ a -> Doc
forall a. Pretty a => a -> Doc
pretty a
t ]
instance Pretty a => Pretty (Tele (Dom a)) where
pretty :: Tele (Dom a) -> Doc
pretty tel :: Tele (Dom a)
tel = [Doc] -> Doc
fsep [ Dom a -> Doc -> Doc
forall a. LensHiding a => a -> Doc -> Doc
pDom Dom a
a (String -> Doc
text String
x Doc -> Doc -> Doc
<+> ":" Doc -> Doc -> Doc
<+> a -> Doc
forall a. Pretty a => a -> Doc
pretty (Dom a -> a
forall t e. Dom' t e -> e
unDom Dom a
a)) | (x :: String
x, a :: Dom a
a) <- Tele (Dom a) -> [(String, Dom a)]
forall b. Tele b -> [(String, b)]
telToList Tele (Dom a)
tel ]
where
telToList :: Tele b -> [(String, b)]
telToList EmptyTel = []
telToList (ExtendTel a :: b
a tel :: Abs (Tele b)
tel) = (Abs (Tele b) -> String
forall a. Abs a -> String
absName Abs (Tele b)
tel, b
a) (String, b) -> [(String, b)] -> [(String, b)]
forall a. a -> [a] -> [a]
: Tele b -> [(String, b)]
telToList (Abs (Tele b) -> Tele b
forall a. Abs a -> a
unAbs Abs (Tele b)
tel)
prettyPrecLevelSucs :: Int -> Integer -> (Int -> Doc) -> Doc
prettyPrecLevelSucs :: Int -> Integer -> (Int -> Doc) -> Doc
prettyPrecLevelSucs p :: Int
p 0 d :: Int -> Doc
d = Int -> Doc
d Int
p
prettyPrecLevelSucs p :: Int
p n :: Integer
n d :: Int -> Doc
d = Bool -> Doc -> Doc
mparens (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> 9) (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$ "lsuc" Doc -> Doc -> Doc
<+> Int -> Integer -> (Int -> Doc) -> Doc
prettyPrecLevelSucs 10 (Integer
n Integer -> Integer -> Integer
forall a. Num a => a -> a -> a
- 1) Int -> Doc
d
instance Pretty Level where
prettyPrec :: Int -> Level -> Doc
prettyPrec p :: Int
p (Max n :: Integer
n as :: [PlusLevel' Term]
as) =
case [PlusLevel' Term]
as of
[] -> Doc
prettyN
[a :: PlusLevel' Term
a] | Integer
n Integer -> Integer -> Bool
forall a. Eq a => a -> a -> Bool
== 0 -> Int -> PlusLevel' Term -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec Int
p PlusLevel' Term
a
_ -> Bool -> Doc -> Doc
mparens (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> 9) (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$ (Doc -> Doc -> Doc) -> [Doc] -> Doc
forall (t :: * -> *) a. Foldable t => (a -> a -> a) -> t a -> a
List.foldr1 (\a :: Doc
a b :: Doc
b -> "lub" Doc -> Doc -> Doc
<+> Doc
a Doc -> Doc -> Doc
<+> Doc
b) ([Doc] -> Doc) -> [Doc] -> Doc
forall a b. (a -> b) -> a -> b
$
[ Doc
prettyN | Integer
n Integer -> Integer -> Bool
forall a. Ord a => a -> a -> Bool
> 0 ] [Doc] -> [Doc] -> [Doc]
forall a. [a] -> [a] -> [a]
++ (PlusLevel' Term -> Doc) -> [PlusLevel' Term] -> [Doc]
forall a b. (a -> b) -> [a] -> [b]
map (Int -> PlusLevel' Term -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec 10) [PlusLevel' Term]
as
where
prettyN :: Doc
prettyN = Int -> Integer -> (Int -> Doc) -> Doc
prettyPrecLevelSucs Int
p Integer
n (Doc -> Int -> Doc
forall a b. a -> b -> a
const "lzero")
instance Pretty PlusLevel where
prettyPrec :: Int -> PlusLevel' Term -> Doc
prettyPrec p :: Int
p (Plus n :: Integer
n a :: LevelAtom
a) = Int -> Integer -> (Int -> Doc) -> Doc
prettyPrecLevelSucs Int
p Integer
n ((Int -> Doc) -> Doc) -> (Int -> Doc) -> Doc
forall a b. (a -> b) -> a -> b
$ \p :: Int
p -> Int -> LevelAtom -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec Int
p LevelAtom
a
instance Pretty LevelAtom where
prettyPrec :: Int -> LevelAtom -> Doc
prettyPrec p :: Int
p a :: LevelAtom
a =
case LevelAtom
a of
MetaLevel x :: MetaId
x els :: Elims
els -> Int -> Term -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec Int
p (MetaId -> Elims -> Term
MetaV MetaId
x Elims
els)
BlockedLevel _ v :: Term
v -> Int -> Term -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec Int
p Term
v
NeutralLevel _ v :: Term
v -> Int -> Term -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec Int
p Term
v
UnreducedLevel v :: Term
v -> Int -> Term -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec Int
p Term
v
instance Pretty Sort where
prettyPrec :: Int -> Sort -> Doc
prettyPrec p :: Int
p s :: Sort
s =
case Sort
s of
Type (ClosedLevel 0) -> "Set"
Type (ClosedLevel n :: Integer
n) -> String -> Doc
text (String -> Doc) -> String -> Doc
forall a b. (a -> b) -> a -> b
$ "Set" String -> ShowS
forall a. [a] -> [a] -> [a]
++ Integer -> String
forall a. Show a => a -> String
show Integer
n
Type l :: Level
l -> Bool -> Doc -> Doc
mparens (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> 9) (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$ "Set" Doc -> Doc -> Doc
<+> Int -> Level -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec 10 Level
l
Prop (ClosedLevel 0) -> "Prop"
Prop (ClosedLevel n :: Integer
n) -> String -> Doc
text (String -> Doc) -> String -> Doc
forall a b. (a -> b) -> a -> b
$ "Prop" String -> ShowS
forall a. [a] -> [a] -> [a]
++ Integer -> String
forall a. Show a => a -> String
show Integer
n
Prop l :: Level
l -> Bool -> Doc -> Doc
mparens (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> 9) (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$ "Prop" Doc -> Doc -> Doc
<+> Int -> Level -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec 10 Level
l
Inf -> "Setω"
SizeUniv -> "SizeUniv"
PiSort a :: Dom Type
a b :: Abs Sort
b -> Bool -> Doc -> Doc
mparens (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> 9) (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$
"piSort" Doc -> Doc -> Doc
<+> ArgInfo -> Doc -> Doc
forall a. LensHiding a => a -> Doc -> Doc
pDom (Dom Type -> ArgInfo
forall t e. Dom' t e -> ArgInfo
domInfo Dom Type
a) (String -> Doc
text (Abs Sort -> String
forall a. Abs a -> String
absName Abs Sort
b) Doc -> Doc -> Doc
<+> ":" Doc -> Doc -> Doc
<+> Type -> Doc
forall a. Pretty a => a -> Doc
pretty (Dom Type -> Type
forall t e. Dom' t e -> e
unDom Dom Type
a))
Doc -> Doc -> Doc
<+> Doc -> Doc
parens ([Doc] -> Doc
sep [ String -> Doc
text ("λ " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Abs Sort -> String
forall a. Abs a -> String
absName Abs Sort
b String -> ShowS
forall a. [a] -> [a] -> [a]
++ " ->")
, Int -> Doc -> Doc
nest 2 (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$ Sort -> Doc
forall a. Pretty a => a -> Doc
pretty (Abs Sort -> Sort
forall a. Abs a -> a
unAbs Abs Sort
b) ])
FunSort a :: Sort
a b :: Sort
b -> Bool -> Doc -> Doc
mparens (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> 9) (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$
"funSort" Doc -> Doc -> Doc
<+> Int -> Sort -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec 10 Sort
a Doc -> Doc -> Doc
<+> Int -> Sort -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec 10 Sort
b
UnivSort s :: Sort
s -> Bool -> Doc -> Doc
mparens (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> 9) (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$ "univSort" Doc -> Doc -> Doc
<+> Int -> Sort -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec 10 Sort
s
MetaS x :: MetaId
x es :: Elims
es -> Int -> Term -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec Int
p (Term -> Doc) -> Term -> Doc
forall a b. (a -> b) -> a -> b
$ MetaId -> Elims -> Term
MetaV MetaId
x Elims
es
DefS d :: QName
d es :: Elims
es -> Int -> Term -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec Int
p (Term -> Doc) -> Term -> Doc
forall a b. (a -> b) -> a -> b
$ QName -> Elims -> Term
Def QName
d Elims
es
DummyS s :: String
s -> Doc -> Doc
parens (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$ String -> Doc
text String
s
instance Pretty Type where
prettyPrec :: Int -> Type -> Doc
prettyPrec p :: Int
p (El _ a :: Term
a) = Int -> Term -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec Int
p Term
a
instance Pretty tm => Pretty (Elim' tm) where
prettyPrec :: Int -> Elim' tm -> Doc
prettyPrec p :: Int
p (Apply v :: Arg tm
v) = Int -> Arg tm -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec Int
p Arg tm
v
prettyPrec _ (Proj _o :: ProjOrigin
_o x :: QName
x) = String -> Doc
text ("." String -> ShowS
forall a. [a] -> [a] -> [a]
++ QName -> String
forall a. Pretty a => a -> String
prettyShow QName
x)
prettyPrec p :: Int
p (IApply x :: tm
x y :: tm
y r :: tm
r) = Int -> tm -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec Int
p tm
r
instance Pretty DBPatVar where
prettyPrec :: Int -> DBPatVar -> Doc
prettyPrec _ x :: DBPatVar
x = String -> Doc
text (String -> Doc) -> String -> Doc
forall a b. (a -> b) -> a -> b
$ ShowS
patVarNameToString (DBPatVar -> String
dbPatVarName DBPatVar
x) String -> ShowS
forall a. [a] -> [a] -> [a]
++ "@" String -> ShowS
forall a. [a] -> [a] -> [a]
++ Int -> String
forall a. Show a => a -> String
show (DBPatVar -> Int
dbPatVarIndex DBPatVar
x)
instance Pretty a => Pretty (Pattern' a) where
prettyPrec :: Int -> Pattern' a -> Doc
prettyPrec n :: Int
n (VarP _o :: PatternInfo
_o x :: a
x) = Int -> a -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec Int
n a
x
prettyPrec _ (DotP _o :: PatternInfo
_o t :: Term
t) = "." Doc -> Doc -> Doc
forall a. Semigroup a => a -> a -> a
<> Int -> Term -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec 10 Term
t
prettyPrec n :: Int
n (ConP c :: ConHead
c i :: ConPatternInfo
i nps :: [NamedArg (Pattern' a)]
nps)= Bool -> Doc -> Doc
mparens (Int
n Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> 0 Bool -> Bool -> Bool
&& Bool -> Bool
not ([NamedArg (Pattern' a)] -> Bool
forall a. Null a => a -> Bool
null [NamedArg (Pattern' a)]
nps)) (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$
(Doc
lazy Doc -> Doc -> Doc
forall a. Semigroup a => a -> a -> a
<> QName -> Doc
forall a. Pretty a => a -> Doc
pretty (ConHead -> QName
conName ConHead
c)) Doc -> Doc -> Doc
<+> [Doc] -> Doc
fsep ((Arg (Pattern' a) -> Doc) -> [Arg (Pattern' a)] -> [Doc]
forall a b. (a -> b) -> [a] -> [b]
map (Int -> Arg (Pattern' a) -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec 10) [Arg (Pattern' a)]
ps)
where ps :: [Arg (Pattern' a)]
ps = (NamedArg (Pattern' a) -> Arg (Pattern' a))
-> [NamedArg (Pattern' a)] -> [Arg (Pattern' a)]
forall a b. (a -> b) -> [a] -> [b]
map ((Named NamedName (Pattern' a) -> Pattern' a)
-> NamedArg (Pattern' a) -> Arg (Pattern' a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Named NamedName (Pattern' a) -> Pattern' a
forall name a. Named name a -> a
namedThing) [NamedArg (Pattern' a)]
nps
lazy :: Doc
lazy | ConPatternInfo -> Bool
conPLazy ConPatternInfo
i = "~"
| Bool
otherwise = Doc
forall a. Null a => a
empty
prettyPrec n :: Int
n (DefP o :: PatternInfo
o q :: QName
q nps :: [NamedArg (Pattern' a)]
nps)= Bool -> Doc -> Doc
mparens (Int
n Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> 0 Bool -> Bool -> Bool
&& Bool -> Bool
not ([NamedArg (Pattern' a)] -> Bool
forall a. Null a => a -> Bool
null [NamedArg (Pattern' a)]
nps)) (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$
QName -> Doc
forall a. Pretty a => a -> Doc
pretty QName
q Doc -> Doc -> Doc
<+> [Doc] -> Doc
fsep ((Arg (Pattern' a) -> Doc) -> [Arg (Pattern' a)] -> [Doc]
forall a b. (a -> b) -> [a] -> [b]
map (Int -> Arg (Pattern' a) -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec 10) [Arg (Pattern' a)]
ps)
where ps :: [Arg (Pattern' a)]
ps = (NamedArg (Pattern' a) -> Arg (Pattern' a))
-> [NamedArg (Pattern' a)] -> [Arg (Pattern' a)]
forall a b. (a -> b) -> [a] -> [b]
map ((Named NamedName (Pattern' a) -> Pattern' a)
-> NamedArg (Pattern' a) -> Arg (Pattern' a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Named NamedName (Pattern' a) -> Pattern' a
forall name a. Named name a -> a
namedThing) [NamedArg (Pattern' a)]
nps
prettyPrec _ (LitP _ l :: Literal
l) = Literal -> Doc
forall a. Pretty a => a -> Doc
pretty Literal
l
prettyPrec _ (ProjP _o :: ProjOrigin
_o q :: QName
q) = String -> Doc
text ("." String -> ShowS
forall a. [a] -> [a] -> [a]
++ QName -> String
forall a. Pretty a => a -> String
prettyShow QName
q)
prettyPrec n :: Int
n (IApplyP _o :: PatternInfo
_o _ _ x :: a
x) = Int -> a -> Doc
forall a. Pretty a => Int -> a -> Doc
prettyPrec Int
n a
x
instance NFData Term where
rnf :: Term -> ()
rnf v :: Term
v = case Term
v of
Var _ es :: Elims
es -> Elims -> ()
forall a. NFData a => a -> ()
rnf Elims
es
Lam _ b :: Abs Term
b -> Term -> ()
forall a. NFData a => a -> ()
rnf (Abs Term -> Term
forall a. Abs a -> a
unAbs Abs Term
b)
Lit l :: Literal
l -> Literal -> ()
forall a. NFData a => a -> ()
rnf Literal
l
Def _ es :: Elims
es -> Elims -> ()
forall a. NFData a => a -> ()
rnf Elims
es
Con _ _ vs :: Elims
vs -> Elims -> ()
forall a. NFData a => a -> ()
rnf Elims
vs
Pi a :: Dom Type
a b :: Abs Type
b -> (Type, Type) -> ()
forall a. NFData a => a -> ()
rnf (Dom Type -> Type
forall t e. Dom' t e -> e
unDom Dom Type
a, Abs Type -> Type
forall a. Abs a -> a
unAbs Abs Type
b)
Sort s :: Sort
s -> Sort -> ()
forall a. NFData a => a -> ()
rnf Sort
s
Level l :: Level
l -> Level -> ()
forall a. NFData a => a -> ()
rnf Level
l
MetaV _ es :: Elims
es -> Elims -> ()
forall a. NFData a => a -> ()
rnf Elims
es
DontCare v :: Term
v -> Term -> ()
forall a. NFData a => a -> ()
rnf Term
v
Dummy _ es :: Elims
es -> Elims -> ()
forall a. NFData a => a -> ()
rnf Elims
es
instance NFData Type where
rnf :: Type -> ()
rnf (El s :: Sort
s v :: Term
v) = (Sort, Term) -> ()
forall a. NFData a => a -> ()
rnf (Sort
s, Term
v)
instance NFData Sort where
rnf :: Sort -> ()
rnf s :: Sort
s = case Sort
s of
Type l :: Level
l -> Level -> ()
forall a. NFData a => a -> ()
rnf Level
l
Prop l :: Level
l -> Level -> ()
forall a. NFData a => a -> ()
rnf Level
l
Inf -> ()
SizeUniv -> ()
PiSort a :: Dom Type
a b :: Abs Sort
b -> (Dom Type, Sort) -> ()
forall a. NFData a => a -> ()
rnf (Dom Type
a, Abs Sort -> Sort
forall a. Abs a -> a
unAbs Abs Sort
b)
FunSort a :: Sort
a b :: Sort
b -> (Sort, Sort) -> ()
forall a. NFData a => a -> ()
rnf (Sort
a, Sort
b)
UnivSort a :: Sort
a -> Sort -> ()
forall a. NFData a => a -> ()
rnf Sort
a
MetaS _ es :: Elims
es -> Elims -> ()
forall a. NFData a => a -> ()
rnf Elims
es
DefS _ es :: Elims
es -> Elims -> ()
forall a. NFData a => a -> ()
rnf Elims
es
DummyS _ -> ()
instance NFData Level where
rnf :: Level -> ()
rnf (Max n :: Integer
n as :: [PlusLevel' Term]
as) = (Integer, [PlusLevel' Term]) -> ()
forall a. NFData a => a -> ()
rnf (Integer
n, [PlusLevel' Term]
as)
instance NFData PlusLevel where
rnf :: PlusLevel' Term -> ()
rnf (Plus n :: Integer
n l :: LevelAtom
l) = (Integer, LevelAtom) -> ()
forall a. NFData a => a -> ()
rnf (Integer
n, LevelAtom
l)
instance NFData LevelAtom where
rnf :: LevelAtom -> ()
rnf (MetaLevel _ es :: Elims
es) = Elims -> ()
forall a. NFData a => a -> ()
rnf Elims
es
rnf (BlockedLevel _ v :: Term
v) = Term -> ()
forall a. NFData a => a -> ()
rnf Term
v
rnf (NeutralLevel _ v :: Term
v) = Term -> ()
forall a. NFData a => a -> ()
rnf Term
v
rnf (UnreducedLevel v :: Term
v) = Term -> ()
forall a. NFData a => a -> ()
rnf Term
v
instance NFData a => NFData (Elim' a) where
rnf :: Elim' a -> ()
rnf (Apply x :: Arg a
x) = Arg a -> ()
forall a. NFData a => a -> ()
rnf Arg a
x
rnf Proj{} = ()
rnf (IApply x :: a
x y :: a
y r :: a
r) = a -> ()
forall a. NFData a => a -> ()
rnf a
x () -> () -> ()
forall a b. a -> b -> b
`seq` a -> ()
forall a. NFData a => a -> ()
rnf a
y () -> () -> ()
forall a b. a -> b -> b
`seq` a -> ()
forall a. NFData a => a -> ()
rnf a
r
instance NFData e => NFData (Dom e) where
rnf :: Dom e -> ()
rnf (Dom a :: ArgInfo
a b :: Bool
b c :: Maybe NamedName
c d :: Maybe Term
d e :: e
e) = ArgInfo -> ()
forall a. NFData a => a -> ()
rnf ArgInfo
a () -> () -> ()
forall a b. a -> b -> b
`seq` Bool -> ()
forall a. NFData a => a -> ()
rnf Bool
b () -> () -> ()
forall a b. a -> b -> b
`seq` Maybe NamedName -> ()
forall a. NFData a => a -> ()
rnf Maybe NamedName
c () -> () -> ()
forall a b. a -> b -> b
`seq` Maybe Term -> ()
forall a. NFData a => a -> ()
rnf Maybe Term
d () -> () -> ()
forall a b. a -> b -> b
`seq` e -> ()
forall a. NFData a => a -> ()
rnf e
e