xrs-0.1.0.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Lang.Classification

Documentation

class Context ctx judge where #

Methods

rootCtx :: Proxy judge -> ctx #

childContexts :: ctx -> Proof judge -> [ctx] #

Instances

Instances details
Context IsClosure EvalJ # 
Instance details

Defined in Lang.ClassificationInstances

Context IsConditionalCTX EvalJ # 
Instance details

Defined in Lang.ClassificationInstances

Context IsRelevantRecCallCTX EvalJ # 
Instance details

Defined in Lang.ClassificationInstances

Context () j # 
Instance details

Defined in Lang.ClassificationInstances

Methods

rootCtx :: Proxy j -> () #

childContexts :: () -> Proof j -> [()] #

(Context a j, Context b j) => Context (a, b) j # 
Instance details

Defined in Lang.ClassificationInstances

Methods

rootCtx :: Proxy j -> (a, b) #

childContexts :: (a, b) -> Proof j -> [(a, b)] #

(Context (a, b) j, Context c j) => Context (a, b, c) j # 
Instance details

Defined in Lang.ClassificationInstances

Methods

rootCtx :: Proxy j -> (a, b, c) #

childContexts :: (a, b, c) -> Proof j -> [(a, b, c)] #

(Context (a, b, c) j, Context d j) => Context (a, b, c, d) j # 
Instance details

Defined in Lang.ClassificationInstances

Methods

rootCtx :: Proxy j -> (a, b, c, d) #

childContexts :: (a, b, c, d) -> Proof j -> [(a, b, c, d)] #

(Context (a, b, c, d) j, Context e j) => Context (a, b, c, d, e) j # 
Instance details

Defined in Lang.ClassificationInstances

Methods

rootCtx :: Proxy j -> (a, b, c, d, e) #

childContexts :: (a, b, c, d, e) -> Proof j -> [(a, b, c, d, e)] #

(Context (a, b, c, d, e) j, Context f j) => Context (a, b, c, d, e, f) j # 
Instance details

Defined in Lang.ClassificationInstances

Methods

rootCtx :: Proxy j -> (a, b, c, d, e, f) #

childContexts :: (a, b, c, d, e, f) -> Proof j -> [(a, b, c, d, e, f)] #

(Context (a, b, c, d, e, f) j, Context g j) => Context (a, b, c, d, e, f, g) j # 
Instance details

Defined in Lang.ClassificationInstances

Methods

rootCtx :: Proxy j -> (a, b, c, d, e, f, g) #

childContexts :: (a, b, c, d, e, f, g) -> Proof j -> [(a, b, c, d, e, f, g)] #

(Context (a, b, c, d, e, f, g) j, Context h j) => Context (a, b, c, d, e, f, g, h) j # 
Instance details

Defined in Lang.ClassificationInstances

Methods

rootCtx :: Proxy j -> (a, b, c, d, e, f, g, h) #

childContexts :: (a, b, c, d, e, f, g, h) -> Proof j -> [(a, b, c, d, e, f, g, h)] #

(Context (a, b, c, d, e, f, g, h) j, Context i j) => Context (a, b, c, d, e, f, g, h, i) j # 
Instance details

Defined in Lang.ClassificationInstances

Methods

rootCtx :: Proxy j -> (a, b, c, d, e, f, g, h, i) #

childContexts :: (a, b, c, d, e, f, g, h, i) -> Proof j -> [(a, b, c, d, e, f, g, h, i)] #

(Context (a, b, c, d, e, f, g, h, i) j, Context j' j) => Context (a, b, c, d, e, f, g, h, i, j') j # 
Instance details

Defined in Lang.ClassificationInstances

Methods

rootCtx :: Proxy j -> (a, b, c, d, e, f, g, h, i, j') #

childContexts :: (a, b, c, d, e, f, g, h, i, j') -> Proof j -> [(a, b, c, d, e, f, g, h, i, j')] #

