Verified Commit 89b6ae51 authored by Camil Staps's avatar Camil Staps 🙂

Add support for packed arrays in Clean.PrettyPrint

parent cd7a7d60
Pipeline #42266 passed with stage
in 2 minutes and 25 seconds
......@@ -205,14 +205,15 @@ where
lookup "_!List" = Yes ("[!" :+: join stnp " " ats :+: "]")
lookup "_List!"
| isEmpty ats = Yes ("[ !]" :+: PrintNil)
| otherwise = Yes ("[" :+: join stnp " " ats :+: "!]")
lookup "_!List!" = Yes ("[!" :+: join stnp " " ats :+: "!]")
lookup "_|List" = Yes ("[|" :+: join stnp " " ats :+: "]")
lookup "_#List" = Yes ("[#" :+: join stnp " " ats :+: "]")
lookup "_#List!" = Yes ("[#" :+: join stnp " " ats :+: "!]")
lookup "_Array" = Yes ("{" :+: join stnp " " ats :+: "}")
lookup "_#Array" = Yes ("{#" :+: join stnp " " ats :+: "}")
lookup "_!Array" = Yes ("{!" :+: join stnp " " ats :+: "}")
| otherwise = Yes ("[" :+: join stnp " " ats :+: "!]")
lookup "_!List!" = Yes ("[!" :+: join stnp " " ats :+: "!]")
lookup "_|List" = Yes ("[|" :+: join stnp " " ats :+: "]")
lookup "_#List" = Yes ("[#" :+: join stnp " " ats :+: "]")
lookup "_#List!" = Yes ("[#" :+: join stnp " " ats :+: "!]")
lookup "_Array" = Yes ("{" :+: join stnp " " ats :+: "}")
lookup "_#Array" = Yes ("{#" :+: join stnp " " ats :+: "}")
lookup "_32#Array" = Yes ("{32#" :+: join stnp " " ats :+: "}")
lookup "_!Array" = Yes ("{!" :+: join stnp " " ats :+: "}")
lookup name
| name % (0,5) == "_Tuple"
| length ats == arity = Yes ("(" :+: join stnp "," types :+: ")")
......
......@@ -182,6 +182,7 @@ where
print _ OverloadedArray = ""
print _ StrictArray = "!"
print _ UnboxedArray = "#"
print _ PackedArray = "32#"
instance print ElemAssignment
where
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment