symantic 6.3.2.20180208 → 6.3.3.20190614
raw patch · 11 files changed
+149/−102 lines, 11 filesdep ~symantic-documentPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: symantic-document
API changes (from Hackage documentation)
- Language.Symantic.Compiling.Term: instance Language.Symantic.Grammar.Source.Source src => Language.Symantic.Grammar.Source.Sourced (Language.Symantic.Compiling.Term.Term src ss ts vs t)
- Language.Symantic.Compiling.Term: instance Language.Symantic.Grammar.Source.Source src => Language.Symantic.Grammar.Source.Sourced (Language.Symantic.Compiling.Term.TermAVT src ss)
- Language.Symantic.Compiling.Term: instance Language.Symantic.Grammar.Source.Source src => Language.Symantic.Grammar.Source.Sourced (Language.Symantic.Compiling.Term.TermVT src ss ts)
- Language.Symantic.Typing.Grammar: instance forall k (c :: k) (ts :: [*]). (Language.Symantic.Typing.Kind.KindInjP (Language.Symantic.Typing.Kind.Ty_of_Type (Language.Symantic.Typing.Kind.K c)), Language.Symantic.Typing.Kind.K c ~ Language.Symantic.Typing.Kind.Type_of_Ty (Language.Symantic.Typing.Kind.Ty_of_Type (Language.Symantic.Typing.Kind.K c)), Language.Symantic.Typing.Type.Constable c, Language.Symantic.Typing.Grammar.ModulesTyInj ts) => Language.Symantic.Typing.Grammar.ModulesTyInj (Data.Proxy.Proxy c : ts)
- Language.Symantic.Typing.Kind: instance (Language.Symantic.Typing.Kind.KindInjP (Language.Symantic.Typing.Kind.Ty_of_Type k), Language.Symantic.Typing.Kind.Type_of_Ty (Language.Symantic.Typing.Kind.Ty_of_Type k) ~ k) => Language.Symantic.Typing.Kind.KindInj k
- Language.Symantic.Typing.Kind: instance Language.Symantic.Grammar.Source.Source src => Language.Symantic.Grammar.Source.Sourced (Language.Symantic.Typing.Kind.Kind src k)
- Language.Symantic.Typing.Type: instance Language.Symantic.Typing.Module.NameTyOf () :: Constraint
- Language.Symantic.Typing.Type: instance Language.Symantic.Typing.Type.ClassInstancesFor () :: Constraint
- Language.Symantic.Typing.Type: instance Language.Symantic.Typing.Type.TypeInstancesFor () :: Constraint
- Language.Symantic.Typing.Type: instance forall k (x :: k) (y :: k). (x ~ y) => x Language.Symantic.Typing.Type.#~ y
- Language.Symantic.Typing.Type: instance forall kt src (vs :: [*]) (t :: kt). Language.Symantic.Grammar.Source.Source src => Language.Symantic.Grammar.Source.Sourced (Language.Symantic.Typing.Type.Type src vs t)
+ Language.Symantic.Compiling.Read: infixr 5 `CtxTyS`
+ Language.Symantic.Compiling.Term: infixr 0 `app`
+ Language.Symantic.Compiling.Term: infixr 5 `CtxTeS`
+ Language.Symantic.Compiling.Term: instance Language.Symantic.Grammar.Source.Source src => Language.Symantic.Grammar.Source.Sourceable (Language.Symantic.Compiling.Term.Term src ss ts vs t)
+ Language.Symantic.Compiling.Term: instance Language.Symantic.Grammar.Source.Source src => Language.Symantic.Grammar.Source.Sourceable (Language.Symantic.Compiling.Term.TermAVT src ss)
+ Language.Symantic.Compiling.Term: instance Language.Symantic.Grammar.Source.Source src => Language.Symantic.Grammar.Source.Sourceable (Language.Symantic.Compiling.Term.TermVT src ss ts)
+ Language.Symantic.Compiling.Term: type family Syms (ss :: [Type]) (term :: Type -> Type) :: Constraint
+ Language.Symantic.Interpreting.Dup: dupList :: [Dup x y a] -> ([x a], [y a])
+ Language.Symantic.Interpreting.Dup: infixl 2 `Dup`
+ Language.Symantic.Interpreting.Dup: instance (GHC.Base.Alternative x, GHC.Base.Alternative y) => GHC.Base.Alternative (Language.Symantic.Interpreting.Dup.Dup x y)
+ Language.Symantic.Interpreting.Dup: instance (GHC.Base.Applicative x, GHC.Base.Applicative y) => GHC.Base.Applicative (Language.Symantic.Interpreting.Dup.Dup x y)
+ Language.Symantic.Interpreting.Dup: instance (GHC.Base.Functor x, GHC.Base.Functor y) => GHC.Base.Functor (Language.Symantic.Interpreting.Dup.Dup x y)
+ Language.Symantic.Transforming.Trans: -- | Return the underlying <tt>tr</tt> of the transformer.
+ Language.Symantic.Typing.Grammar: instance forall k (c :: k) (ts :: [*]). (Language.Symantic.Typing.Kind.KindInjP (Language.Symantic.Typing.Kind.Ty_of_Type (Language.Symantic.Typing.Kind.K c)), Language.Symantic.Typing.Kind.K c Data.Type.Equality.~ Language.Symantic.Typing.Kind.Type_of_Ty (Language.Symantic.Typing.Kind.Ty_of_Type (Language.Symantic.Typing.Kind.K c)), Language.Symantic.Typing.Type.Constable c, Language.Symantic.Typing.Grammar.ModulesTyInj ts) => Language.Symantic.Typing.Grammar.ModulesTyInj (Data.Proxy.Proxy c : ts)
+ Language.Symantic.Typing.Kind: infixr 5 `KiFun`
+ Language.Symantic.Typing.Kind: instance (Language.Symantic.Typing.Kind.KindInjP (Language.Symantic.Typing.Kind.Ty_of_Type k), Language.Symantic.Typing.Kind.Type_of_Ty (Language.Symantic.Typing.Kind.Ty_of_Type k) Data.Type.Equality.~ k) => Language.Symantic.Typing.Kind.KindInj k
+ Language.Symantic.Typing.Kind: instance Language.Symantic.Grammar.Source.Source src => Language.Symantic.Grammar.Source.Sourceable (Language.Symantic.Typing.Kind.Kind src k)
+ Language.Symantic.Typing.Kind: type family Type_of_Ty (t :: Type) :: Type
+ Language.Symantic.Typing.List: infixr 5 ++
+ Language.Symantic.Typing.List: type family Nub (xs :: [k]) :: [k]
+ Language.Symantic.Typing.Type: infix 4 :~~:
+ Language.Symantic.Typing.Type: infixr 5 `TypesS`
+ Language.Symantic.Typing.Type: instance Language.Symantic.Typing.Module.NameTyOf (() :: Constraint)
+ Language.Symantic.Typing.Type: instance Language.Symantic.Typing.Type.ClassInstancesFor (() :: Constraint)
+ Language.Symantic.Typing.Type: instance Language.Symantic.Typing.Type.TypeInstancesFor (() :: Constraint)
+ Language.Symantic.Typing.Type: instance forall k (x :: k) (y :: k). (x Data.Type.Equality.~ y) => x Language.Symantic.Typing.Type.#~ y
+ Language.Symantic.Typing.Type: instance forall kt src (vs :: [*]) (t :: kt). Language.Symantic.Grammar.Source.Source src => Language.Symantic.Grammar.Source.Sourceable (Language.Symantic.Typing.Type.Type src vs t)
+ Language.Symantic.Typing.Type: pattern (:$) :: forall kt src (vs :: [Type]) (t :: kt). () => forall k (f :: k -> kt) (a :: k). t ~# f a => Type src vs f -> Type src vs a -> Type src vs t
+ Language.Symantic.Typing.Type: type family FunArg (fun :: Type) :: Type
+ Language.Symantic.Typing.Variable: infixr 5 `VarS`
+ Language.Symantic.Typing.Variable: type family UnProxy (x :: Type) :: k
- Language.Symantic.Compiling.Beta: Error_Beta_Term_not_a_function :: (TypeVT src) -> Error_Beta src
+ Language.Symantic.Compiling.Beta: Error_Beta_Term_not_a_function :: TypeVT src -> Error_Beta src
- Language.Symantic.Compiling.Beta: Error_Beta_Type_mismatch :: (TypeVT src) -> (TypeVT src) -> Error_Beta src
+ Language.Symantic.Compiling.Beta: Error_Beta_Type_mismatch :: TypeVT src -> TypeVT src -> Error_Beta src
- Language.Symantic.Compiling.Beta: Error_Beta_Unify :: (Error_Unify src) -> Error_Beta src
+ Language.Symantic.Compiling.Beta: Error_Beta_Unify :: Error_Unify src -> Error_Beta src
- Language.Symantic.Compiling.Grammar: gram_term :: forall g. (Gram_Term () '[Proxy (->), Proxy Integer] g) => [CF g ()]
+ Language.Symantic.Compiling.Grammar: gram_term :: forall g. Gram_Term () '[Proxy (->), Proxy Integer] g => [CF g ()]
- Language.Symantic.Compiling.Module: (:=) :: (WithFixity NameTe) -> (forall ts. Term src ss ts vs t) -> DefTerm src ss
+ Language.Symantic.Compiling.Module: (:=) :: WithFixity NameTe -> (forall ts. Term src ss ts vs t) -> DefTerm src ss
- Language.Symantic.Compiling.Module: Error_Module_ambiguous :: (Mod NameTe) -> (Map PathMod NameTe) -> Error_Module
+ Language.Symantic.Compiling.Module: Error_Module_ambiguous :: Mod NameTe -> Map PathMod NameTe -> Error_Module
- Language.Symantic.Compiling.Module: Error_Module_colliding_Term :: (Map PathMod (Set NameTe)) -> Error_Module
+ Language.Symantic.Compiling.Module: Error_Module_colliding_Term :: Map PathMod (Set NameTe) -> Error_Module
- Language.Symantic.Compiling.Module: Error_Module_missing_Term :: (Mod NameTe) -> Error_Module
+ Language.Symantic.Compiling.Module: Error_Module_missing_Term :: Mod NameTe -> Error_Module
- Language.Symantic.Compiling.Module: Token_Term :: (TermAVT src ss) -> Token_Term src ss
+ Language.Symantic.Compiling.Module: Token_Term :: TermAVT src ss -> Token_Term src ss
- Language.Symantic.Compiling.Module: Token_TermVT :: (TermVT src ss '[]) -> Token_Term src ss
+ Language.Symantic.Compiling.Module: Token_TermVT :: TermVT src ss '[] -> Token_Term src ss
- Language.Symantic.Compiling.Module: Token_Term_Abst :: src -> NameTe -> (AST_Type src) -> (AST_Term src ss) -> Token_Term src ss
+ Language.Symantic.Compiling.Module: Token_Term_Abst :: src -> NameTe -> AST_Type src -> AST_Term src ss -> Token_Term src ss
- Language.Symantic.Compiling.Module: Token_Term_Let :: src -> NameTe -> (AST_Term src ss) -> (AST_Term src ss) -> Token_Term src ss
+ Language.Symantic.Compiling.Module: Token_Term_Let :: src -> NameTe -> AST_Term src ss -> AST_Term src ss -> Token_Term src ss
- Language.Symantic.Compiling.Module: Tokenizer :: fixy -> src -> Token_Term src ss -> Tokenizer src ss fixy
+ Language.Symantic.Compiling.Module: Tokenizer :: fixy -> (src -> Token_Term src ss) -> Tokenizer src ss fixy
- Language.Symantic.Compiling.Read: Error_Term_Beta :: (Error_Beta src) -> Error_Term src
+ Language.Symantic.Compiling.Read: Error_Term_Beta :: Error_Beta src -> Error_Term src
- Language.Symantic.Compiling.Read: Error_Term_Type :: (Error_Type src) -> Error_Term src
+ Language.Symantic.Compiling.Read: Error_Term_Type :: Error_Type src -> Error_Term src
- Language.Symantic.Compiling.Read: Error_Term_polymorphic :: (TypeVT src) -> Error_Term src
+ Language.Symantic.Compiling.Read: Error_Term_polymorphic :: TypeVT src -> Error_Term src
- Language.Symantic.Compiling.Read: Error_Term_proofless :: (TypeVT src) -> Error_Term src
+ Language.Symantic.Compiling.Read: Error_Term_proofless :: TypeVT src -> Error_Term src
- Language.Symantic.Compiling.Read: Error_Term_qualified :: (TypeVT src) -> Error_Term src
+ Language.Symantic.Compiling.Read: Error_Term_qualified :: TypeVT src -> Error_Term src
- Language.Symantic.Compiling.Read: ReadTermCF :: forall ts. ReadTerm src ss ts -> ReadTermCF src ss
+ Language.Symantic.Compiling.Read: ReadTermCF :: (forall ts. ReadTerm src ss ts) -> ReadTermCF src ss
- Language.Symantic.Compiling.Read: SrcTe_AST_Term :: (AST_Term (SrcTe inp ss) ss) -> SrcTe inp ss
+ Language.Symantic.Compiling.Read: SrcTe_AST_Term :: AST_Term (SrcTe inp ss) ss -> SrcTe inp ss
- Language.Symantic.Compiling.Read: SrcTe_AST_Type :: (AST_Type (SrcTe inp ss)) -> SrcTe inp ss
+ Language.Symantic.Compiling.Read: SrcTe_AST_Type :: AST_Type (SrcTe inp ss) -> SrcTe inp ss
- Language.Symantic.Compiling.Read: SrcTe_Input :: (Span inp) -> SrcTe inp ss
+ Language.Symantic.Compiling.Read: SrcTe_Input :: Span inp -> SrcTe inp ss
- Language.Symantic.Compiling.Read: SrcTe_Kind :: (KindK (SrcTe inp ss)) -> SrcTe inp ss
+ Language.Symantic.Compiling.Read: SrcTe_Kind :: KindK (SrcTe inp ss) -> SrcTe inp ss
- Language.Symantic.Compiling.Read: SrcTe_Type :: (TypeVT (SrcTe inp ss)) -> SrcTe inp ss
+ Language.Symantic.Compiling.Read: SrcTe_Type :: TypeVT (SrcTe inp ss) -> SrcTe inp ss
- Language.Symantic.Compiling.Term: TermT :: (Term src ss ts vs t) -> TermT src ss ts vs
+ Language.Symantic.Compiling.Term: TermT :: Term src ss ts vs t -> TermT src ss ts vs
- Language.Symantic.Compiling.Term: TermVT :: (Term src ss ts vs t) -> TermVT src ss ts
+ Language.Symantic.Compiling.Term: TermVT :: Term src ss ts vs t -> TermVT src ss ts
- Language.Symantic.Interpreting.Dup: Dup :: term1 a -> term2 a -> Dup term1 term2 a
+ Language.Symantic.Interpreting.Dup: Dup :: repr1 a -> repr2 a -> Dup repr1 repr2 a
- Language.Symantic.Interpreting.Dup: [dup_1] :: Dup term1 term2 a -> term1 a
+ Language.Symantic.Interpreting.Dup: [dup_1] :: Dup repr1 repr2 a -> repr1 a
- Language.Symantic.Interpreting.Dup: [dup_2] :: Dup term1 term2 a -> term2 a
+ Language.Symantic.Interpreting.Dup: [dup_2] :: Dup repr1 repr2 a -> repr2 a
- Language.Symantic.Interpreting.Dup: data Dup term1 term2 a
+ Language.Symantic.Interpreting.Dup: data Dup repr1 repr2 a
- Language.Symantic.Interpreting.Dup: dup0 :: (cl r, cl s) => (forall term. cl term => term a) -> Dup r s a
+ Language.Symantic.Interpreting.Dup: dup0 :: (cl x, cl y) => (forall repr. cl repr => repr a) -> Dup x y a
- Language.Symantic.Interpreting.Dup: dup1 :: (cl r, cl s) => (forall term. cl term => term a -> term b) -> Dup r s a -> Dup r s b
+ Language.Symantic.Interpreting.Dup: dup1 :: (cl x, cl y) => (forall repr. cl repr => repr a -> repr b) -> Dup x y a -> Dup x y b
- Language.Symantic.Interpreting.Dup: dup2 :: (cl r, cl s) => (forall term. cl term => term a -> term b -> term c) -> Dup r s a -> Dup r s b -> Dup r s c
+ Language.Symantic.Interpreting.Dup: dup2 :: (cl x, cl y) => (forall repr. cl repr => repr a -> repr b -> repr c) -> Dup x y a -> Dup x y b -> Dup x y c
- Language.Symantic.Interpreting.Dup: dup3 :: (cl r, cl s) => (forall term. cl term => term a -> term b -> term c -> term d) -> Dup r s a -> Dup r s b -> Dup r s c -> Dup r s d
+ Language.Symantic.Interpreting.Dup: dup3 :: (cl x, cl y) => (forall repr. cl repr => repr a -> repr b -> repr c -> repr d) -> Dup x y a -> Dup x y b -> Dup x y c -> Dup x y d
- Language.Symantic.Interpreting.View: View :: (Infix, Side) -> DepthLam -> Text -> View a
+ Language.Symantic.Interpreting.View: View :: ((Infix, Side) -> DepthLam -> Text) -> View a
- Language.Symantic.Transforming.Trans: trans1 :: Trans tr => (UnT tr a -> UnT tr b) -> (tr a -> tr b)
+ Language.Symantic.Transforming.Trans: trans1 :: Trans tr => (UnT tr a -> UnT tr b) -> tr a -> tr b
- Language.Symantic.Transforming.Trans: trans2 :: Trans tr => (UnT tr a -> UnT tr b -> UnT tr c) -> (tr a -> tr b -> tr c)
+ Language.Symantic.Transforming.Trans: trans2 :: Trans tr => (UnT tr a -> UnT tr b -> UnT tr c) -> tr a -> tr b -> tr c
- Language.Symantic.Transforming.Trans: trans3 :: Trans tr => (UnT tr a -> UnT tr b -> UnT tr c -> UnT tr d) -> (tr a -> tr b -> tr c -> tr d)
+ Language.Symantic.Transforming.Trans: trans3 :: Trans tr => (UnT tr a -> UnT tr b -> UnT tr c -> UnT tr d) -> tr a -> tr b -> tr c -> tr d
- Language.Symantic.Typing.Document: docConst :: Textable d => Imports NameTy -> Const src c -> d
+ Language.Symantic.Typing.Document: docConst :: Monoid d => DocFrom (Word Char) d => DocFrom (Word Text) d => Imports NameTy -> Const src c -> d
- Language.Symantic.Typing.Document: docMod :: Textable d => (a -> d) -> Mod a -> d
+ Language.Symantic.Typing.Document: docMod :: Monoid d => DocFrom (Word Char) d => DocFrom (Word Text) d => (a -> d) -> Mod a -> d
- Language.Symantic.Typing.Document: docNameTy :: Textable d => NameTy -> d
+ Language.Symantic.Typing.Document: docNameTy :: DocFrom (Word Text) d => NameTy -> d
- Language.Symantic.Typing.Document: docParen :: Textable d => d -> d
+ Language.Symantic.Typing.Document: docParen :: Spaceable d => DocFrom (Word Char) d => d -> d
- Language.Symantic.Typing.Document: docPathMod :: Textable d => PathMod -> d
+ Language.Symantic.Typing.Document: docPathMod :: Monoid d => DocFrom (Word Char) d => DocFrom (Word Text) d => PathMod -> d
- Language.Symantic.Typing.Document: docType :: forall src vs t d. Semigroup d => Textable d => Colorable d => Config_Doc_Type -> Precedence -> Type src vs t -> d
+ Language.Symantic.Typing.Document: docType :: forall src vs t d. Semigroup d => DocFrom (Word Char) d => DocFrom (Word Text) d => Spaceable d => Colorable16 d => Config_Doc_Type -> Precedence -> Type src vs t -> d
- Language.Symantic.Typing.Document: docTypes :: forall src vs ts d. Semigroup d => Textable d => Colorable d => Config_Doc_Type -> Types src vs ts -> d
+ Language.Symantic.Typing.Document: docTypes :: forall src vs ts d. Semigroup d => DocFrom (Word Char) d => DocFrom (Word Text) d => Spaceable d => Colorable16 d => Config_Doc_Type -> Types src vs ts -> d
- Language.Symantic.Typing.Grammar: Error_Type_Con_Kind :: (Con_Kind src) -> Error_Type src
+ Language.Symantic.Typing.Grammar: Error_Type_Con_Kind :: Con_Kind src -> Error_Type src
- Language.Symantic.Typing.Grammar: Error_Type_Constant_unknown :: (At src (Mod NameTy)) -> Error_Type src
+ Language.Symantic.Typing.Grammar: Error_Type_Constant_unknown :: Sourced src (Mod NameTy) -> Error_Type src
- Language.Symantic.Typing.Grammar: Token_Type_Const :: (TypeTLen src) -> Token_Type src
+ Language.Symantic.Typing.Grammar: Token_Type_Const :: TypeTLen src -> Token_Type src
- Language.Symantic.Typing.Grammar: Token_Type_Var :: (At src NameVar) -> Token_Type src
+ Language.Symantic.Typing.Grammar: Token_Type_Var :: Sourced src NameVar -> Token_Type src
- Language.Symantic.Typing.Kind: Con_Kind_Arrow :: (KindK src) -> Con_Kind src
+ Language.Symantic.Typing.Kind: Con_Kind_Arrow :: KindK src -> Con_Kind src
- Language.Symantic.Typing.Kind: Con_Kind_Eq :: (KindK src) -> (KindK src) -> Con_Kind src
+ Language.Symantic.Typing.Kind: Con_Kind_Eq :: KindK src -> KindK src -> Con_Kind src
- Language.Symantic.Typing.Kind: KindK :: (Kind src k) -> KindK src
+ Language.Symantic.Typing.Kind: KindK :: Kind src k -> KindK src
- Language.Symantic.Typing.List: shiftLen :: forall t b a. Len a -> Len (a ++ b) -> Len (a ++ t : b)
+ Language.Symantic.Typing.List: shiftLen :: forall t b a. Len a -> Len (a ++ b) -> Len (a ++ (t : b))
- Language.Symantic.Typing.Module: Imports :: (Map PathMod (MapFixity (Map name PathMod))) -> Imports name
+ Language.Symantic.Typing.Module: Imports :: Map PathMod (MapFixity (Map name PathMod)) -> Imports name
- Language.Symantic.Typing.Show: stringDocTerm :: Term -> String
+ Language.Symantic.Typing.Show: stringDocTerm :: PlainText (Plain Builder) -> String
- Language.Symantic.Typing.Type: ConstC :: (Const src c) -> ConstC src
+ Language.Symantic.Typing.Type: ConstC :: Const src c -> ConstC src
- Language.Symantic.Typing.Type: TypeK :: (Type src vs t) -> TypeK src vs kt
+ Language.Symantic.Typing.Type: TypeK :: Type src vs t -> TypeK src vs kt
- Language.Symantic.Typing.Type: TypeT :: (Type src vs t) -> TypeT src vs
+ Language.Symantic.Typing.Type: TypeT :: Type src vs t -> TypeT src vs
- Language.Symantic.Typing.Type: TypeVT :: (Type src vs t) -> TypeVT src
+ Language.Symantic.Typing.Type: TypeVT :: Type src vs t -> TypeVT src
- Language.Symantic.Typing.Type: [HRefl] :: a :~~: a
+ Language.Symantic.Typing.Type: [HRefl] :: forall k1 k2 (a :: k1) (b :: k2). () => a :~~: a
- Language.Symantic.Typing.Type: [Refl] :: a :~: a
+ Language.Symantic.Typing.Type: [Refl] :: forall k (a :: k) (b :: k). () => a :~: a
- Language.Symantic.Typing.Type: data (:~:) (a :: k) (b :: k) :: forall k. () => k -> k -> *
+ Language.Symantic.Typing.Type: data (:~:) (a :: k) (b :: k) :: forall k. () => k -> k -> Type
- Language.Symantic.Typing.Type: data (:~~:) (a :: k1) (b :: k2) :: forall k1 k2. () => k1 -> k2 -> *
+ Language.Symantic.Typing.Type: data (:~~:) (a :: k1) (b :: k2) :: forall k1 k2. () => k1 -> k2 -> Type
- Language.Symantic.Typing.Type: proj_ConstKi :: forall kc (c :: kc) u src. Typeable c => (kc ~ Type_of_Ty (Ty_of_Type kc)) => KindInjP (Ty_of_Type kc) => Const src u -> Maybe (c :~~: u)
+ Language.Symantic.Typing.Type: proj_ConstKi :: forall kc (c :: kc) u src. Typeable c => kc ~ Type_of_Ty (Ty_of_Type kc) => KindInjP (Ty_of_Type kc) => Const src u -> Maybe (c :~~: u)
- Language.Symantic.Typing.Type: proj_ConstKiTy :: forall kc (c :: kc) u src vs. Typeable c => (kc ~ Type_of_Ty (Ty_of_Type kc)) => KindInjP (Ty_of_Type kc) => Type src vs u -> Maybe (c :~~: u)
+ Language.Symantic.Typing.Type: proj_ConstKiTy :: forall kc (c :: kc) u src vs. Typeable c => kc ~ Type_of_Ty (Ty_of_Type kc) => KindInjP (Ty_of_Type kc) => Type src vs u -> Maybe (c :~~: u)
- Language.Symantic.Typing.Unify: Error_Unify_Const_mismatch :: (TypeVT src) -> (TypeVT src) -> Error_Unify src
+ Language.Symantic.Typing.Unify: Error_Unify_Const_mismatch :: TypeVT src -> TypeVT src -> Error_Unify src
- Language.Symantic.Typing.Unify: Error_Unify_Kind :: (Con_Kind src) -> Error_Unify src
+ Language.Symantic.Typing.Unify: Error_Unify_Kind :: Con_Kind src -> Error_Unify src
- Language.Symantic.Typing.Unify: Error_Unify_Kind_mismatch :: (KindK src) -> (KindK src) -> Error_Unify src
+ Language.Symantic.Typing.Unify: Error_Unify_Kind_mismatch :: KindK src -> KindK src -> Error_Unify src
- Language.Symantic.Typing.Unify: Error_Unify_Var_loop :: IndexVar -> (TypeVT src) -> Error_Unify src
+ Language.Symantic.Typing.Unify: Error_Unify_Var_loop :: IndexVar -> TypeVT src -> Error_Unify src
- Language.Symantic.Typing.Unify: Error_Unify_mismatch :: (TypeVT src) -> (TypeVT src) -> Error_Unify src
+ Language.Symantic.Typing.Unify: Error_Unify_mismatch :: TypeVT src -> TypeVT src -> Error_Unify src
- Language.Symantic.Typing.Unify: Subst :: (Map IndexVar (VT src vs)) -> Subst src vs
+ Language.Symantic.Typing.Unify: Subst :: Map IndexVar (VT src vs) -> Subst src vs
- Language.Symantic.Typing.Unify: VT :: (Var src vs t) -> (Type src vs t) -> VT src vs
+ Language.Symantic.Typing.Unify: VT :: Var src vs t -> Type src vs t -> VT src vs
- Language.Symantic.Typing.Variable: EVar :: (Var src vs v) -> EVar src vs
+ Language.Symantic.Typing.Variable: EVar :: Var src vs v -> EVar src vs
- Language.Symantic.Typing.Variable: EVars :: (Vars src vs) -> EVars src
+ Language.Symantic.Typing.Variable: EVars :: Vars src vs -> EVars src
Files
- Language/Symantic/Compiling/Term.hs +6/−6
- Language/Symantic/Interpreting/Dup.hs +54/−29
- Language/Symantic/Interpreting/View.hs +4/−4
- Language/Symantic/Typing/Document.hs +58/−37
- Language/Symantic/Typing/Grammar.hs +6/−6
- Language/Symantic/Typing/Kind.hs +1/−1
- Language/Symantic/Typing/Read.hs +2/−2
- Language/Symantic/Typing/Show.hs +6/−5
- Language/Symantic/Typing/Type.hs +1/−1
- stack.yaml +2/−2
- symantic.cabal +9/−9
Language/Symantic/Compiling/Term.hs view
@@ -31,7 +31,7 @@ -- Source type instance SourceOf (Term src ss ts vs t) = src-instance Source src => Sourced (Term src ss ts vs t) where+instance Source src => Sourceable (Term src ss ts vs t) where sourceOf (Term _q t _te) = sourceOf t setSource (Term q t te) src = Term q (setSource t src) te @@ -75,7 +75,7 @@ instance Source src => Show (TermVT src ss ts) where showsPrec p (TermVT t) = showsPrec p t type instance SourceOf (TermVT src ss ts) = src-instance Source src => Sourced (TermVT src ss ts) where+instance Source src => Sourceable (TermVT src ss ts) where sourceOf (TermVT t) = sourceOf t setSource (TermVT t) src = TermVT $ setSource t src @@ -88,7 +88,7 @@ -- | Like 'TermVT', but 'CtxTe'-free. data TermAVT src ss = forall vs t. TermAVT (forall ts. Term src ss ts vs t) type instance SourceOf (TermAVT src ss) = src-instance Source src => Sourced (TermAVT src ss) where+instance Source src => Sourceable (TermAVT src ss) where sourceOf (TermAVT t) = sourceOf t setSource (TermAVT t) src = TermAVT (setSource t src) instance Source src => Eq (TermAVT src ss) where@@ -257,12 +257,12 @@ instance Sym_Lambda View where apply = View $ \_po _v -> "($)" app (View a1) (View a2) = View $ \po v ->- parenInfix po op $+ pairIfNeeded pairParen po op $ a1 (op, SideL) v <> " " <> a2 (op, SideR) v where op = infixN 10 lam f = View $ \po v -> let x = "x" <> Text.pack (show v) in- parenInfix po op $+ pairIfNeeded pairParen po op $ "\\" <> x <> " -> " <> unView (f (View $ \_po _v -> x)) (op, SideL) (succ v) where op = infixN 1@@ -271,7 +271,7 @@ let_ x f = View $ \po v -> let x' = "x" <> Text.pack (show v) in- parenInfix po op $+ pairIfNeeded pairParen po op $ "let" <> " " <> x' <> " = " <> unView x (infixN 0, SideL) (succ v) <> " in " <> unView (f (View $ \_po _v -> x')) (op, SideL) (succ v)
Language/Symantic/Interpreting/Dup.hs view
@@ -1,51 +1,76 @@ {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE Rank2Types #-} -- | Interpreter to duplicate the representation of an expression -- in order to evaluate it with different interpreters. -- -- NOTE: this is a more verbose, less clear, -- and maybe less efficient alternative--- to maintaining the universal polymorphism of @term@--- at parsing time as done with 'Term';--- it is mainly here for the sake of curiosity.+-- to maintaining the universal polymorphism of @repr@+-- either using @NoMonomorphismRestriction@ when writing an EDSL,+-- or with a @forall repr.@ within a data type+-- when writing a DSL; as is done when parsing 'Term' in this library;+-- it is thus mainly here for the sake of curiosity. module Language.Symantic.Interpreting.Dup where --- | Interpreter's data.-data Dup term1 term2 a+import Control.Applicative (Applicative(..), Alternative(..))+import Data.Functor (Functor(..))++-- * Type 'Dup'+-- | Duplicate an implicitly generated representation.+--+-- Useful to combine two symantic interpreters into one.+data Dup repr1 repr2 a = Dup- { dup_1 :: term1 a- , dup_2 :: term2 a+ { dup_1 :: repr1 a+ , dup_2 :: repr2 a }+infixl 2 `Dup`+instance (Functor x, Functor y) => Functor (Dup x y) where+ fmap f (x`Dup`y) = fmap f x `Dup` fmap f y+instance (Applicative x, Applicative y) => Applicative (Dup x y) where+ pure a = pure a `Dup` pure a+ (f`Dup`g) <*> (x`Dup`y) = f <*> x `Dup` g <*> y+ (f`Dup`g) <* (x`Dup`y) = f <* x `Dup` g <* y+ (f`Dup`g) *> (x`Dup`y) = f *> x `Dup` g *> y+instance (Alternative x, Alternative y) => Alternative (Dup x y) where+ empty = empty `Dup` empty+ (f`Dup`g) <|> (x`Dup`y) = f <|> x `Dup` g <|> y+ many (x`Dup`y) = many x `Dup` many y+ some (x`Dup`y) = some x `Dup` some y -dup0- :: (cl r, cl s)- => (forall term. cl term => term a)- -> Dup r s a+-- * Helpers+-- | To be used with the @TypeApplications@ language extension:+-- @+-- dup0 \@Sym_Foo foo+-- @+dup0 :: (cl x, cl y) => (forall repr. cl repr => repr a) -> Dup x y a dup0 f = f `Dup` f+{-# INLINE dup0 #-} -dup1- :: (cl r, cl s)- => (forall term. cl term => term a -> term b)- -> Dup r s a- -> Dup r s b+dup1 ::+ (cl x, cl y) =>+ (forall repr. cl repr => repr a -> repr b) ->+ Dup x y a -> Dup x y b dup1 f (a1 `Dup` a2) = f a1 `Dup` f a2+{-# INLINE dup1 #-} -dup2- :: (cl r, cl s)- => (forall term. cl term => term a -> term b -> term c)- -> Dup r s a- -> Dup r s b- -> Dup r s c+dup2 ::+ (cl x, cl y) =>+ (forall repr. cl repr => repr a -> repr b -> repr c) ->+ Dup x y a -> Dup x y b -> Dup x y c dup2 f (a1 `Dup` a2) (b1 `Dup` b2) = f a1 b1 `Dup` f a2 b2+{-# INLINE dup2 #-} -dup3- :: (cl r, cl s)- => (forall term. cl term => term a -> term b -> term c -> term d)- -> Dup r s a- -> Dup r s b- -> Dup r s c- -> Dup r s d+dup3 ::+ (cl x, cl y) =>+ (forall repr. cl repr => repr a -> repr b -> repr c -> repr d)+ -> Dup x y a -> Dup x y b -> Dup x y c -> Dup x y d dup3 f (a1 `Dup` a2) (b1 `Dup` b2) (c1 `Dup` c2) = f a1 b1 c1 `Dup` f a2 b2 c2+{-# INLINE dup3 #-}++dupList :: [Dup x y a] -> ([x a], [y a])+dupList = foldr (\(a`Dup`b) ~(as, bs) -> (a:as, b:bs)) ([],[])
Language/Symantic/Interpreting/View.hs view
@@ -33,7 +33,7 @@ view1 :: Text -> View a1 -> View a view1 name (View a1) = View $ \po v ->- parenInfix po op $+ pairIfNeeded pairParen po op $ Text.intercalate " " [ name , a1 (op, SideL) v@@ -43,7 +43,7 @@ view2 :: Text -> View a1 -> View a2 -> View a view2 name (View a1) (View a2) = View $ \po v ->- parenInfix po op $+ pairIfNeeded pairParen po op $ Text.intercalate " " [ name , a1 (op, SideL) v@@ -54,7 +54,7 @@ view3 :: Text -> View a1 -> View a2 -> View a3 -> View a view3 name (View a1) (View a2) (View a3) = View $ \po v ->- parenInfix po op $+ pairIfNeeded pairParen po op $ Text.intercalate " " [ name , a1 (op, SideL) v@@ -66,7 +66,7 @@ viewInfix :: Text -> Infix -> View a1 -> View a2 -> View a viewInfix name op (View a1) (View a2) = View $ \po v ->- parenInfix po op $+ pairIfNeeded pairParen po op $ Text.intercalate " " [ a1 (op, SideL) v , name
Language/Symantic/Typing/Document.hs view
@@ -6,15 +6,18 @@ import Data.Function (id) import Data.Map.Strict (Map) import Data.Maybe (fromMaybe)+import Data.Monoid (Monoid(..)) import Data.Semigroup (Semigroup(..)) import Data.Set (Set)+import Data.Text (Text) import Data.Typeable+import Symantic.Document (DocFrom(..)) import qualified Data.List as L import qualified Data.Map.Strict as Map import qualified Data.Set as Set import qualified Data.Text as T+import qualified Symantic.Document as Doc -import qualified Language.Symantic.Document.Sym as Doc import Language.Symantic.Grammar import Language.Symantic.Typing.Kind import Language.Symantic.Typing.Variable@@ -45,8 +48,10 @@ docType :: forall src vs t d. Semigroup d =>- Doc.Textable d =>- Doc.Colorable d =>+ DocFrom (Doc.Word Char) d =>+ DocFrom (Doc.Word Text) d =>+ Doc.Spaceable d =>+ Doc.Colorable16 d => Config_Doc_Type -> Precedence -> Type src vs t -> d@@ -64,7 +69,7 @@ let iv = indexVar v in case Map.lookup iv v2n of Nothing -> error "[BUG] docType: variable name missing"- Just n -> Doc.textH n+ Just n -> docFrom (Doc.Word n) -- Const go _v2n _po (TyConst _src _vs c@Const{}) = (if isNameTyOp c then docParen else id) $@@ -72,7 +77,8 @@ -- [] Const go v2n _po (TyApp _ (TyConst _ _ f@Const{}) a) | Just HRefl <- proj_ConstKi @(K []) @[] f =- "[" <> go v2n (infixB SideL 0, SideL) a <> "]"+ Doc.between (docFrom (Doc.Word '[')) (docFrom (Doc.Word ']')) $+ go v2n (infixB SideL 0, SideL) a -- Infix Const go v2n po (TyApp _ (TyApp _ (TyConst _ _ f@Const{}) a) b) -- () =>@@ -80,12 +86,13 @@ , Just HRefl <- proj_ConstKi @(K (#>)) @(#>) f = go v2n po b | Just (Fixity2 op) <- fixityOf f =- (if needsParenInfix po op then docParen else id) $+ (if isPairNeeded po op then docParen else id) $ go v2n (op, SideL) a <> prettyConst f <> go v2n (op, SideR) b where- d_op = Doc.yellower+ d_op :: Text -> d+ d_op = Doc.yellower . docFrom . Doc.Word prettyConst :: forall k c. Const src (c::k) -> d prettyConst c | Just HRefl <- proj_ConstKi @(K (#>)) @(#>) c = Doc.space <> d_op "=>" <> Doc.space prettyConst c | Just HRefl <- proj_ConstKi @(K (#)) @(#) c = d_op "," <> Doc.space@@ -102,18 +109,18 @@ -- TyApp go v2n po (TyApp _src f a) = let op = infixL 11 in- (if needsParenInfix po op then docParen else id) $+ (if isPairNeeded po op then docParen else id) $ go v2n (op, SideL) f <> Doc.space <> go v2n (op, SideR) a -- TyFam go v2n po (TyFam _src _len fam args) = let op = infixL 11 in- (if needsParenInfix po op then docParen else id) $+ (if isPairNeeded po op then docParen else id) $ docConst imps fam <> foldlTys (\t acc -> Doc.space <> go v2n (op, SideL) t <> acc- ) args Doc.empty+ ) args mempty -- | Return a 'Map' associating a distinct 'Name' -- for all the variables of the given 'Type'.@@ -169,25 +176,31 @@ docTypes :: forall src vs ts d. Semigroup d =>- Doc.Textable d =>- Doc.Colorable d =>+ DocFrom (Doc.Word Char) d =>+ DocFrom (Doc.Word Text) d =>+ Doc.Spaceable d =>+ Doc.Colorable16 d => Config_Doc_Type -> Types src vs ts -> d docTypes conf tys =- d_op (Doc.charH '[') <> go tys <> d_op (Doc.charH ']')+ d_op (docFrom (Doc.Word '[')) <> go tys <> d_op (docFrom (Doc.Word ']')) where d_op = Doc.yellower go :: forall xs. Types src vs xs -> d- go TypesZ = Doc.empty+ go TypesZ = mempty go (TypesS t0 (TypesS t1 ts)) = docType conf 10 t0 <>- d_op (Doc.charH ',') <> Doc.space <>+ d_op (docFrom (Doc.Word ',')) <> Doc.space <> docType conf 10 t1 <> go ts go (TypesS t ts) = docType conf 10 t <> go ts -- * Document 'Const'-docConst :: Doc.Textable d => Imports NameTy -> Const src c -> d+docConst ::+ Monoid d =>+ DocFrom (Doc.Word Char) d =>+ DocFrom (Doc.Word Text) d =>+ Imports NameTy -> Const src c -> d docConst imps c@Const{} = docMod docNameTy $ maybe mn (`Mod` n) $@@ -197,43 +210,51 @@ mn@(m `Mod` n) = nameTyOf c -- * Document 'NameTy'-docNameTy :: Doc.Textable d => NameTy -> d-docNameTy (NameTy t) = Doc.textH t+docNameTy :: DocFrom (Doc.Word Text) d => NameTy -> d+docNameTy (NameTy t) = docFrom (Doc.Word t) -- * Document 'Mod'-docMod :: Doc.Textable d => (a -> d) -> Mod a -> d+docMod ::+ Monoid d =>+ DocFrom (Doc.Word Char) d =>+ DocFrom (Doc.Word Text) d =>+ (a -> d) -> Mod a -> d docMod a2d ([] `Mod` a) = a2d a-docMod a2d (m `Mod` a) = docPathMod m <> (Doc.charH '.') <> a2d a+docMod a2d (m `Mod` a) = docPathMod m <> (docFrom (Doc.Word '.')) <> a2d a -- * Document 'PathMod'-docPathMod :: Doc.Textable d => PathMod -> d+docPathMod ::+ Monoid d =>+ DocFrom (Doc.Word Char) d =>+ DocFrom (Doc.Word Text) d =>+ PathMod -> d docPathMod (p::PathMod) =- Doc.catH $- L.intersperse (Doc.charH '.') $- (\(NameMod n) -> Doc.textH n) <$> p+ mconcat $+ L.intersperse (docFrom (Doc.Word '.')) $+ (\(NameMod n) -> docFrom (Doc.Word n)) <$> p -docParen :: Doc.Textable d => d -> d-docParen = Doc.between (Doc.charH '(') (Doc.charH ')')+docParen :: Doc.Spaceable d => DocFrom (Doc.Word Char) d => d -> d+docParen = Doc.between (docFrom (Doc.Word '(')) (docFrom (Doc.Word ')')) {- docModules :: Source src => Doc.Textable d =>- Doc.Colorable d =>+ Doc.Colorable16 d => Doc.Decorationable d => ReadTe src ss => Sym.Modules src ss -> d docModules (Sym.Modules mods) = Map.foldrWithKey (\p m doc -> docModule p m <> doc)- Doc.empty+ mempty mods docModule :: forall src ss d. Source src => Doc.Textable d =>- Doc.Colorable d =>+ Doc.Colorable16 d => Doc.Decorationable d => ReadTe src ss => Sym.PathMod -> Sym.Module src ss -> d@@ -258,13 +279,13 @@ Doc.space <> Doc.bold (Doc.yellower "::") <> Doc.space <> docTokenTerm (t Sym.noSource) <> Doc.eol <> doc)- Doc.empty+ mempty docTokenTerm :: forall src ss d. Source src => Doc.Textable d =>- Doc.Colorable d =>+ Doc.Colorable16 d => ReadTe src ss => Sym.Token_Term src ss -> d docTokenTerm t =@@ -276,25 +297,25 @@ { config_Doc_Type_vars_numbering = False } 0 $ Sym.typeOfTerm te -docFixityInfix :: (Doc.Decorationable t, Doc.Colorable t, Doc.Textable t) => Infix -> t+docFixityInfix :: (Doc.Decorationable t, Doc.Colorable16 t, Doc.Textable t) => Infix -> t docFixityInfix = \case- Sym.Infix Nothing 5 -> Doc.empty+ Sym.Infix Nothing 5 -> mempty Sym.Infix a p -> let docAssoc = \case Sym.AssocL -> "l" Sym.AssocR -> "r" Sym.AssocB Sym.SideL -> "l" Sym.AssocB Sym.SideR -> "r" in- Doc.magenta $ " infix" <> maybe Doc.empty docAssoc a <>+ Doc.magenta $ " infix" <> maybe mempty docAssoc a <> Doc.space <> Doc.bold (Doc.bluer (Doc.int p))-docFixityPrefix :: (Doc.Decorationable t, Doc.Colorable t, Doc.Textable t) => Unifix -> t+docFixityPrefix :: (Doc.Decorationable t, Doc.Colorable16 t, Doc.Textable t) => Unifix -> t docFixityPrefix p = Doc.magenta $ " prefix " <> Doc.bold (Doc.bluer (Doc.int $ Sym.unifix_prece p))-docFixityPostfix :: (Doc.Decorationable t, Doc.Colorable t, Doc.Textable t) => Unifix -> t+docFixityPostfix :: (Doc.Decorationable t, Doc.Colorable16 t, Doc.Textable t) => Unifix -> t docFixityPostfix p = Doc.magenta $ " postfix " <> Doc.bold (Doc.bluer (Doc.int $ Sym.unifix_prece p)) docPathTe :: Doc.Textable d =>- Doc.Colorable d =>+ Doc.Colorable16 d => Sym.PathMod -> Sym.NameTe -> d docPathTe (ms::Sym.PathMod) (Sym.NameTe n) = Doc.catH $
Language/Symantic/Typing/Grammar.hs view
@@ -29,18 +29,18 @@ -- ** Type 'Token_Type' data Token_Type src = Token_Type_Const (TypeTLen src)- | Token_Type_Var (At src NameVar)+ | Token_Type_Var (Sourced src NameVar) -- deriving (Eq, Show) instance Source src => Eq (Token_Type src) where Token_Type_Const (TypeTLen x) == Token_Type_Const (TypeTLen y) = x LenZ == y LenZ- Token_Type_Var (At _ x) == Token_Type_Var (At _ y) = x == y+ Token_Type_Var (Sourced _ x) == Token_Type_Var (Sourced _ y) = x == y _ == _ = False instance (Source src, Show (TypeT src '[])) => Show (Token_Type src) where showsPrec p (Token_Type_Const x) = showParen (p >= 10) $ showString "Token_Type_Const" . showChar ' ' . showsPrec 10 x- showsPrec p (Token_Type_Var (At _ x)) =+ showsPrec p (Token_Type_Var (Sourced _ x)) = showParen (p >= 10) $ showString "Token_Type_Var" . showChar ' ' . showsPrec 10 x@@ -240,7 +240,7 @@ g_type_var :: CF g (AST_Type src) g_type_var = rule "TypeVar" $ lexeme $ source $- (\n ns src -> BinTree0 $ Token_Type_Var $ At src $ fromString $ n:ns)+ (\n ns src -> BinTree0 $ Token_Type_Var $ Sourced src $ fromString $ n:ns) <$> unicat (Unicat Char.LowercaseLetter) <*> many (choice $ unicat <$> [Unicat_Letter, Unicat_Number]) @@ -270,11 +270,11 @@ let m' = fromMaybe m $ lookupImports FixyInfix name is in case Map.lookup (m' `Mod` n) ms of Just t -> Right t- Nothing -> Left $ Error_Type_Constant_unknown $ At src name+ Nothing -> Left $ Error_Type_Constant_unknown $ Sourced src name -- * Type 'Error_Type' data Error_Type src- = Error_Type_Constant_unknown (At src (Mod NameTy))+ = Error_Type_Constant_unknown (Sourced src (Mod NameTy)) | Error_Type_Con_Kind (Con_Kind src) deriving (Eq, Show) instance ErrorInj (Error_Type src) (Error_Type src) where
Language/Symantic/Typing/Kind.hs view
@@ -18,7 +18,7 @@ infixr 5 `KiFun` type instance SourceOf (Kind src k) = src-instance Source src => Sourced (Kind src k) where+instance Source src => Sourceable (Kind src k) where sourceOf (KiType src) = src sourceOf (KiConstraint src) = src sourceOf (KiFun src _a _b) = src
Language/Symantic/Typing/Read.hs view
@@ -32,7 +32,7 @@ readTyVars vs (BinTree0 (Token_Type_Const (TypeTLen t))) = Right $ t (lenVars vs) -- readTyName is ms (sourceInj ast) (lenVars vs) name-readTyVars vs (BinTree0 (Token_Type_Var (At src name))) =+readTyVars vs (BinTree0 (Token_Type_Var (Sourced src name))) = case lookupVars name vs of Just (EVar v) -> Right $ TypeT $ TyVar src name v Nothing -> error "[BUG] readTyVars: lookupVars failed"@@ -45,7 +45,7 @@ -- | Return the given 'EVars' augmented by the ones used in given 'AST_Type'. readVars :: Source src => EVars src -> AST_Type src -> EVars src-readVars evs@(EVars vs) (BinTree0 (Token_Type_Var (At _src name))) =+readVars evs@(EVars vs) (BinTree0 (Token_Type_Var (Sourced _src name))) = case lookupVars name vs of Just{} -> evs Nothing -> do
Language/Symantic/Typing/Show.hs view
@@ -3,19 +3,20 @@ module Language.Symantic.Typing.Show where import qualified Data.Text.Lazy as TL+import qualified Data.Text.Lazy.Builder as TLB -import qualified Language.Symantic.Document.Term as Doc+import qualified Symantic.Document as Doc import Language.Symantic.Grammar import Language.Symantic.Typing.Type import Language.Symantic.Typing.Module import Language.Symantic.Typing.Document -stringDocTerm :: Doc.Term -> String+stringDocTerm :: Doc.PlainText (Doc.Plain TLB.Builder) -> String stringDocTerm = TL.unpack .- Doc.textTerm .- Doc.withColorable False .- Doc.withDecorable False+ TLB.toLazyText .+ Doc.runPlain .+ Doc.runPlainText showType :: Config_Doc_Type -> Type src vs t -> String showType conf ty = stringDocTerm $ docType conf 0 ty
Language/Symantic/Typing/Type.hs view
@@ -72,7 +72,7 @@ testEquality = eqType type instance SourceOf (Type src vs t) = src-instance Source src => Sourced (Type src vs t) where+instance Source src => Sourceable (Type src vs t) where sourceOf (TyConst src _l _c) = src sourceOf (TyApp src _f _a) = src sourceOf (TyVar src _n _v) = src
stack.yaml view
@@ -1,7 +1,7 @@-resolver: lts-12.8+resolver: lts-13.19 packages: - '.' - location: '../symantic-grammar' extra-dep: true-- location: '../symantic-document'+- location: '../../symantic-document' extra-dep: true
symantic.cabal view
@@ -2,7 +2,7 @@ -- PVP: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 6.3.2.20180208+version: 6.3.3.20190614 synopsis: Library for Typed Tagless-Final Higher-Order Composable DSL description: This is an experimental library for composing, parsing, typing, compiling, transforming and interpreting@@ -19,8 +19,8 @@ -- homepage: build-type: Simple-cabal-version: >= 1.24-tested-with: GHC==8.4.3+cabal-version: 1.24+tested-with: GHC==8.4.4 extra-source-files: stack.yaml extra-tmp-files:@@ -82,9 +82,9 @@ -fhide-source-paths build-depends: symantic-grammar- , symantic-document- , base >= 4.6 && < 5- , containers >= 0.5- , mono-traversable >= 1.0- , transformers >= 0.5- , text >= 1.2+ , symantic-document >= 1.0+ , base >= 4.6 && < 5+ , containers >= 0.5+ , mono-traversable >= 1.0+ , transformers >= 0.5+ , text >= 1.2