AZ
Size: a a a
AZ
AZ
G
G
G
prf
же не всегда рефлексивное равенствоSP
AZ
prf
же не всегда рефлексивное равенствоCM
p
p
CM
p
AZ
p
AZ
EG
AZ
reduceFormat : Format -> Format
reduceFormat (Number x) = Number (reduceFormat x)
reduceFormat (Str x) = Str (reduceFormat x)
reduceFormat (Lit x (Lit y t)) = reduceFormat (Lit (x ++ y) t)
reduceFormat (Lit x y) = Lit x (reduceFormat y)
reduceFormat End = End
В
итоге получается оптимальный формат, да:)EG
AZ
*.\test> printf "hello"
"hello" : String
*.\test> printf "hello %d"
\i => prim__concat "hello " (prim__toStrInt i) : Int -> String
*.\test> printf "hello %d" 10
(input):1:1-20:printf "hello %d" does not have a function type (PrintfType (reduceFormat (toFormat (unpack "hello %d"))))