equal
deleted
inserted
replaced
60 | (i == "Template" ++ show templateNumber ++ suffix) = ie |
60 | (i == "Template" ++ show templateNumber ++ suffix) = ie |
61 | otherwise = Nothing |
61 | otherwise = Nothing |
62 toTemplatePointInit _ _ = Nothing |
62 toTemplatePointInit _ _ = Nothing |
63 |
63 |
64 breakNTPX :: InitExpression -> [InitExpression] |
64 breakNTPX :: InitExpression -> [InitExpression] |
65 breakNTPX (InitArray ia) = map (InitArray . filter (not . isNtpx)) $ groupBy (\a _ -> not $ isNtpx a) ia |
65 breakNTPX (InitArray ia) = map InitArray . filter ((<) 0 . length) . map (filter (not . isNtpx)) $ groupBy (\a b -> isNtpx a == isNtpx b) ia |
66 breakNTPX a = error $ show a |
66 breakNTPX a = error $ show a |
67 isNtpx :: InitExpression -> Bool |
67 isNtpx :: InitExpression -> Bool |
68 isNtpx (InitRecord ((Identifier "x" _, InitReference (Identifier "NTPX" _)):_)) = True |
68 isNtpx (InitRecord ((Identifier "x" _, InitReference (Identifier "NTPX" _)):_)) = True |
69 isNtpx _ = False |
69 isNtpx _ = False |
70 |
70 |