on master help sign in
elide extraneous "AtomType" when showing atom types in the terminal

fixes #48

commite6e0d367f03856b72e512c2828d3a40e6abd5d9f authorAgentM <agentm@themactionfaction.com> dateWed 21 Sep 2016, 12:52 (10 years ago) parent8cfc3ee
1 file changed+2−1
src/lib/ProjectM36/AtomType.hs+2−1
src/lib/ProjectM36/AtomType.hs+2−1
@@ -259,7 +259,8 @@ prettyAtomType (ConstructedAtomType tConsName typeVarMap) = tConsName `T.append`
259259 showTypeVars (tyVarName, aType) = " (" `T.append` tyVarName `T.append` "::" `T.append` prettyAtomType aType `T.append` ")"
260260-- it would be nice to have the original ordering, but we don't have access to the type constructor here- maybe the typevarmap should be also positional (ordered map?)
261261prettyAtomType AnyAtomType = "?AnyAtomType?"
262−prettyAtomType aType = (T.pack . show) aType
262+prettyAtomType aType = T.take (T.length fullName - T.length "AtomType") fullName
263+ where fullName = (T.pack . show) aType
263264
264265prettyAttribute :: Attribute -> T.Text
265266prettyAttribute attr = A.attributeName attr `T.append` "::" `T.append` prettyAtomType (A.atomType attr)