packages feed

tfp 1.0.0.1 → 1.0.0.2

raw patch · 6 files changed

+59/−59 lines, 6 files

Files

src/Type/Data/Bool.hs view
@@ -43,19 +43,19 @@ not Proxy = Proxy  type family x :&&: y-type instance False :&&: x = False+type instance False :&&: _x = False type instance True  :&&: x = x and :: Proxy x -> Proxy y -> Proxy (x :&&: y) and Proxy Proxy = Proxy  type family x :||: y-type instance True  :||: x = True+type instance True  :||: _x = True type instance False :||: x = x or :: Proxy x -> Proxy y -> Proxy (x :||: y) or Proxy Proxy = Proxy  type family If x y z-type instance If True y z = y-type instance If False y z = z+type instance If True y _z = y+type instance If False _y z = z if_ :: Proxy x -> Proxy y -> Proxy z -> Proxy (If x y z) if_ Proxy Proxy Proxy = Proxy
src/Type/Data/List.hs view
@@ -31,14 +31,14 @@     show _ = ""  type family IsNull l-type instance IsNull (Cons car cdr) = False+type instance IsNull (Cons _car _cdr) = False type instance IsNull Null = True  type family Head l-type instance Head (Cons car cdr) = car+type instance Head (Cons car _cdr) = car  type family Tail l-type instance Tail (Cons car cdr) = cdr+type instance Tail (Cons _car cdr) = cdr  type family Reverse l type instance Reverse l = Reverse' l Null
src/Type/Data/Num.hs view
@@ -204,16 +204,16 @@ assertNat :: Proxy x -> Proxy (AssertNat x) assertNat Proxy = Proxy -type instance IsPositive (AssertPos x) = True-type instance IsPositive (AssertNeg x) = False+type instance IsPositive (AssertPos _x) = True+type instance IsPositive (AssertNeg _x) = False -type instance IsNegative (AssertPos x) = False-type instance IsNegative (AssertNeg x) = True-type instance IsNegative (AssertNat x) = False+type instance IsNegative (AssertPos _x) = False+type instance IsNegative (AssertNeg _x) = True+type instance IsNegative (AssertNat _x) = False -type instance IsNatural  (AssertPos x) = True-type instance IsNatural  (AssertNeg x) = False-type instance IsNatural  (AssertNat x) = True+type instance IsNatural  (AssertPos _x) = True+type instance IsNatural  (AssertNeg _x) = False+type instance IsNatural  (AssertNat _x) = True  instance Integer x => Integer (AssertPos x) where      singleton = case singleton :: Singleton x of Singleton n -> Singleton n
src/Type/Data/Num/Decimal/Number.hs view
@@ -327,30 +327,30 @@ -- type family Op.IsPositive x type instance Op.IsPositive (Dec x) = IsPositive x type family IsPositive x-type instance IsPositive (Neg x xs) = False-type instance IsPositive Zero       = False-type instance IsPositive (Pos x xs) = True+type instance IsPositive (Neg _x _xs) = False+type instance IsPositive Zero         = False+type instance IsPositive (Pos _x _xs) = True  -- type family Op.IsZero x type instance Op.IsZero (Dec x) = IsZero x type family IsZero x-type instance IsZero (Neg x xs) = False-type instance IsZero Zero       = True-type instance IsZero (Pos x xs) = False+type instance IsZero (Neg _x _xs) = False+type instance IsZero Zero         = True+type instance IsZero (Pos _x _xs) = False  -- type family Op.IsNegative x type instance Op.IsNegative (Dec x) = IsNegative x type family IsNegative x-type instance IsNegative (Neg x xs) = True-type instance IsNegative Zero       = False-type instance IsNegative (Pos x xs) = False+type instance IsNegative (Neg _x _xs) = True+type instance IsNegative Zero         = False+type instance IsNegative (Pos _x _xs) = False  -- type family Op.IsNatural x type instance Op.IsNatural (Dec x) = IsNatural x type family IsNatural x-type instance IsNatural (Neg x xs) = False-type instance IsNatural Zero       = True-type instance IsNatural (Pos x xs) = True+type instance IsNatural (Neg _x _xs) = False+type instance IsNatural Zero         = True+type instance IsNatural (Pos _x _xs) = True  -- type family Op.Negate x type instance Op.Negate (Dec x) = Dec (Negate x)@@ -897,9 +897,9 @@         SubAsc (Borrow xl yl xh) yh :< SubDigit xl yl  type family SubOrd c x y-type instance SubOrd GT x y = NormalizePosDesc (SubAsc x y)-type instance SubOrd EQ x y = Zero-type instance SubOrd LT x y = NormalizeNegDesc (SubAsc y x)+type instance SubOrd GT  x  y = NormalizePosDesc (SubAsc x y)+type instance SubOrd EQ _x _y = Zero+type instance SubOrd LT  x  y = NormalizeNegDesc (SubAsc y x)  type SubCmp x y = SubOrd (CompareAsc x y EQ) x y @@ -924,9 +924,9 @@ type instance (Dec x) Op.:*: (Dec y) = Dec (x :*: y)  type family x :*: y-type instance Zero       :*: x    = Zero-type instance (Pos x xs) :*: Zero = Zero-type instance (Neg x xs) :*: Zero = Zero+type instance Zero         :*: _y   = Zero+type instance (Pos _x _xs) :*: Zero = Zero+type instance (Neg _x _xs) :*: Zero = Zero type instance (Pos x xs) :*: (Pos y ys) = NormalizePosDesc (MulPos x xs y ys) type instance (Neg x xs) :*: (Neg y ys) = NormalizePosDesc (MulPos x xs y ys) type instance (Pos x xs) :*: (Neg y ys) = NormalizeNegDesc (MulPos x xs y ys)@@ -941,8 +941,8 @@ -}  type family MulAsc x y z-type instance MulAsc x Zero       z = z-type instance MulAsc x (Pos y ys) z =+type instance MulAsc _x Zero       z = z+type instance MulAsc  x (Pos y ys) z =          MulAsc (Mul2Asc x) (Div2 (Pos y ys))             (If (IsEven (Pos y ys)) z (AddAsc z x)) @@ -1180,15 +1180,15 @@   type family ScaleLo x ys-type instance ScaleLo x EndAsc = EndAsc-type instance ScaleLo x (yh :< yl) = ScaleLo x yh :< MulLo x yl+type instance ScaleLo _x EndAsc = EndAsc+type instance ScaleLo  x (yh :< yl) = ScaleLo x yh :< MulLo x yl  type family ScaleHi x ys-type instance ScaleHi x EndAsc = EndAsc-type instance ScaleHi x (yh :< yl) = ScaleHi x yh :< MulHi x yl+type instance ScaleHi _x EndAsc = EndAsc+type instance ScaleHi  x (yh :< yl) = ScaleHi x yh :< MulHi x yl  type family MulScaleAsc xs ys-type instance MulScaleAsc EndAsc ys = EndAsc+type instance MulScaleAsc EndAsc _ys = EndAsc type instance MulScaleAsc (xh :< xl) ys =          AddAsc             (ScaleLo xl ys)@@ -1208,7 +1208,7 @@  type family IsEvenAsc x type instance IsEvenAsc EndAsc = True-type instance IsEvenAsc (xh :< xl) = IsEvenDigit xl+type instance IsEvenAsc (_xh :< xl) = IsEvenDigit xl  type family IsEvenDigit x type instance IsEvenDigit Dec0 = True@@ -1396,23 +1396,23 @@  type instance Ord.Compare (Dec x) (Dec y) = Compare x y type family Compare x y-type instance Compare (Pos x xs) (Pos y ys) = ComparePos x xs y ys-type instance Compare (Neg x xs) (Neg y ys) = ComparePos y ys x xs-type instance Compare (Pos x xs) (Neg y ys) = GT-type instance Compare (Neg x xs) (Pos y ys) = LT-type instance Compare (Pos x xs) (Zero    ) = GT-type instance Compare (Neg x xs) (Zero    ) = LT-type instance Compare (Zero    ) (Neg y ys) = GT-type instance Compare (Zero    ) (Pos y ys) = LT-type instance Compare (Zero    ) (Zero    ) = EQ+type instance Compare (Pos  x  xs) (Pos  y  ys) = ComparePos x xs y ys+type instance Compare (Neg  x  xs) (Neg  y  ys) = ComparePos y ys x xs+type instance Compare (Pos _x _xs) (Neg _y _ys) = GT+type instance Compare (Neg _x _xs) (Pos _y _ys) = LT+type instance Compare (Pos _x _xs) (Zero      ) = GT+type instance Compare (Neg _x _xs) (Zero      ) = LT+type instance Compare (Zero      ) (Neg _y _ys) = GT+type instance Compare (Zero      ) (Pos _y _ys) = LT+type instance Compare (Zero      ) (Zero      ) = EQ  type ComparePos x xs y ys =         CompareAsc (AscendingNonEmpty x xs) (AscendingNonEmpty y ys) EQ  type family CompareAsc x y c-type instance CompareAsc EndAsc     EndAsc     c = c-type instance CompareAsc EndAsc     (yh :< yl) c = LT-type instance CompareAsc (xh :< xl) EndAsc     c = GT+type instance CompareAsc EndAsc     EndAsc      c = c+type instance CompareAsc EndAsc     (_h :< _l) _c = LT+type instance CompareAsc (_h :< _l) EndAsc     _c = GT type instance CompareAsc (xh :< xl) (yh :< yl) GT =                  CompareDiff xh yh (CompareDigit xl yl) GT type instance CompareAsc (xh :< xl) (yh :< yl) EQ =@@ -1421,9 +1421,9 @@                  CompareDiff xh yh (CompareDigit xl yl) LT  type family CompareDiff x y c l-type instance CompareDiff x y LT c = CompareAsc x y LT-type instance CompareDiff x y EQ c = CompareAsc x y c-type instance CompareDiff x y GT c = CompareAsc x y GT+type instance CompareDiff x y LT _c = CompareAsc x y LT+type instance CompareDiff x y EQ  c = CompareAsc x y c+type instance CompareDiff x y GT _c = CompareAsc x y GT   class x :<:  y; instance (x Ord.:<:  y) => Dec x :<:  Dec y
src/Type/Data/Num/Unary.hs view
@@ -61,7 +61,7 @@ type instance x :+: Succ y = Succ (x :+: y)  type family x :*: y-type instance x :*: Zero = Zero+type instance _x :*: Zero = Zero type instance x :*: Succ y = x :+: (x :*: y)  
tfp.cabal view
@@ -1,5 +1,5 @@ name:           tfp-version:        1.0.0.1+version:        1.0.0.2 build-type:     Simple license:        BSD3 license-file:   LICENSE@@ -27,7 +27,7 @@   location:     http://hub.darcs.net/thielema/tfp/  source-repository this-  tag:          1.0.0.1+  tag:          1.0.0.2   type:         darcs   location:     http://hub.darcs.net/thielema/tfp/