Closed henrylaxen closed 9 years ago
When I compile:
test :: [a] -> Fay () test as = do let (a1:a2) = as return ()
with fay test.hs
I get: fay: Fay bug! Can't compile pat bind for: [JsVar (JsTmp 1) (JsApp (JsName JsForce) [JsName (JsTmp 1)]) ,JsIf (JsInstanceOf (JsName (JsTmp 1)) (JsBuiltIn (Ident () "Cons"))) [JsVar (JsNameVar (UnQual () (Id ent () "a1"))) (JsGetProp (JsName (JsTmp 1)) (JsNameVar (UnQual () (Ident () "car")))),JsVar (JsNameVa r (UnQual () (Ident () "a2"))) (JsGetProp (JsName (JsTmp 1)) (JsNameVar (UnQual () (Ident () "cdr")))) ] []]
Thanks for the report, and big thanks to @cdparks for fixing it! I released this as fay-0.23.1.7.
When I compile:
with fay test.hs
I get: fay: Fay bug! Can't compile pat bind for: [JsVar (JsTmp 1) (JsApp (JsName JsForce) [JsName (JsTmp 1)]) ,JsIf (JsInstanceOf (JsName (JsTmp 1)) (JsBuiltIn (Ident () "Cons"))) [JsVar (JsNameVar (UnQual () (Id ent () "a1"))) (JsGetProp (JsName (JsTmp 1)) (JsNameVar (UnQual () (Ident () "car")))),JsVar (JsNameVa r (UnQual () (Ident () "a2"))) (JsGetProp (JsName (JsTmp 1)) (JsNameVar (UnQual () (Ident () "cdr")))) ] []]