(Context (a, b, c, d, e, f, g, h, i, j') j, Context k j) => Context (a, b, c, d, e, f, g, h, i, j', k) j # 
Instance details

Defined in Lang.ClassificationInstances

Methods

rootCtx :: Proxy j -> (a, b, c, d, e, f, g, h, i, j', k) #

childContexts :: (a, b, c, d, e, f, g, h, i, j', k) -> Proof j -> [(a, b, c, d, e, f, g, h, i, j', k)] #

(Context (a, b, c, d, e, f, g, h, i, j', k) j, Context l j) => Context (a, b, c, d, e, f, g, h, i, j', k, l) j # 
Instance details

Defined in Lang.ClassificationInstances

Methods

rootCtx :: Proxy j -> (a, b, c, d, e, f, g, h, i, j', k, l) #

childContexts :: (a, b, c, d, e, f, g, h, i, j', k, l) -> Proof j -> [(a, b, c, d, e, f, g, h, i, j', k, l)] #

class Context ctx judge => Classification c judge ctx | c -> judge ctx where #

Methods

classify :: ctx -> judge -> [Proof (c, judge)] -> c #

Instances

Instances details
Classification IsArith EvalJ () # 
Instance details

Defined in Lang.ClassificationInstances

Methods

classify :: () -> EvalJ -> [Proof (IsArith, EvalJ)] -> IsArith #

Classification IsBaseCase EvalJ () # 
Instance details

Defined in Lang.ClassificationInstances

Methods

classify :: () -> EvalJ -> [Proof (IsBaseCase, EvalJ)] -> IsBaseCase #

Classification IsBinOp EvalJ () # 
Instance details

Defined in Lang.ClassificationInstances

Methods

classify :: () -> EvalJ -> [Proof (IsBinOp, EvalJ)] -> IsBinOp #

Classification IsClosure EvalJ () # 
Instance details

Defined in Lang.ClassificationInstances

Methods

classify :: () -> EvalJ -> [Proof (IsClosure, EvalJ)] -> IsClosure #

Classification IsConditional EvalJ IsConditionalCTX # 
Instance details

Defined in Lang.ClassificationInstances

Classification IsIfExpr EvalJ () # 
Instance details

Defined in Lang.ClassificationInstances

Methods

classify :: () -> EvalJ -> [Proof (IsIfExpr, EvalJ)] -> IsIfExpr #

Classification IsLiteral EvalJ () # 
Instance details

Defined in Lang.ClassificationInstances

Methods

classify :: () -> EvalJ -> [Proof (IsLiteral, EvalJ)] -> IsLiteral #

Classification IsRelevantRecCall EvalJ IsRelevantRecCallCTX # 
Instance details

Defined in Lang.ClassificationInstances

Classification XTagClassify EvalJ () # 
Instance details

Defined in Lang.NamedExplanation

Methods

classify :: () -> EvalJ -> [Proof (XTagClassify, EvalJ)] -> XTagClassify #

(Classification h1 j c1, Classification h2 j c2) => Classification (h1, h2) j (c1, c2) # 
Instance details

Defined in Lang.ClassificationInstances

Methods

classify :: (c1, c2) -> j -> [Proof ((h1, h2), j)] -> (h1, h2) #

data Polarity #

Constructors

Pos 
Neg 

Instances

Instances details
Show Polarity # 
Instance details

Defined in Lang.Classification

Eq Polarity # 
Instance details

Defined in Lang.Classification

class Score c where #

Minimal complete definition

score

Methods

polarity :: Polarity #

score :: c -> Float #

Instances

Instances details
Score IsArith # 
Instance details

Defined in Lang.ClassificationInstances

Score IsBaseCase # 
Instance details

Defined in Lang.ClassificationInstances

Score IsBinOp # 
Instance details

Defined in Lang.ClassificationInstances

Score IsClosure # 
Instance details

Defined in Lang.ClassificationInstances

Score IsConditional # 
Instance details

Defined in Lang.ClassificationInstances

Score IsIfExpr # 
Instance details

Defined in Lang.ClassificationInstances

Score IsLiteral # 
Instance details

Defined in Lang.ClassificationInstances

Score IsRelevantRecCall # 
Instance details

Defined in Lang.ClassificationInstances

class Classification c judge ctx => Strategy c judge ctx | c -> judge ctx where #

Methods

pick :: Proof (c, judge) -> [judge] #

Instances

Instances details
Strategy TestClassification EvalJ ((), IsRelevantRecCallCTX) # 
Instance details

Defined in Lang.ClassificationInstances

pick' :: forall c judge ctx. Strategy c judge ctx => Proof judge -> [judge] #

annotate :: forall c judge ctx. Classification c judge ctx => Proof judge -> Proof (c, judge) #

selectByAnnotation :: (c -> Bool) -> Proof (c, judge) -> [judge] #

selectCustom' :: forall c judge ctx a. (Ord a, Classification c judge ctx) => (c -> a) -> Proof judge -> [(c, judge)] #

selectCustom :: forall c judge ctx a. (Ord a, Classification c judge ctx) => (c -> a) -> Proof judge -> [judge] #

measure :: forall c. Score c => c -> Float #

select :: forall c judge ctx. (Classification c judge ctx, Score c) => Proof judge -> [judge] #