Permalink
Browse files

Use quoted names instead of [t| ... |]

  • Loading branch information...
1 parent fcb7842 commit ff8182af1a4522d1a5a2df7e55143244184ae40c @Shimuuar committed Mar 9, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 TypeLevel/Number/Nat/TH.hs
@@ -16,11 +16,11 @@ splitToBits x | odd x = 1 : splitToBits rest
-- | Create type for natural number.
natT :: Integer -> TypeQ
-natT n | n >= 0 = foldr appT [t| Z |] . map con . splitToBits $ n
+natT n | n >= 0 = foldr appT (conT ''Z) . map con . splitToBits $ n
| otherwise = error "natT: negative number is supplied"
where
- con 0 = [t| O |]
- con 1 = [t| I |]
+ con 0 = conT ''O
+ con 1 = conT ''I
con _ = error "natT: Strange bit nor 0 nor 1"
-- | Create value for type level natural. Value itself is undefined.

0 comments on commit ff8182a

Please sign in to comment.