on master help sign in
Use letters for arguments in adt constructors
commit648cbd49dd1bb098e0affa9ad3f2500ef59119be authorEvan Czaplicki <info@elm-lang.org> dateFri 19 Jul 2013, 17:46 (13 years ago) parentc942afe
1 file changed+1−1
compiler/Type/Constrain/Declaration.hs+1−1
compiler/Type/Constrain/Declaration.hs+1−1
@@ -23,7 +23,7 @@ toDefs decl =
2323 Datatype name tvars constructors -> concatMap toDefs constructors
2424 where
2525 toDefs (ctor, tipes) =
26− let vars = take (length tipes) $ map (\n -> "_" ++ show n) [0..]
26+ let vars = take (length tipes) $ map (:[]) ['a'..'z'] ++ map (\n -> "_" ++ show n) [1..]
2727 loc = Src.none
2828 body = loc . Src.Data ctor $ map (loc . Src.Var) vars
2929 in [ Src.TypeAnnotation ctor $