toNFADef :: NFADef String -> Either String (NFADef [ZOS])
toNFADef = modifyNFADef (mapM convert)
  where
    convert '0' = Right Zero
    convert '1' = Right One
    convert '*' = Right Star
    convert c = Left $ "Unknown NFA label part: " ++ show c
toNFADef :: NFADef String -> Either String (NFADef [ZOS])
toNFADef = modifyNFADef (mapM convert)
  where
    convert '0' = Right Zero
    convert '1' = Right One
    convert '*' = Right Star
    convert c = Left $ "Unknown NFA label part: " ++ show c
toNFADef = modifyNFADef (mapM convert)
  where
    convert '0' = Right Zero
    convert '1' = Right One
    convert '*' = Right Star
    convert c = Left $ "Unknown NFA label part: " ++ show c