hydra-0.8.0: Type-aware transformations for data and programs
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hydra.Inference.AlgorithmW

Documentation

data TypedPrimitive Source #

Constructors

TypedPrimitive Name TypSch 

Instances

Instances details
Eq TypedPrimitive Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

data Prim Source #

Instances

Instances details
Show Prim Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

showsPrec :: Int -> Prim -> ShowS #

show :: Prim -> String #

showList :: [Prim] -> ShowS #

Eq Prim Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

(==) :: Prim -> Prim -> Bool #

(/=) :: Prim -> Prim -> Bool #

data Expr Source #

Instances

Instances details
Show Expr Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

showsPrec :: Int -> Expr -> ShowS #

show :: Expr -> String #

showList :: [Expr] -> ShowS #

Eq Expr Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

(==) :: Expr -> Expr -> Bool #

(/=) :: Expr -> Expr -> Bool #

data MTy Source #

Instances

Instances details
Show MTy Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

showsPrec :: Int -> MTy -> ShowS #

show :: MTy -> String #

showList :: [MTy] -> ShowS #

Eq MTy Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

(==) :: MTy -> MTy -> Bool #

(/=) :: MTy -> MTy -> Bool #

Substable MTy Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

subst :: Subst -> MTy -> MTy Source #

Vars MTy Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

vars :: MTy -> [Var] Source #

data TypSch Source #

Constructors

Forall [Var] MTy 

Instances

Instances details
Show Ctx Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

showsPrec :: Int -> Ctx -> ShowS #

show :: Ctx -> String #

showList :: [Ctx] -> ShowS #

Show TypSch Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Eq TypSch Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

(==) :: TypSch -> TypSch -> Bool #

(/=) :: TypSch -> TypSch -> Bool #

Substable Ctx Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

subst :: Subst -> Ctx -> Ctx Source #

Substable TypSch Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

subst :: Subst -> TypSch -> TypSch Source #

Vars Ctx Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

vars :: Ctx -> [Var] Source #

Vars TypSch Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

vars :: TypSch -> [Var] Source #

type ADTs = [(Var, [Var], [(Var, [MTy])])] Source #

data FExpr Source #

Instances

Instances details
Show FExpr Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

showsPrec :: Int -> FExpr -> ShowS #

show :: FExpr -> String #

showList :: [FExpr] -> ShowS #

Eq FExpr Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

(==) :: FExpr -> FExpr -> Bool #

(/=) :: FExpr -> FExpr -> Bool #

Substable FExpr Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

subst :: Subst -> FExpr -> FExpr Source #

data FTy Source #

Instances

Instances details
Show FTy Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

showsPrec :: Int -> FTy -> ShowS #

show :: FTy -> String #

showList :: [FTy] -> ShowS #

Eq FTy Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

(==) :: FTy -> FTy -> Bool #

(/=) :: FTy -> FTy -> Bool #

Substable FTy Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

subst :: Subst -> FTy -> FTy Source #

type Ctx = [(Var, TypSch)] Source #

class Vars a where Source #

Methods

vars :: a -> [Var] Source #

Instances

Instances details
Vars Ctx Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

vars :: Ctx -> [Var] Source #

Vars MTy Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

vars :: MTy -> [Var] Source #

Vars TypSch Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

vars :: TypSch -> [Var] Source #

type Subst = [(Var, MTy)] Source #

class Substable a where Source #

Methods

subst :: Subst -> a -> a Source #

Instances

Instances details
Substable Ctx Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

subst :: Subst -> Ctx -> Ctx Source #

Substable FExpr Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

subst :: Subst -> FExpr -> FExpr Source #

Substable FTy Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

subst :: Subst -> FTy -> FTy Source #

Substable MTy Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

subst :: Subst -> MTy -> MTy Source #

Substable TypSch Source # 
Instance details

Defined in Hydra.Inference.AlgorithmW

Methods

subst :: Subst -> TypSch -> TypSch Source #

subst' :: [(Var, FTy)] -> FTy -> FTy Source #

open :: [Var] -> [FTy] -> FTy -> Either String FTy Source #

typeOf :: ADTs -> [Var] -> [(Var, FTy)] -> FExpr -> Either String FTy Source #

mgu :: MTy -> MTy -> E Subst Source #

mgu' :: [MTy] -> [MTy] -> E Subst Source #

occurs :: Var -> MTy -> E () Source #

type M a = E (Subst, a) Source #

log0 :: Int -> String -> E () Source #

inst :: TypSch -> E (MTy, [MTy]) Source #

gen :: Ctx -> MTy -> (TypSch, [Var]) Source #

replace :: (Num a, Ord a) => [b] -> (a, b) -> [b] Source #

checkAgainstF :: ADTs -> Ctx -> MTy -> FExpr -> E () Source #

w :: Int -> ADTs -> Ctx -> Expr -> M (MTy, FExpr) Source #

theAdts :: [(String, [String], [(String, [MTy])])] Source #

theAdtsJosh :: [(String, [a], [(String, [MTy])])] Source #

main :: IO [()] Source #

test_j_o_haskell :: a -> a -> [([a], [a])] Source #