infernu 0.0.0.0 → 0.0.0.1
raw patch · 12 files changed
+84/−16 lines, 12 filesdep ~basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base
API changes (from Hackage documentation)
- Infernu.Fix: [unFix] :: Fix f -> f (Fix f)
- Infernu.Fix: instance GHC.Classes.Eq (f (Infernu.Fix.Fix f)) => GHC.Classes.Eq (Infernu.Fix.Fix f)
- Infernu.Fix: instance GHC.Classes.Ord (f (Infernu.Fix.Fix f)) => GHC.Classes.Ord (Infernu.Fix.Fix f)
- Infernu.Fix: instance GHC.Show.Show (f (Infernu.Fix.Fix f)) => GHC.Show.Show (Infernu.Fix.Fix f)
- Infernu.Options: [optFileNames] :: Options -> [String]
- Infernu.Options: [optQuiet] :: Options -> Bool
- Infernu.Options: [optShowCore] :: Options -> Bool
- Infernu.Options: [optShowParsed] :: Options -> Bool
- Infernu.Pretty: instance (GHC.Classes.Ord t, Infernu.Types.VarNames t, Infernu.Pretty.Pretty t) => Infernu.Pretty.Pretty (Infernu.Types.Class t)
- Infernu.Pretty: instance (GHC.Classes.Ord t, Infernu.Types.VarNames t, Infernu.Pretty.Pretty t) => Infernu.Pretty.Pretty (Infernu.Types.TScheme t)
- Infernu.Pretty: instance (GHC.Show.Show a, GHC.Show.Show b) => Infernu.Pretty.Pretty (Data.Graph.Inductive.PatriciaTree.Gr a b)
- Infernu.Pretty: instance (Infernu.Pretty.Pretty a, Infernu.Pretty.Pretty b) => Infernu.Pretty.Pretty (Data.Either.Either a b)
- Infernu.Pretty: instance (Infernu.Pretty.Pretty a, Infernu.Pretty.Pretty b) => Infernu.Pretty.Pretty (a, b)
- Infernu.Pretty: instance (Infernu.Pretty.Pretty a, Infernu.Pretty.Pretty b) => Infernu.Pretty.Pretty [(a, b)]
- Infernu.Pretty: instance (Infernu.Pretty.Pretty a, Infernu.Pretty.Pretty b, Infernu.Pretty.Pretty c) => Infernu.Pretty.Pretty (a, b, c)
- Infernu.Pretty: instance (Infernu.Pretty.Pretty k, Infernu.Pretty.Pretty v) => Infernu.Pretty.Pretty (Data.Map.Base.Map k v)
- Infernu.Pretty: instance (Infernu.Types.VarNames t, Infernu.Pretty.Pretty t) => Infernu.Pretty.Pretty (Infernu.Types.TQual t)
- Infernu.Pretty: instance Infernu.Pretty.Pretty (Infernu.Types.Exp a)
- Infernu.Pretty: instance Infernu.Pretty.Pretty (Infernu.Types.FType Infernu.Types.Type)
- Infernu.Pretty: instance Infernu.Pretty.Pretty GHC.Types.Bool
- Infernu.Pretty: instance Infernu.Pretty.Pretty Infernu.Types.ClassName
- Infernu.Pretty: instance Infernu.Pretty.Pretty Infernu.Types.EVarName
- Infernu.Pretty: instance Infernu.Pretty.Pretty Infernu.Types.GenInfo
- Infernu.Pretty: instance Infernu.Pretty.Pretty Infernu.Types.InferState
- Infernu.Pretty: instance Infernu.Pretty.Pretty Infernu.Types.LitVal
- Infernu.Pretty: instance Infernu.Pretty.Pretty Infernu.Types.NameSource
- Infernu.Pretty: instance Infernu.Pretty.Pretty Infernu.Types.RowTVar
- Infernu.Pretty: instance Infernu.Pretty.Pretty Infernu.Types.Source
- Infernu.Pretty: instance Infernu.Pretty.Pretty Infernu.Types.TBody
- Infernu.Pretty: instance Infernu.Pretty.Pretty Infernu.Types.TConsName
- Infernu.Pretty: instance Infernu.Pretty.Pretty Infernu.Types.TVarName
- Infernu.Pretty: instance Infernu.Pretty.Pretty Infernu.Types.Type
- Infernu.Pretty: instance Infernu.Pretty.Pretty Infernu.Types.TypeError
- Infernu.Pretty: instance Infernu.Pretty.Pretty Infernu.Types.TypeId
- Infernu.Pretty: instance Infernu.Pretty.Pretty Infernu.Types.VarId
- Infernu.Pretty: instance Infernu.Pretty.Pretty Text.Parsec.Pos.SourcePos
- Infernu.Pretty: instance Infernu.Pretty.Pretty [GHC.Base.String]
- Infernu.Pretty: instance Infernu.Pretty.Pretty [Infernu.Types.Type]
- Infernu.Pretty: instance Infernu.Pretty.Pretty a => Infernu.Pretty.Pretty (GHC.Base.Maybe a)
- Infernu.Pretty: instance Infernu.Pretty.Pretty k => Infernu.Pretty.Pretty (Data.Set.Base.Set k)
- Infernu.Pretty: instance Infernu.Pretty.Pretty t => Infernu.Pretty.Pretty (Infernu.Types.TPred t)
- Infernu.Pretty: instance Infernu.Pretty.Pretty t => Infernu.Pretty.Pretty [Infernu.Types.TPred t]
- Infernu.Types: [classInstances] :: Class t -> [TScheme t]
- Infernu.Types: [classes] :: InferState -> Map ClassName (Class Type)
- Infernu.Types: [declName] :: GenInfo -> Maybe String
- Infernu.Types: [isGen] :: GenInfo -> Bool
- Infernu.Types: [lastName] :: NameSource -> TVarName
- Infernu.Types: [mainSubst] :: InferState -> TSubst
- Infernu.Types: [message] :: TypeError -> String
- Infernu.Types: [nameSource] :: InferState -> NameSource
- Infernu.Types: [namedTypes] :: InferState -> Map TypeId (Type, TypeScheme)
- Infernu.Types: [pendingUni] :: InferState -> Set (Source, Type, (ClassName, Set TypeScheme))
- Infernu.Types: [predClass] :: TPred t -> ClassName
- Infernu.Types: [predType] :: TPred t -> t
- Infernu.Types: [qualPred] :: TQual t -> [TPred t]
- Infernu.Types: [qualType] :: TQual t -> t
- Infernu.Types: [schemeType] :: TScheme t -> TQual t
- Infernu.Types: [schemeVars] :: TScheme t -> [TVarName]
- Infernu.Types: [source] :: TypeError -> Source
- Infernu.Types: [unFix] :: Fix f -> f (Fix f)
- Infernu.Types: [varInstances] :: InferState -> Gr QualType ()
- Infernu.Types: [varSchemes] :: InferState -> Map VarId TypeScheme
- Infernu.Types: instance (GHC.Classes.Ord a, Infernu.Types.Substable a) => Infernu.Types.Substable (Data.Set.Base.Set a)
- Infernu.Types: instance (Infernu.Types.Substable t, Infernu.Types.VarNames t) => Infernu.Types.Substable (Infernu.Types.TQual t)
- Infernu.Types: instance (Infernu.Types.VarNames t, Infernu.Types.Substable t) => Infernu.Types.Substable (Infernu.Types.TScheme t)
- Infernu.Types: instance Data.Foldable.Foldable Infernu.Types.Class
- Infernu.Types: instance Data.Foldable.Foldable Infernu.Types.Exp
- Infernu.Types: instance Data.Foldable.Foldable Infernu.Types.FType
- Infernu.Types: instance Data.Foldable.Foldable Infernu.Types.TPred
- Infernu.Types: instance Data.Foldable.Foldable Infernu.Types.TQual
- Infernu.Types: instance Data.Foldable.Foldable Infernu.Types.TRowList
- Infernu.Types: instance Data.Foldable.Foldable Infernu.Types.TScheme
- Infernu.Types: instance Data.Traversable.Traversable Infernu.Types.Class
- Infernu.Types: instance Data.Traversable.Traversable Infernu.Types.FType
- Infernu.Types: instance Data.Traversable.Traversable Infernu.Types.TPred
- Infernu.Types: instance Data.Traversable.Traversable Infernu.Types.TQual
- Infernu.Types: instance Data.Traversable.Traversable Infernu.Types.TRowList
- Infernu.Types: instance Data.Traversable.Traversable Infernu.Types.TScheme
- Infernu.Types: instance GHC.Base.Functor Infernu.Types.Class
- Infernu.Types: instance GHC.Base.Functor Infernu.Types.Exp
- Infernu.Types: instance GHC.Base.Functor Infernu.Types.FType
- Infernu.Types: instance GHC.Base.Functor Infernu.Types.TPred
- Infernu.Types: instance GHC.Base.Functor Infernu.Types.TQual
- Infernu.Types: instance GHC.Base.Functor Infernu.Types.TRowList
- Infernu.Types: instance GHC.Base.Functor Infernu.Types.TScheme
- Infernu.Types: instance GHC.Classes.Eq Infernu.Types.ClassName
- Infernu.Types: instance GHC.Classes.Eq Infernu.Types.GenInfo
- Infernu.Types: instance GHC.Classes.Eq Infernu.Types.InferState
- Infernu.Types: instance GHC.Classes.Eq Infernu.Types.LitVal
- Infernu.Types: instance GHC.Classes.Eq Infernu.Types.NameSource
- Infernu.Types: instance GHC.Classes.Eq Infernu.Types.RowTVar
- Infernu.Types: instance GHC.Classes.Eq Infernu.Types.Source
- Infernu.Types: instance GHC.Classes.Eq Infernu.Types.TBody
- Infernu.Types: instance GHC.Classes.Eq Infernu.Types.TConsName
- Infernu.Types: instance GHC.Classes.Eq Infernu.Types.TypeError
- Infernu.Types: instance GHC.Classes.Eq Infernu.Types.TypeId
- Infernu.Types: instance GHC.Classes.Eq Infernu.Types.VarId
- Infernu.Types: instance GHC.Classes.Eq a => GHC.Classes.Eq (Infernu.Types.Exp a)
- Infernu.Types: instance GHC.Classes.Eq t => GHC.Classes.Eq (Infernu.Types.Class t)
- Infernu.Types: instance GHC.Classes.Eq t => GHC.Classes.Eq (Infernu.Types.FType t)
- Infernu.Types: instance GHC.Classes.Eq t => GHC.Classes.Eq (Infernu.Types.TPred t)
- Infernu.Types: instance GHC.Classes.Eq t => GHC.Classes.Eq (Infernu.Types.TQual t)
- Infernu.Types: instance GHC.Classes.Eq t => GHC.Classes.Eq (Infernu.Types.TRowList t)
- Infernu.Types: instance GHC.Classes.Eq t => GHC.Classes.Eq (Infernu.Types.TScheme t)
- Infernu.Types: instance GHC.Classes.Ord Infernu.Types.ClassName
- Infernu.Types: instance GHC.Classes.Ord Infernu.Types.GenInfo
- Infernu.Types: instance GHC.Classes.Ord Infernu.Types.LitVal
- Infernu.Types: instance GHC.Classes.Ord Infernu.Types.RowTVar
- Infernu.Types: instance GHC.Classes.Ord Infernu.Types.Source
- Infernu.Types: instance GHC.Classes.Ord Infernu.Types.TBody
- Infernu.Types: instance GHC.Classes.Ord Infernu.Types.TConsName
- Infernu.Types: instance GHC.Classes.Ord Infernu.Types.TypeError
- Infernu.Types: instance GHC.Classes.Ord Infernu.Types.TypeId
- Infernu.Types: instance GHC.Classes.Ord Infernu.Types.VarId
- Infernu.Types: instance GHC.Classes.Ord a => GHC.Classes.Ord (Infernu.Types.Exp a)
- Infernu.Types: instance GHC.Classes.Ord t => GHC.Classes.Ord (Infernu.Types.Class t)
- Infernu.Types: instance GHC.Classes.Ord t => GHC.Classes.Ord (Infernu.Types.FType t)
- Infernu.Types: instance GHC.Classes.Ord t => GHC.Classes.Ord (Infernu.Types.TPred t)
- Infernu.Types: instance GHC.Classes.Ord t => GHC.Classes.Ord (Infernu.Types.TQual t)
- Infernu.Types: instance GHC.Classes.Ord t => GHC.Classes.Ord (Infernu.Types.TRowList t)
- Infernu.Types: instance GHC.Classes.Ord t => GHC.Classes.Ord (Infernu.Types.TScheme t)
- Infernu.Types: instance GHC.Show.Show Infernu.Types.ClassName
- Infernu.Types: instance GHC.Show.Show Infernu.Types.GenInfo
- Infernu.Types: instance GHC.Show.Show Infernu.Types.InferState
- Infernu.Types: instance GHC.Show.Show Infernu.Types.LitVal
- Infernu.Types: instance GHC.Show.Show Infernu.Types.NameSource
- Infernu.Types: instance GHC.Show.Show Infernu.Types.RowTVar
- Infernu.Types: instance GHC.Show.Show Infernu.Types.Source
- Infernu.Types: instance GHC.Show.Show Infernu.Types.TBody
- Infernu.Types: instance GHC.Show.Show Infernu.Types.TConsName
- Infernu.Types: instance GHC.Show.Show Infernu.Types.TypeError
- Infernu.Types: instance GHC.Show.Show Infernu.Types.TypeId
- Infernu.Types: instance GHC.Show.Show Infernu.Types.VarId
- Infernu.Types: instance GHC.Show.Show a => GHC.Show.Show (Infernu.Types.Exp a)
- Infernu.Types: instance GHC.Show.Show t => GHC.Show.Show (Infernu.Types.Class t)
- Infernu.Types: instance GHC.Show.Show t => GHC.Show.Show (Infernu.Types.FType t)
- Infernu.Types: instance GHC.Show.Show t => GHC.Show.Show (Infernu.Types.TPred t)
- Infernu.Types: instance GHC.Show.Show t => GHC.Show.Show (Infernu.Types.TQual t)
- Infernu.Types: instance GHC.Show.Show t => GHC.Show.Show (Infernu.Types.TRowList t)
- Infernu.Types: instance GHC.Show.Show t => GHC.Show.Show (Infernu.Types.TScheme t)
- Infernu.Types: instance Infernu.Types.Substable (Infernu.Types.TRowList Infernu.Types.Type)
- Infernu.Types: instance Infernu.Types.Substable Infernu.Types.InferState
- Infernu.Types: instance Infernu.Types.Substable Infernu.Types.Type
- Infernu.Types: instance Infernu.Types.Substable a => Infernu.Types.Substable (Data.Map.Base.Map b a)
- Infernu.Types: instance Infernu.Types.Substable a => Infernu.Types.Substable (GHC.Base.Maybe a)
- Infernu.Types: instance Infernu.Types.Substable a => Infernu.Types.Substable [a]
- Infernu.Types: instance Infernu.Types.Substable b => Infernu.Types.Substable (a, b)
- Infernu.Types: instance Infernu.Types.Substable t => Infernu.Types.Substable (Infernu.Types.TPred t)
- Infernu.Types: instance Infernu.Types.VarNames (Infernu.Types.FType (Infernu.Fix.Fix Infernu.Types.FType))
- Infernu.Types: instance Infernu.Types.VarNames Infernu.Types.InferState
- Infernu.Types: instance Infernu.Types.VarNames Infernu.Types.TBody
- Infernu.Types: instance Infernu.Types.VarNames Infernu.Types.TVarName
- Infernu.Types: instance Infernu.Types.VarNames Infernu.Types.Type
- Infernu.Types: instance Infernu.Types.VarNames t => Infernu.Types.VarNames (Data.Map.Base.Map a t)
- Infernu.Types: instance Infernu.Types.VarNames t => Infernu.Types.VarNames (Infernu.Types.Exp (a, t))
- Infernu.Types: instance Infernu.Types.VarNames t => Infernu.Types.VarNames (Infernu.Types.TPred t)
- Infernu.Types: instance Infernu.Types.VarNames t => Infernu.Types.VarNames (Infernu.Types.TQual t)
- Infernu.Types: instance Infernu.Types.VarNames t => Infernu.Types.VarNames (Infernu.Types.TRowList t)
- Infernu.Types: instance Infernu.Types.VarNames t => Infernu.Types.VarNames (Infernu.Types.TScheme t)
- Infernu.Types: instance Infernu.Types.VarNames t => Infernu.Types.VarNames (a, t)
- Infernu.Types: instance Infernu.Types.VarNames t => Infernu.Types.VarNames [t]
+ Infernu.Fix: instance Eq (f (Fix f)) => Eq (Fix f)
+ Infernu.Fix: instance Ord (f (Fix f)) => Ord (Fix f)
+ Infernu.Fix: instance Show (f (Fix f)) => Show (Fix f)
+ Infernu.Fix: unFix :: Fix f -> f (Fix f)
+ Infernu.Options: optFileNames :: Options -> [String]
+ Infernu.Options: optQuiet :: Options -> Bool
+ Infernu.Options: optShowCore :: Options -> Bool
+ Infernu.Options: optShowParsed :: Options -> Bool
+ Infernu.Pretty: instance (Ord t, VarNames t, Pretty t) => Pretty (Class t)
+ Infernu.Pretty: instance (Ord t, VarNames t, Pretty t) => Pretty (TScheme t)
+ Infernu.Pretty: instance (Pretty a, Pretty b) => Pretty (Either a b)
+ Infernu.Pretty: instance (Pretty a, Pretty b) => Pretty (a, b)
+ Infernu.Pretty: instance (Pretty a, Pretty b) => Pretty [(a, b)]
+ Infernu.Pretty: instance (Pretty a, Pretty b, Pretty c) => Pretty (a, b, c)
+ Infernu.Pretty: instance (Pretty k, Pretty v) => Pretty (Map k v)
+ Infernu.Pretty: instance (Show a, Show b) => Pretty (Gr a b)
+ Infernu.Pretty: instance (VarNames t, Pretty t) => Pretty (TQual t)
+ Infernu.Pretty: instance Pretty (Exp a)
+ Infernu.Pretty: instance Pretty (FType Type)
+ Infernu.Pretty: instance Pretty Bool
+ Infernu.Pretty: instance Pretty ClassName
+ Infernu.Pretty: instance Pretty EVarName
+ Infernu.Pretty: instance Pretty GenInfo
+ Infernu.Pretty: instance Pretty InferState
+ Infernu.Pretty: instance Pretty LitVal
+ Infernu.Pretty: instance Pretty NameSource
+ Infernu.Pretty: instance Pretty RowTVar
+ Infernu.Pretty: instance Pretty Source
+ Infernu.Pretty: instance Pretty SourcePos
+ Infernu.Pretty: instance Pretty TBody
+ Infernu.Pretty: instance Pretty TConsName
+ Infernu.Pretty: instance Pretty TVarName
+ Infernu.Pretty: instance Pretty Type
+ Infernu.Pretty: instance Pretty TypeError
+ Infernu.Pretty: instance Pretty TypeId
+ Infernu.Pretty: instance Pretty VarId
+ Infernu.Pretty: instance Pretty [String]
+ Infernu.Pretty: instance Pretty [Type]
+ Infernu.Pretty: instance Pretty a => Pretty (Maybe a)
+ Infernu.Pretty: instance Pretty k => Pretty (Set k)
+ Infernu.Pretty: instance Pretty t => Pretty (TPred t)
+ Infernu.Pretty: instance Pretty t => Pretty [TPred t]
+ Infernu.Types: classInstances :: Class t -> [TScheme t]
+ Infernu.Types: classes :: InferState -> Map ClassName (Class Type)
+ Infernu.Types: declName :: GenInfo -> Maybe String
+ Infernu.Types: instance (Ord a, Substable a) => Substable (Set a)
+ Infernu.Types: instance (Substable t, VarNames t) => Substable (TQual t)
+ Infernu.Types: instance (VarNames t, Substable t) => Substable (TScheme t)
+ Infernu.Types: instance Eq ClassName
+ Infernu.Types: instance Eq GenInfo
+ Infernu.Types: instance Eq InferState
+ Infernu.Types: instance Eq LitVal
+ Infernu.Types: instance Eq NameSource
+ Infernu.Types: instance Eq RowTVar
+ Infernu.Types: instance Eq Source
+ Infernu.Types: instance Eq TBody
+ Infernu.Types: instance Eq TConsName
+ Infernu.Types: instance Eq TypeError
+ Infernu.Types: instance Eq TypeId
+ Infernu.Types: instance Eq VarId
+ Infernu.Types: instance Eq a => Eq (Exp a)
+ Infernu.Types: instance Eq t => Eq (Class t)
+ Infernu.Types: instance Eq t => Eq (FType t)
+ Infernu.Types: instance Eq t => Eq (TPred t)
+ Infernu.Types: instance Eq t => Eq (TQual t)
+ Infernu.Types: instance Eq t => Eq (TRowList t)
+ Infernu.Types: instance Eq t => Eq (TScheme t)
+ Infernu.Types: instance Foldable Class
+ Infernu.Types: instance Foldable Exp
+ Infernu.Types: instance Foldable FType
+ Infernu.Types: instance Foldable TPred
+ Infernu.Types: instance Foldable TQual
+ Infernu.Types: instance Foldable TRowList
+ Infernu.Types: instance Foldable TScheme
+ Infernu.Types: instance Functor Class
+ Infernu.Types: instance Functor Exp
+ Infernu.Types: instance Functor FType
+ Infernu.Types: instance Functor TPred
+ Infernu.Types: instance Functor TQual
+ Infernu.Types: instance Functor TRowList
+ Infernu.Types: instance Functor TScheme
+ Infernu.Types: instance Ord ClassName
+ Infernu.Types: instance Ord GenInfo
+ Infernu.Types: instance Ord LitVal
+ Infernu.Types: instance Ord RowTVar
+ Infernu.Types: instance Ord Source
+ Infernu.Types: instance Ord TBody
+ Infernu.Types: instance Ord TConsName
+ Infernu.Types: instance Ord TypeError
+ Infernu.Types: instance Ord TypeId
+ Infernu.Types: instance Ord VarId
+ Infernu.Types: instance Ord a => Ord (Exp a)
+ Infernu.Types: instance Ord t => Ord (Class t)
+ Infernu.Types: instance Ord t => Ord (FType t)
+ Infernu.Types: instance Ord t => Ord (TPred t)
+ Infernu.Types: instance Ord t => Ord (TQual t)
+ Infernu.Types: instance Ord t => Ord (TRowList t)
+ Infernu.Types: instance Ord t => Ord (TScheme t)
+ Infernu.Types: instance Show ClassName
+ Infernu.Types: instance Show GenInfo
+ Infernu.Types: instance Show InferState
+ Infernu.Types: instance Show LitVal
+ Infernu.Types: instance Show NameSource
+ Infernu.Types: instance Show RowTVar
+ Infernu.Types: instance Show Source
+ Infernu.Types: instance Show TBody
+ Infernu.Types: instance Show TConsName
+ Infernu.Types: instance Show TypeError
+ Infernu.Types: instance Show TypeId
+ Infernu.Types: instance Show VarId
+ Infernu.Types: instance Show a => Show (Exp a)
+ Infernu.Types: instance Show t => Show (Class t)
+ Infernu.Types: instance Show t => Show (FType t)
+ Infernu.Types: instance Show t => Show (TPred t)
+ Infernu.Types: instance Show t => Show (TQual t)
+ Infernu.Types: instance Show t => Show (TRowList t)
+ Infernu.Types: instance Show t => Show (TScheme t)
+ Infernu.Types: instance Substable (TRowList Type)
+ Infernu.Types: instance Substable InferState
+ Infernu.Types: instance Substable Type
+ Infernu.Types: instance Substable a => Substable (Map b a)
+ Infernu.Types: instance Substable a => Substable (Maybe a)
+ Infernu.Types: instance Substable a => Substable [a]
+ Infernu.Types: instance Substable b => Substable (a, b)
+ Infernu.Types: instance Substable t => Substable (TPred t)
+ Infernu.Types: instance Traversable Class
+ Infernu.Types: instance Traversable FType
+ Infernu.Types: instance Traversable TPred
+ Infernu.Types: instance Traversable TQual
+ Infernu.Types: instance Traversable TRowList
+ Infernu.Types: instance Traversable TScheme
+ Infernu.Types: instance VarNames (FType (Fix FType))
+ Infernu.Types: instance VarNames InferState
+ Infernu.Types: instance VarNames TBody
+ Infernu.Types: instance VarNames TVarName
+ Infernu.Types: instance VarNames Type
+ Infernu.Types: instance VarNames t => VarNames (Exp (a, t))
+ Infernu.Types: instance VarNames t => VarNames (Map a t)
+ Infernu.Types: instance VarNames t => VarNames (TPred t)
+ Infernu.Types: instance VarNames t => VarNames (TQual t)
+ Infernu.Types: instance VarNames t => VarNames (TRowList t)
+ Infernu.Types: instance VarNames t => VarNames (TScheme t)
+ Infernu.Types: instance VarNames t => VarNames (a, t)
+ Infernu.Types: instance VarNames t => VarNames [t]
+ Infernu.Types: isGen :: GenInfo -> Bool
+ Infernu.Types: lastName :: NameSource -> TVarName
+ Infernu.Types: mainSubst :: InferState -> TSubst
+ Infernu.Types: message :: TypeError -> String
+ Infernu.Types: nameSource :: InferState -> NameSource
+ Infernu.Types: namedTypes :: InferState -> Map TypeId (Type, TypeScheme)
+ Infernu.Types: pendingUni :: InferState -> Set (Source, Type, (ClassName, Set TypeScheme))
+ Infernu.Types: predClass :: TPred t -> ClassName
+ Infernu.Types: predType :: TPred t -> t
+ Infernu.Types: qualPred :: TQual t -> [TPred t]
+ Infernu.Types: qualType :: TQual t -> t
+ Infernu.Types: schemeType :: TScheme t -> TQual t
+ Infernu.Types: schemeVars :: TScheme t -> [TVarName]
+ Infernu.Types: source :: TypeError -> Source
+ Infernu.Types: unFix :: Fix f -> f (Fix f)
+ Infernu.Types: varInstances :: InferState -> Gr QualType ()
+ Infernu.Types: varSchemes :: InferState -> Map VarId TypeScheme
- Infernu.Infer: minifyVars :: (VarNames a) => a -> a
+ Infernu.Infer: minifyVars :: VarNames a => a -> a
- Infernu.InferState: minifyVars :: (VarNames a) => a -> a
+ Infernu.InferState: minifyVars :: VarNames a => a -> a
- Infernu.InferState: minifyVarsFunc :: (VarNames a) => a -> TVarName -> TVarName
+ Infernu.InferState: minifyVarsFunc :: VarNames a => a -> TVarName -> TVarName
Files
- README.md +1/−1
- infernu.cabal +3/−2
- src/Infernu/Decycle.hs +1/−0
- src/Infernu/Infer.hs +1/−2
- src/Infernu/InferState.hs +3/−3
- src/Infernu/Log.hs +1/−0
- src/Infernu/Prelude.hs +50/−0
- src/Infernu/Pretty.hs +1/−1
- src/Infernu/Types.hs +2/−2
- src/Infernu/Unify.hs +17/−4
- src/Infernu/Util.hs +1/−0
- test/Demo.hs +3/−1
README.md view
@@ -1,6 +1,6 @@ # Infernu -Static type inference for JavaScript.+Static type inference for JavaScript. (In early development.) See the [intro blog post](https://noamlewis.wordpress.com/2015/01/20/introducing-sjs-a-type-inferer-and-checker-for-javascript/) for a short discussion comparing infernu to **other type checkers**.
infernu.cabal view
@@ -1,5 +1,5 @@ name: infernu-version: 0.0.0.0+version: 0.0.0.1 synopsis: Type inference and checker for JavaScript (experimental) description: This version is highly experimental and may set your computer on fire (also, a lot of JS is not supported yet, so it may not be very useful.) .@@ -65,12 +65,13 @@ , Infernu.Log , Infernu.Options , Infernu.Parse+ , Infernu.Prelude , Infernu.Pretty , Infernu.Types , Infernu.Unify , Infernu.Util -- TODO: use only mtl (not transformers)- build-depends: base >= 4.8 && < 5, mtl, containers, transformers, either, language-ecmascript, digits, parsec, fgl, optparse-applicative+ build-depends: base >= 4.6 && < 5, mtl, containers, transformers, either, language-ecmascript, digits, parsec, fgl, optparse-applicative default-language: Haskell2010 ghc-options: -Wall -O2 -rtsopts -threaded if flag(debug)
src/Infernu/Decycle.hs view
@@ -4,6 +4,7 @@ module Infernu.Decycle(decycleOn, decycle, decycle2, decycle3) where +import Infernu.Prelude import qualified Data.Set as Set -- | A fix for functions that terminates recursive cycles
src/Infernu/Infer.hs view
@@ -15,8 +15,6 @@ import Control.Monad (foldM, forM)-import Data.Foldable (Foldable (..))-import Data.Traversable (mapM) import qualified Data.Graph.Inductive as Graph import Data.Map.Lazy (Map) import qualified Data.Map.Lazy as Map@@ -27,6 +25,7 @@ import Data.List (intercalate) +import Infernu.Prelude import qualified Infernu.Builtins.Operators as Operators import Infernu.InferState import Infernu.Lib (safeLookup)
src/Infernu/InferState.hs view
@@ -5,14 +5,14 @@ module Infernu.InferState where +import Data.Foldable (msum) import Control.Monad (foldM, forM, forM_, liftM2, when) import Control.Monad.Trans (lift) import Control.Monad.Trans.Either (EitherT (..), left, runEitherT, bimapEitherT) import Control.Monad.Trans.State (StateT (..), evalStateT, get, put, modify, mapStateT)-import Data.Foldable (Foldable (..), msum)-import Data.Traversable (Traversable (..)) import qualified Data.Graph.Inductive as Graph + import Data.Functor.Identity (Identity (..), runIdentity) import qualified Data.Map.Lazy as Map -- import Data.Map.Lazy (Map)@@ -22,7 +22,7 @@ import Prelude hiding (foldr, sequence, mapM) -+import Infernu.Prelude import Infernu.Pretty import Infernu.Types import Infernu.Log
src/Infernu/Log.hs view
@@ -6,6 +6,7 @@ (trace, tracePretty, traceLog, traceLogVal) where +import Infernu.Prelude import Infernu.Pretty
+ src/Infernu/Prelude.hs view
@@ -0,0 +1,50 @@+{-# LANGUAGE CPP #-}+{-# OPTIONS_GHC -fno-warn-orphans #-}++-- | The sole purpose of this module is to fix pre/post ghc 7.10 compatibility issues+module Infernu.Prelude + ( module Prelude+#if MIN_VERSION_base(4,8,0)+#else+ , module Data.Functor+ , module Data.Foldable+ , module Data.Monoid+ , module Control.Applicative+ , module Data.Traversable+#endif+#if MIN_VERSION_base(4,7,0)+ , module Data.Bool+#else+ , bool+#endif+ )+where++ +#if MIN_VERSION_base(4,8,0)+import Prelude+#else+import Data.Functor ((<$>))+import Data.Foldable (Foldable (..), foldr)+import Data.Monoid (Monoid (..))+import Control.Applicative (Applicative(..))+import Data.Traversable (Traversable (..))++import Prelude hiding (foldl, foldl1, foldr1, foldr, mapM, sequence)+#endif+ +#if MIN_VERSION_base(4,7,0)+import Data.Bool (bool)+#else++instance Foldable ((,) a) where+ foldMap f (_, y) = f y++ foldr f z (_, y) = f y z++bool :: a -> a -> Bool -> a+bool f _ False = f+bool _ t True = t++#endif+
src/Infernu/Pretty.hs view
@@ -140,7 +140,7 @@ [] -> (Nothing, nakedSingleOrTuple nonThisArgs) (this_:_) -> (Just this_, nakedSingleOrTuple nonThisArgs) wrapThis Nothing s = s- wrapThis (Just (Fix (TBody TUndefined))) s = s+ wrapThis (Just (Fix (TBody TUndefined))) s = s -- undefined as a function's parameter type (including 'this') is allowed to unify with any input parameter. wrapThis (Just t) s = prettyTab n t ++ "." ++ s -- prettyTab _ (TCons TFunc ts) = error $ "Malformed TFunc: " ++ intercalate ", " (map pretty ts) prettyType n (TCons TArray [t]) = "[" ++ prettyTab n t ++ "]"
src/Infernu/Types.hs view
@@ -59,15 +59,15 @@ #endif ) where -import Data.Foldable (Foldable (..), foldr) import qualified Data.Map.Lazy as Map import Data.Maybe (fromMaybe) import qualified Data.Set as Set import qualified Data.Graph.Inductive as Graph-import Prelude hiding (foldr) import qualified Text.Parsec.Pos as Pos import Infernu.Fix (Fix (..), replaceFix)+import Infernu.Prelude+import Prelude () #ifdef QUICKCHECK import Data.DeriveTH
src/Infernu/Unify.hs view
@@ -16,7 +16,10 @@ import Data.Set (Set) import qualified Data.Set as Set+import Prelude hiding (foldl, foldr, mapM, sequence) ++import Infernu.Prelude import Infernu.Builtins.Array (arrayRowType) import Infernu.Builtins.Regex (regexRowType) import Infernu.Builtins.String (stringRowType)@@ -210,8 +213,8 @@ unify' _ a (TBody (TVar n)) t = varBind a n (Fix t) unify' _ a t (TBody (TVar n)) = varBind a n (Fix t) --- | undefined-unify' _ _ (TBody TUndefined) _ = return () -- TODO verify this is ok. undefined being treated as "bottom" type here.+-- -- | undefined+-- unify' _ _ (TBody TUndefined) _ = return () -- TODO verify this is ok. undefined being treated as "bottom" type here. -- | Two simple types unify' _ a (TBody x) (TBody y) = unlessEq x y $ unificationError a x y@@ -260,12 +263,22 @@ Just ts -> unifyl recurse a ts -- | Two functions--- TODO: handle func return type (contravariance) by swapping the unify rhs/lhs for the last TCons TFunc targ unify' recurse a t1@(TFunc ts1 tres1) t2@(TFunc ts2 tres2) = case matchZip ts1 ts2 of Nothing -> unificationError a t1 t2- Just ts -> do unifyl recurse a ts+ Just ts -> do loop' ts recurse a tres2 tres1++ where loop' [] = return ()+ -- This allows passing any value as a function's argument which should have type+ -- 'undefined' added to deal with 'this' being inferred to be 'undefined' if a+ -- function is ever called without a 'this'. allows us to call standalone+ -- functions even when as a method dispatch (obj.f) that DOES pass a non-undefined+ -- 'this'.+ loop' ((Fix (TBody TUndefined), _):ts') = loop' ts'+ loop' ((x,y):ts') =+ do recurse a x y+ loop' ts' -- | Type constructor vs. row type unify' r a (TRow tRowList) t2@(TCons _ _) = unifyTryMakeRow r a True tRowList t2
src/Infernu/Util.hs view
@@ -10,6 +10,7 @@ import qualified Language.ECMAScript3.Syntax as ES3 import qualified Text.Parsec.Pos as Pos +import Infernu.Prelude import Infernu.Options (Options(..)) import Infernu.Parse (translate) -- TODO move pretty stuff to Pretty module
test/Demo.hs view
@@ -1,10 +1,12 @@ module Demo where -import Data.Bool (bool) import Data.List (intercalate)+ import Infernu.Infer (pretty) import Infernu.Util (checkFiles) import Infernu.Options (defaultOptions)+import Infernu.Prelude+ import System.Environment (getArgs) isRight :: Either a b -> Bool