Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Same for integers

  • Loading branch information...
commit 6bccc04e6c0c2f04123b0177960ba3472b9b07d3 1 parent ff8182a
@Shimuuar authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 TypeLevel/Number/Int.hs
View
10 TypeLevel/Number/Int.hs
@@ -48,12 +48,12 @@ splitToTrits x | n == 0 = 0 : splitToTrits rest
-- | Generate type for integer number.
intT :: Integer -> TypeQ
-intT = foldr appT [t| ZZ |] . map con . splitToTrits
+intT = foldr appT (conT ''ZZ) . map con . splitToTrits
where
- con (-1) = [t| Dn |]
- con 0 = [t| D0 |]
- con 1 = [t| D1 |]
- con x = error $ "Strange trit: " ++ show x
+ con (-1) = conT ''Dn
+ con 0 = conT ''D0
+ con 1 = conT ''D1
+ con x = error $ "Strange trit: " ++ show x
----------------------------------------------------------------
--
Please sign in to comment.
Something went wrong with that request. Please try again.