on master help sign in
Merge pull request #192 from prasmussen/master

Fix primitiveATypeName lookup

commit574ffd5e516b36f9b234ed44a543ba4c53cc872e authorAgentM <agentm@themactionfaction.com> dateFri 23 Mar 2018, 16:43 (9 years ago) parentcf30d83b098101
1 file changed+1−1
src/lib/ProjectM36/Atomable.hs+1−1
src/lib/ProjectM36/Atomable.hs+1−1
@@ -229,7 +229,7 @@ instance (Atomable a) => AtomableG (K1 c a) where
229229 where
230230 tCons = PrimitiveTypeConstructor primitiveATypeName primitiveAType
231231 primitiveAType = toAtomType (Proxy :: Proxy a)
232− primitiveATypeName = fromMaybe (error ("primitive type missing: " ++ show primitiveAType)) (foldr (\(PrimitiveTypeConstructorDef name typ, _) _ -> if typ == primitiveAType then Just name else Nothing) Nothing primitiveTypeConstructorMapping)
232+ primitiveATypeName = fromMaybe (error ("primitive type missing: " ++ show primitiveAType)) (foldr (\(PrimitiveTypeConstructorDef name typ, _) acc -> if typ == primitiveAType then Just name else acc) Nothing primitiveTypeConstructorMapping)
233233
234234instance AtomableG U1 where
235235 toAtomG = undefined