@@ -34,25 +34,27 @@ newtype Indent cat a b = Indent { unIndent :: ReaderCT (Int, cat () ()) cat a b
3434instance CategoryTrans Indent where
3535 clift = Indent . clift
3636
37+-- Generalized newtype deriving cannot derive this :(
38+
3739instance Syntax syn => Syntax (Indent syn) where
3840 type Seq (Indent syn) = Seq syn
39− anyChar = clift anyChar
40− char = clift . char
41− notChar = clift . notChar
42− satisfy = clift . satisfy
43− satisfyWith ai = clift . satisfyWith ai
44− string = clift . string
45− take = clift . take
46− takeWhile = clift . takeWhile
47− takeWhile1 = clift . takeWhile1
48− takeTill = clift . takeTill
49− takeTill1 = clift . takeTill1
41+ anyChar = Indent anyChar
42+ char = Indent . char
43+ notChar = Indent . notChar
44+ satisfy = Indent . satisfy
45+ satisfyWith ai = Indent . satisfyWith ai
46+ string = Indent . string
47+ take = Indent . take
48+ takeWhile = Indent . takeWhile
49+ takeWhile1 = Indent . takeWhile1
50+ takeTill = Indent . takeTill
51+ takeTill1 = Indent . takeTill1
5052
5153instance SyntaxChar syn => SyntaxChar (Indent syn) where
52− decimal = clift decimal
53− hexadecimal = clift hexadecimal
54− scientific = clift scientific
55− realFloat = clift realFloat
54+ decimal = Indent decimal
55+ hexadecimal = Indent hexadecimal
56+ scientific = Indent scientific
57+ realFloat = Indent realFloat
5658
5759-- | @runIndent m tab@ runs the 'Indent' transformer using @tab@ once for each
5860-- level of indentation.