Polish comments.
authorJulien Moutinho <julm+symantic@autogeree.net>
Sat, 24 Jun 2017 21:45:42 +0000 (23:45 +0200)
committerJulien Moutinho <julm+symantic@autogeree.net>
Sat, 24 Jun 2017 23:33:52 +0000 (01:33 +0200)
symantic/Language/Symantic/Typing/Type.hs

index 9d0c40088ac3967cfd68f668c8d5b3df29d9cfeb..9043fb7f0b6dc94b378c0c1463070e70c0ae63c0 100644 (file)
@@ -121,7 +121,7 @@ instance AllocVars (Type src) where
        allocVarsR len (TyVar src n v)    = TyVar src n $ allocVarsR len v
        allocVarsR len (TyFam src l f as) = TyFam src (addLen l len) f $ allocVarsR len `mapTys` as
 
--- | Like 'TyConst', but using 'noSource' and 'inj_Const'.
+-- | Like 'TyConst', but using 'noSource', 'inj_Len' and 'inj_Const'.
 -- 
 -- FIXME: remove @kc@ when GHC's #12933 is fixed.
 tyConst ::
@@ -136,9 +136,7 @@ tyConst = TyConst noSource inj_Len inj_Const
  -- NOTE: The forall brings @c@ first in the type variables,
  -- which is convenient to use @TypeApplications@.
 
--- | Like 'TyConst', but using 'noSource' and 'inj_Const'.
--- 
--- FIXME: remove @kc@ when GHC's #12933 is fixed.
+-- | Like 'tyConst', but not using 'inj_Len'.
 tyConstLen ::
  forall kc (c::kc) src vs.
  Source src =>
@@ -337,12 +335,13 @@ instance FixityOf (#>) where
 instance ClassInstancesFor (#>)
 instance TypeInstancesFor  (#>)
 
+-- | Qualify a 'Type'.
 (#>) ::
  Source src =>
- Type src vs a ->
- Type src vs b ->
- Type src vs (a #> b)
-(#>) a b = (tyConstLen @(K (#>)) @(#>) (lenVars a) `tyApp` a) `tyApp` b
+ Type src vs q ->
+ Type src vs t ->
+ Type src vs (q #> t)
+(#>) q t = (tyConstLen @(K (#>)) @(#>) (lenVars q) `tyApp` q) `tyApp` t
 infixr 0 #>
  -- NOTE: should actually be (-1)
  -- to compose well with @infixr 0 (->)@
@@ -363,6 +362,7 @@ instance ClassInstancesFor (#) where
        proveConstraintFor _c _q = Nothing
 instance TypeInstancesFor (#)
 
+-- | Unify two 'K.Constraint's.
 (#) ::
  Source src =>
  Type src vs qx ->
@@ -407,6 +407,7 @@ instance
        proveConstraintFor _c _q = Nothing
 instance TypeInstancesFor  (#~)
 
+-- | Constraint two 'Type's to be equal.
 (#~) ::
  forall k a b src vs.
  Source src =>
@@ -418,16 +419,6 @@ instance TypeInstancesFor  (#~)
 (#~) a b = (tyConstLen @(K (#~)) @(#~) (lenVars a) `tyApp` a) `tyApp` b
 infixr 2 #~
 
-{-
-const_EqTy ::
- forall k src.
- Source src =>
- Typeable k =>
- Inj_Kind k =>
- Const src ((#~)::k -> k -> K.Constraint)
-const_EqTy = inj_Const @(#~)
--}
-
 -- | /Type equality/.
 eqType ::
  Source src =>